Skip to content. | Skip to navigation

Personal tools
Personal tools

Optimizing LS-DYNA input curves

This HowTo demonstrates the optimization of LS-DYNA input curves with the aid of cubic Hermite splines

To optimize LS-DYNA input curves, e.g. stress vs. strain data, one solution is to use splines that interpolate a certain number of given points. The coordinates of that points or at least some of them are defined as LS-OPT parameters. Further variables may be defined in the LS-DYNA input file.


To interpolate the supporting points, the perl program is used as preprocessor in LS-OPT: 

$ ------ Pre-processor -------- 

prepro own 
prepro command "../../" 
prepro input file "supporting_points.txt"	

Solver GUI 1.png

 Note: The perl script should be executable and it's necessary to modify the first line of the perl script, if the perl directory is different on your system. Alternatively, we can use command "perl" to call the perl script, i.e.

prepro command "perl ../../"

instead of

prepro command "../../"

The variables are defined in preprocessor input file supporting_points.txt.

0 0
<<x1>> <<y1>>
<<x2>> <<y2>>
0.8 <<y3>>

Each line contains the coordinates of a supporting point, the number of points is arbitrary and the coordinates may be fixed values and LS-OPT variables, respectively.

The program returns the file that contains the output curve in LS-DYNA format and may be used directly as inlude in the LS-DYNA input file, here in example.key.


To ensure that the supporting points are monotonically increasing, constraints have to be defined in LS-OPT on previously defined composite expressions.

constraints 2
constraint 'constraint_x2_x1'
lower bound constraint 'constraint_x2_x1' 0.1
constraint 'constraint_y2_y1'
lower bound constraint 'constraint_y2_y1' 1e-06
composite 'constraint_x2_x1' {x2-x1}
composite 'constraint_y2_y1' {y2-y1}

Now, an objective has to be defined. In this case we use a Mean Squarred Error composite that compares the displacement test curve test_curve.dat to the computed displacement curves, see


After five iterations, LS-OPT returns a stress vs. strain curve that leads to a displacement curve close to the given test data.



For convenience example files have been prepared and are available for download at the end of this document.

Please make sure that the execute permission is set for the Perl program and that the preprocessor and solver commands are adapted to your system. If you run this example on a Windows machine, you also have to adapt the cp command for the history "loadcurve" and make sure that you use the Perl script for Windows.