Skip to content. | Skip to navigation

Sections
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.

Variables

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

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

prepro own 
prepro command "../../cubic_hermite_interpolation.pl curve_out.inc" 
prepro input file "supporting_points.txt"	

Solver GUI 1.png

 Note: The perl script cubic_hermite_interpolation.pl 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 ../../cubic_hermite_interpolation.pl curve_out.inc"

instead of

prepro command "../../cubic_hermite_interpolation.pl curve_out.inc"

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 curve_out.inc 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.

*INCLUDE
curve_out.inc

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

$ CONSTRAINT DEFINITIONS
$
constraints 2
move
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 EXPRESSIONS
$
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 http://www.lsoptsupport.com/examples/parameter-identification/history-mse

 MSE_GUI.png

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

 

Optimal_Curve.jpg

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.

Attachments