This page describes how to specify user defined material to use within LS-DYNA. The user-defined subroutines in LS-DYNA allow the program to be customized for particular applications. In order to define user material, LS-DYNA must be recompiled.
The first step to running a simulation with user defined material is to build a new executable. The following is an example done with solver version mpp971_s_R7.1.1.
When you log into the Oakley system, load mpp971_s_R7.1.1 with the command:
module load mpp-dyna/R7.1.1
Next, copy the mpp971_s_R7.1.1 object files and Makefile to your current directory:
cp /usr/local/lstc/mpp-dyna/R7.1.1/usermat/* $PWD
Next, update the dyn21.f file with your user defined material model subroutine. Please see the LS-DYNA User's Manual (Keyword version) for details regarding the format and structure of this file.
Once your user defined model is setup correctly in dyn21.f, build the new mpp971 executable with the command:
To execute a multi processor (ppn > 1) run with your new executable, execute the following steps:
1) move your input file to a directory on an OSC system (pipe.k in the example below)
2) copy your newly created mpp971 executable to this directory as well
3) create a batch script (lstc_umat.job) like the following:
#PBS -N LSDYNA_umat #PBS -l walltime=1:00:00 #PBS -l nodes=2:ppn=8 #PBS -j oe #PBS -S /bin/csh # This is the template batch script for running a pre-compiled # MPP 971 v7600 LS-DYNA. # Total number of processors is ( nodes x ppn ) # # The following lines set up the LSDYNA environment module load mpp-dyna/R7.1.1 # # Move to the directory where the job was submitted from # (i.e. PBS_O_WORKDIR = directory where you typed qsub) # cd $PBS_O_WORKDIR # # Run LSDYNA # NOTE: you have to put in your input file name # mpiexec mpp971 I=pipe.k NCPU=16
4) Next, submit this job to the batch queue with the command:
The output result files will be saved to the directory you ran the qsub command from (known as the $PBS_O_WORKDIR_
On-line documentation is available on LSTC website.