Webinar Info: Writing and Compiling a Custom Material Property in ANSYS Mechanical APDL

imageDuring our webinar held at noon on 9/27/2012 we promised to provide a link to the recording, a PDF of the PowerPoint, and some answers to a few questions.  Here is that information:

Files

Presentation PDF is here:

Zip file with the sample USERMAT.f and input file:

 

imageState Variables

I was a bit confusing on state variables. The problem is with my use of them, not with the variables.  The test model only had one integration point.  My code is still not working right, the default USERMAT is overwriting my flag somewhere and I don’t have time to figure it out. It’s killing me but I have to do some real work.

But anyhow, my assertion that the state variables are per integration point is correct.

Debugging

I am not aware of any way to use a debugger with ANSYS.  There is nothing in the documentation, and to be honest, I’ve not used a real debugger in years.  So there may be a way to do so, and see your routine in the debugger since you have the source code, but I have no idea on how to do that.  Perhaps someone with more debugging experience can comment below.

Other UPF’s

Someone asked about other routines that are available and we ran out of time before I could go over them.  Here is a list.

ELEMENTS
UserElem.f User Defined Element that use newer API
UEL100.f – UEL105.f
UEC100.f – UEC105.f
UEX100.f – UEX105.f
UEP100.f-UEP105.f
USERTR.f
USERAC.f
User elements defined that access the program database directly
USEROU.f Stores user-provided element output
USERAN.f Modify orientation of material properties
USERRC.f COMBIN37 (control/thermostat/spring/damper/resistor) user routine.
UEIMatx.f Access to an elements matrix or load vector
UTHICK.f Sets thickness at integration points
UsrFictive Sets “fictive” temperature (I have no idea what that is)
UFLEX.f Calculates pipe flexibility for PIPE288/289
UsrShift.f Allows user to specify time shift
Materials
UserMat.f User material models
UserHyper.f User defined hyperelasticity models
UserCreep.f User defined creep model
user_tbelastic.f Allows definition of elastic stiffness at a given integration point based on user model.  TB,ELASTIC,,,,USER
USERFC.f User defined failure criteria
USERSWTRAIN.f User defined swelling, for TB, SWELL,,,,USER
USERCK.f Helper routine that passes material properties for a user material in
USERFRIC.f User defined friction calculation.  Not just friction but all values calculated in contact calculations with friction turned on.
LOADS
USERFL.f Changes scalar field values (temp, fluence, heat generation, moisture content, magnetic virtual displacement), by element.
USERPR.f Calculates element pressure, by element
USERCV.f Calculates element face convection.
USERFX.f Calculates element face heat flux
USERCH.f Calculates element face charge density surface values
USERFD.f Computes complex load vectors for frequency domain logic
USERPE.f Calculate the rotation of an elbow pipe element caused by internal pressure
USRSURF116.f
USER116Cond.f
USER116Hf.f
Modifies the conduction, film coefficient, bulk temp for SURF151/152
userPartVelAcc.f Ocean wave particle acceleration calculation for PIPE288/289
userPanelHydFor.f Calcs hydrodynamic loading on SURF164 from ocean loading
USER Commands
USER01.f-USER10.f Create your own ANSYS commands that are accessed through /UCMD,cmd,num where num refers to the subroutine number and cmd is the command name you want to assign it. Put this in your startxx.ans file to give regular access.