Ansys Learning Forum › Forums › Discuss Simulation › Materials › Applying the User Programmable Features for User Defined Material Model › Reply To: Applying the User Programmable Features for User Defined Material Model
Â
Hello,
For a usermat example of the Neo-Hookean model, see the Technology Showcase example in the MAPDL documentation: Chapter 38: Large-Deformation Neo-Hookean Analysis (via UserMat Subroutine). This will serve as a good check against your code.
For implementing a user routine within WB-Mechanical, generally either ot these two methods will work:
1) use the /UPF command in a command object, e.g., /UPF,usermat.F (in order to utilize this method set the environement variable, ANS_USE_UPF = TRUE, before starting WB-Mechanical)
2) compile a shared library (using ANSUSERSHARED.bat) and then set the environment variable, ANS_USER_PATH, to point to the path of the dll. Note: set this variable before starting Workbench
In terms of initializing the material model parameters, you can use either of two methods:
1) use the TB,USER command and TBDATA within a command object under the Geometry object within Mechanical
2) use the Engineering Data GUI to enter the usermat material parameters. To access this feature, open Engineering Data and locate Create Custom Model… under Custom Material Models:
Also note that if you are going to use state variables to store quantities calculated within your subroutine, in order to post-process these state variables you will need to issue the OUTRES,SVAR,ALL command within the /SOLU module.
Lastly, it is highly suggested to put a write statement within your Fortran subroutine so that when the model is solving, you can determine whether the routine is actually being accessed by printing something to the screen (this can also be useful in debugging your code).
Â