Our website uses cookies. By using the website you agree ot its use. More information can be found in our privacy policy.


Integrating LS-PrePost as a preprocessor.

LS-PrePost can be coupled as a preprocessor in LS-OPT to incorporate geometrical parameters.

The example described in chapter 18.3 Impact of a cylinder in the LS-OPT Manual uses LS-PrePost to generate the finite element model of a cylinder depending on parameters. The parameters are the radius and the length of the cylinder. An LS-PrePost .cfile is required containing the command to generate the geometry. The .cfile can be created by defining the geometry manually in LS-PrePost, and then use the automatically generated lspost.cfile.

Creating the .cfile in LS-PrePost

  1. Click on the Element and Mesh
    exp_lspp_06.png icon in the Toolbar on the right side of the main LS-PrePost GUI.
  • Click on Shape Mesher
    exp_lspp_06_02.png icon.
  • To create mesh select Cylinder_Shell as the Entity.
  • Enter 75, 200, 190, 80 for the Radius and Length of the cylinder and for the number of elements in circumferential direction and along the length of the cylinder, respectively.
  • Enter 0, 0, 0 for the Position of the cylinder in the x, y and z-axis, respectively.
  • Enter 1, 0, 0 for the Direction of the cylinder in the x, y and z-axis, respectively.
  • Click on the Create button.
  • Then click on the Accept button to accept the created mesh.
  • Click on the Done button to finish the mesh interface.
  • Click on the Post
    exp_lspp_06_03.png icon.
  • Click on the Output
    lspp_6_04.png icon.
  • Select Keyword for the output Format.
  • Write data for the Active Parts Only.
  • Write elements and nodes using User ID.
  • Write Element connectivities and Nodal Coordinates to file.
  • Enter 1 for the state sequence to be written.
  • Click on Write to start writing the output file. Name this output file as lsppout and Save it to the working directory.
  • Click on the Done button to finish file writing interface.
  • Click on the Exit in the File menu.


  • The lspost.cfile is created automatically by LS-PrePost.
  • For this example we change the name of the file to cylinder.cfile.



 Parameterization of the .cfile 

Since the cylinder.cfile created in LS-PrePost will be used as the input file for pre-processing stage in LS-OPT, we need to parameterize this input file using the LS-PrePost paramter format. Here, the parameters are defined in the include file para01.cifle.

  • Open and read the include file para01.cfile.
  • Change the initial geometrical definitions of the cylinder to parametric syntax of LS-PrePost.
  • Write only the name of the output file without a path in order to generate this file in the respective sub directory created by LS-OPT.
  • We can define the parameters also in the same input file (cylinder.cfile) without any include file. To do so, we just need to copy the content of para01.cfile in the cylinder.cfile instead of open command.


openc command "para01.cfile"
genselect target node
genselect clear
cylindershell create 0,&radius &c_length &elerad &elelength 0.000000 0.000000,0.000000,1.000000,0.000000,0.000000
meshing cylindershell accept 1 1 1 cylindershell
output "lsppout" 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 1.000000


parameter radius 75.0
parameter c_length 200.0
parameter elerad 190
parameter elelength 80


Integrating LS-PrePost as a Preprocessor


LS-PrePost is used to generate the finite element model of the cylinder depending on the parameter values.


  • In the pre-processing stage we choose LS-PrePost as the software package interface.
  • After defining the required command for LS-PrePost we select cylinder.cfile as the input file, which includes para01.cfile.


The parameters for LS-PrePost are read from the para01.cfile which is an include of the input file cylinder.cfile as shown above.


The output of LS-PrePost is then used as an include file for the LS-DYNA input. Make sure to either define a file transfer to copy lsppout to the RUN_DYNA direcotries, or to use the Run Jobs in Direcotry of Stage option.