General Mechanical

General Mechanical

Ansys Workbench Mechnical 2021 and UPF usermat problem!

    • mehdi.yasaee
      Subscriber

      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. 

       

       

       

    • David Weed
      Ansys 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.

    • janot.lubritz
      Subscriber

       

       

      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!

       

       

      • mehdi.yasaee
        Subscriber

        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

Viewing 2 reply threads
  • You must be logged in to reply to this topic.