-
-
June 20, 2022 at 5:41 pmmehdi.yasaeeSubscriber
I'm working in ANSYS 2021 R2.
I've setup a Static Structural model in workbench. Simple cube model with the bilinear plasticity usermat.f placed in the working directory.
I've inserted a command(APDL):
/UPF, usermat.f
Under Static Structural step.
When I solve, the UPF process doesn't start, there is no compilation etc.
If I were to execute the exact input file in Terminal, then it will work correctly with the usermat.f compiling. This means the Fortran compilers are all working correctly.
The exact same process in ANSYS 2019 R3 works correctly in Workbench Mechanical.
What am I doing wrong?
To note:
ANS_USE_UPF is set to TRUE in environment variable
Envrionment path to ANSYS directory is set, meaning findUPF.bat can be run directly in Terminal.
-
July 1, 2022 at 3:13 pmDavid WeedAnsys Employee
Hi, is this on the Windows or Linux OS? Note that for Linux, the /UPF command in WB-Mechanical will not work. You'd need to user the shared library method instead and set the environment variable ANS_USER_PATH to wherever the compiled library resides.
-
August 23, 2022 at 6:41 amjanot.lubritzSubscriber
Hey! I’ve got the exact same question. When I’m compiling the .f files with the Terminal (admin mode) and open them with apdl everything works but the compilation within workbench does not work. The command “/UPF, usermat.f” that is inserted into the model does not do the trick. The .f file is in the same folder as the model solution. I’m working on Windows 10 with Ansys 2021 R1 (shouldn’t have anything to do with the Ansys version).
Does anybody have an idea how I can connect the UPF to the workbench model?
@David Weed: What do you mean with the ANS_USER_PATH variable? What is the value of the variable and what do you mean with "where the compiled library resides."? I thought it would start the compilation once I solve the workbench model?
Thanks so much in advance!
-
August 24, 2022 at 6:59 ammehdi.yasaeeSubscriber
I think this must be a bug in Ansys 2021 since in Ansys 2019 using the command works correctly and the usermat is compiled directly within Workbench Mechanical.
What you need to do is to use the precompile method. Basically chose a folder on your machine as your usermat folder. Then put the compiled usermat files in there.
In windows Environmental Variables create a system Environement Variable ANS_USER_PATH to point to the usermatfolder.
Finally to compile the usermat.f files, make sure all the correct softwares(intel compiler, visual studio) and paths have been installed correctly. Then go to this folder:
C:\Program Files\ANSYS Inc\v212\ansys\custom\user\winx64
and look for the file: ANSUSERSHARED.bat
You need to put this and usermat.f in the same folder then run the batch file. Which should compile the usermat creating a bunch .dll, .lib, .map etc. files, .
In Ansys Mechanical, you activate the usermat by adding APDL Command in the analysis tree, /UPF, usermat
Hope this helps
-
July 5, 2023 at 7:55 amBoyka UriSubscriber
Thanks a lot. it`s work!
-
July 25, 2023 at 7:52 amjanot.lubritzSubscriber
I have two more questions: First one is on how to assign material properties when using an UPF in the workbench environment. With APDL you assign them with the TB command and there is nothing assigned beforehand. When using workbench there is always a basic material (Steel or so) assigned beforehand and I cannot delete it. Do I have to assign the material properties for my usermat via an APDL command in the workbench tree and do I have to delete the steel properties somehow?
Would be great if somebody could give me a hint on that since it does not work right now.
Second one is on the linking of the usermat in the workbench file: I use the \upf, usermat.f command as described above and have the two variables (ANS_USE_UPF = TRUE and ANS_USER_PATH = path to compiled dlls files) set but everytime I run the solver an error prompts:
”An error occured while starting the solver module.”
In the solver files directory is a link_error file and a link file so it looks like the linking did not work. Is there a way to check whether everything is linked correctly and compiling/running the usermat when I run/solve the workbench file? Somehow it still does not work within the workbench. When I run the RVE model without the included usermat and for example isotropic steel everything works fine.
I know that the usermat code works and compiles without any errors as it works with APDL but I have to use the same usermat in a Workbench model.
Thanks in advance!
-
-
-
- The topic ‘Ansys Workbench Mechnical 2021 and UPF usermat problem!’ is closed to new replies.
- Ayuda con Error: “Unable to access the source: EngineeringData”
- At least one body has been found to have only 1 element in at least 2 directions
- Error when opening saved Workbench project
- How to apply Compression-only Support?
- Geometric stiffness matrix for solid elements
- How to select the interface delamination surface of a laminate?
- Timestep range set for animation export
- Image to file in Mechanical is bugged and does not show text
- Frictional No separation contact
- Elastic limit load, Elastic-plastic limit load
-
1301
-
591
-
544
-
524
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.