We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Accessing node temperatures in User Programmable Feature during solution

    • user deleted
      Subscriber

      Hi!

      I want to simulate heating of the concrete slab during its hardening using some custom heat generation. Desirable heatgen has dependence on special time variable which is calculated from the beginning of the simulation for each node of the model and changes at each substep using temperature values of structure in current zone (node), time steps and time values, calculated in previous substeps.

      I was able to implement it in ABAQUS software using subroutine HETVAL, however I wish to implement it in ANSYS software and similar subroutine in ANSYS (currently im trying to do it using usrefl.F) doesn't have (in contrast to subroutines such as usermat.F) user state variables (ustatev) nor temperature data (Temp), which are crucial for my problem.

      I have successfully used this subroutine in WB project (it writes some date to output and I can see desirable strings in output file). Currently I'm trying to implement all in it however I have good grasp of the APDL and it's not a problem to do it in mapdl. Also, Ive successfuly implemented some creep law just to test things and can say VS and Fortran compiler works within my system. I link them using /UPF command.

      So, the question is - How to access nodal temperature and time step data (some user state variables are also desirable) within upf subroutines which don't have them as input arguments?

    • David Weed
      Ansys Employee

       

      Hello,

      To access temperature values during the solution, please the dspget function (use idf = 20). Alternatively, the GetStackDisp function may work as well.

      For retrieving load step information, see the include deck stepcm.inc

      Note that, on a Windows OS, for retrieving information from the common blocks (when using an include deck), for the /UPF and shared library methods, unless you use the data sharing routines, a value of zero will be returned. Use a custom executable, which does not need to use these data sharing routines, to access the common blocks instead. For the Linux OS, you can use either /UPF or shared library methods without the need for the data sharing routines.

       

      • user deleted
        Subscriber

         

        Thanks for the comrehensive answer!

        I’ve tried using the dspget function before; however, I was using just /UPF method and was getting wrong values. I’ll try using it with a custom executable and I think this will probably work.

        About include decks – after including decks in your subroutine file, you’ll get access to parameters declared in this .inc file. Am I getting it right?

        And are there any ways to get analogues of user state variables while solving my problem (without using some write to file methods, e.t.c)? I want to print some data (heat generation values, for example) after the solution is complete in form of figures using ANSYS Post.

        And isI there a way of passinIg some parameters to subroutines? (say, usinIg command snippets)

        Thanks in advance!

         

    • David Weed
      Ansys Employee

      Hi, just a correction on DSPGET. After testing, I realize that this is only valid for /post1. For a routine that is valid in /solu, try using NDSPGT instead. And yes, after using #include, you should have access to whichever include deck you specify.

Viewing 2 reply threads
  • The topic ‘Accessing node temperatures in User Programmable Feature during solution’ is closed to new replies.