Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
LS Dyna

LS Dyna

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

UMAT ANSYS 2025R1

    • pavan_m240846ce
      Subscriber

      I am trying to validate the results in a journal paper for my M.Tech thesis work, in which they have used a hybrid consititutive model added into the ls dyna subroutine. To recreate the same thing I need to add the user defined material. I have sucessfully installed the latest veersion intel fortran compiler and microsoft visual studio. What steps do I need to follw to implement the UMAT in ls dyna and compile the constitutive model code.

    • Armin
      Ansys Employee

      Hi Pavan,

      Below is the general workflow. You can find more information in the LS-DYNA documentation (see *MAT_USER_DEFINED_MATERIAL_MODELS section here:https://ftp.lstc.com/anonymous/outgoing/jday/manuals/LS-DYNA_manual_Vol_II_R6.1.0.pdf). There are also courses available on the Ansys Learning Hub that you can check if you have access to it.

      To implement a user-defined material (UMAT) in LS-DYNA you need to follow a sequence of steps involving code preparation, integration, compilation, and simulation setup. The process requires careful attention to LS-DYNA's UMAT framework and compatibility with your compiler environment.

      1. Prepare Your UMAT Source Code

      Develop your hybrid constitutive model in Fortran, following LS-DYNA's UMAT interface specifications. LS-DYNA supports both scalar and vectorized subroutines (typically named UMAT41 to UMAT50 for non-vectorized routines). Ensure your code handles all required inputs and outputs, such as stress, strain, state variables, and material parameters. The first two parameters in the material definition are reserved for density treatment and integration points for failure criteria.

      • Place your Fortran source files (.f, .F) in the usermat directory provided by LS-DYNA.
      • Initialize critical variables (e.g., number of state variables 'nsv') explicitly in your code to avoid numerical instabilities.

      2. Set Up the Usermat Package

      • Unpack the LS-DYNA usermat package, which includes example source files, object libraries, and makefiles.
      • Navigate to the usermat directory and review the provided makefile. Adjust compiler paths and options if necessary to match your Intel Fortran and Visual Studio installation. 

      3. Compile the UMAT Code

      • Use the provided makefile to compile your UMAT code. Run make clean to remove previous builds, then make to compile the new code. 
      • Ensure you are compiling for the correct LS-DYNA version. If using dynamic linking, the shared object (.so) must match the LS-DYNA binary version. 

      4. Integrate UMAT with LS-DYNA

      • In your LS-DYNA input deck, define the material using the *MAT_USER_DEFINED_MATERIAL keyword. Assign the appropriate parameters, including the subroutine number (e.g., 41 for UMAT41) and module ID if using multiple user materials. 
      • Specify material constants in the cm and/or cma arrays, ensuring bulk and shear modulus are included for time step and contact calculations. 
      • If your model is hybrid or requires multiple subroutines, use the *MODULE_USE keyword to manage execution across different modules. 

      5. Run and Validate the Simulation

      • Execute LS-DYNA with your compiled UMAT. Monitor the log files for errors related to linking, initialization, or numerical instability. 
      • Compare your results with those from the journal paper to validate the hybrid constitutive model implementation. 

      Additional Considerations

      • Refer to LS-DYNA documentation and training resources for advanced UMAT features such as anisotropy or complex failure criteria. 
    • pavan_m240846ce
      Subscriber

      Hi Armin, 

      Thank you very much for the detailed explanation and for outlining the complete workflow for implementing a user-defined material in LS-DYNA.
      I will go through the manuals and try to implement this. 

      • Armin
        Ansys Employee

        No problem Pavan. Throughout the process, if you have any questions, you can post them in this forum, and someone should be able to assist you.

    • pavan_m240846ce
      Subscriber

      Hi Armin,

      I have received the package named “ls-dyna_mpp_d_R16.0_619-gd222963e2f_winx64_ifort190_impi2019_lib”, which includes the source files (dyn21.f) and the makefile for compiling the user-defined material. Before proceeding with the UMAT implementation, I wanted to clarify one point regarding the compiler compatibility.

      I could not find clear information about the exact Intel Fortran compiler version required for this build. In the newer 2025 Intel oneAPI releases, the classic ifort compiler does not seem to be available or functional on my system, and only ifx is working. Since the package name suggests ifort190, I am unsure whether I should install an older Intel compiler version or if the workflow is compatible with ifx.

      Could you please advise which Intel Fortran version is recommended for compiling this LS-DYNA usermat package, and whether using ifx instead of ifort is supported?

      Thank you for your support.

      Best regards,
      Pavan.

      • Armin
        Ansys Employee

        Hi Pavan,

        The compiler specified in the solver's name does not need to match the compiler used to compile the UMAT codes. I recommend using Intel Fortran Compiler version 2019 which is popular. Regarding the use of ifx, none of our current UMAT packages support it; they are all based on ifort. If you wish to use ifx, you will need to open the makefile and manually change any references from ifort to ifx. Here is a forum post that provides more details on this topic:

        LS-DYNA Umat and new Fortran compiler 

Viewing 3 reply threads
  • You must be logged in to reply to this topic.
[bingo_chatbox]