LS Dyna

LS Dyna

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

Static Variable in User Defined Function

    • marcansyl
      Subscriber

      Hi all,

      I am using LS Dyna to model bond-slip of steel and concrete. I am using Beam In Solid, and I am implementing a user-defined function. I want to declare a static variable in the function because I want it to change it value each time the function is called. Do you know how I can do that ? And also, do you know which coding language LS Dyna uses ?


      Marc

    • Andreas Koutras
      Ansys Employee
      Hello It seems that you are trying to implement a subroutine "rebar_bondslip_get_force" in the umat package. The umat subroutines are written in Fortran. To define a global variable, you can write a module in the umat file. For example, to define an integer global variable "icounter", you can copy following lines in dyn21.F. You can look online for general information and examples on Fortran commands. I hope this helps.
      module example
      implicit none
      save
      integer icounter
      end module example
    • marcansyl
      Subscriber
      Thanks. It is very helpful. Do you know how I can access the file dyn21.F ?
Viewing 2 reply threads
  • The topic ‘Static Variable in User Defined Function’ is closed to new replies.