Aleksandr Zhadkovskii




Can you include the insides of the link_error file? I’ve come across the same issue before, and in my experience, possible solutions are listed below.

1) ansys created a restart control file and locked it (file that cannot be deleted can be seen in the solver files directory in this case), and in this case something like “link cannot be recognised” is printed in link. However, to see this error, you first need to have some successful runs (pass the building mathematical model step of the solution).

2) Which version of Intel compiler are you using? Is it one in oneAPI? I’m not entirely sure rn how user subroutines are done in APDL, but when using /UPF in WB, I edited ansupf.bat file while using oneAPI. It was written for parallel studio paths, I believe, and currently the paths there are wrong. Possible solution then is to add command to ansupf.bat file (…\*ansys version*\ansys\custom\user\winx64\ANSUPF.bat) calling setvars.bat file (…\Intel\oneAPI\setvars.bat) from oneAPI directory. Something like “call “path-to-intel-directory\Intel\oneAPI\setvars.bat)””.


About material properties: I believe ones from the engineering data are not used in usermat unless you pass them explicitly. Following the example provided by ANSYS for usermat, they are defined as “young” and “posn” inside and used for calculations. To pass them from the workbench you can add a command snippet to the body of interest (right-click on any body inside in Geometry and add command snippet) and use TB, USER. Inside the command snippet, I used something like this in my case:

*GET,YOUNG,EX,matid,TEMP,20       ! young modulus from material properties
*GET,POISN,NUXY,matid,TEMP,20     ! poisson’s ratio from material properties

d_t = 8.0                         ! linear temperature function coefficient
b_t = 0.081                       ! linear temperature function coefficient
alpha = -0.372                    ! coeff for Young modulus calculation
gamma = 0.722                     ! coeff for Young modulus calculation

TB,USER,matid,,6                  ! passing data to script
! 1 – young modulus, 2 – poisson’s ratio, 3-4 – linear temperature function coefficient

and then you can access passed values using prop() as in the ANSYS usermat example.