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.
LS Dyna

LS Dyna

Topics related to LS-DYNA, Autodyn, Explicit STR and more.

user-defined state subroutine

    • 786959915
      Subscriber

      I think the main function of the user-defined state subroutine is to output the bulk modulus in the first update, and the new pressure value and energy in the second update, i.e. the corresponding iflag=0 and iflag=1 parts, is this understood correctly?
      Also, I have some questions about the initialization of some parameters in the user subroutine. For example, if I initialize the temperature tmp=293K, the temperature changes after running the subroutine, and if I call this subroutine later, does the temperature change to 293K?

    • pedram.samadian
      Ansys Employee

      Hi,

      You are right. As per LS-DYNA Keyword User’s Manual Vol. I Appendix II (LS-DYNA Keyword Manual), with a defined *EOS_USER_DEFINED card for a part, LS-DYNA first calls the EOS to calculate the bulk modulus and then calls it to update the pressure and internal energy.

      About your second question, in LS-DYNA, variables like temperature are usually part of the state that are updated and passed through calls to the subroutine. This means the value of temperature at the end of a previous step will be carried into subsequent calls to the subroutine unless you overwrite it. The subroutine does not automatically reset the temperature to 293 K unless you explicitly reinitialize it in your code (i.e. you hardcode it in the code).

      I hope this information answers your questions.

      Thanks,

      Pedram

       

       

    • 786959915
      Subscriber

      Thank you very much for your reply

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