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

ANSA

Integrating ANSA in the Optimization process as preprocessor.

The integration of ANSA as a preprocessor in LS-OPT is shown here. The same example is depicted in detail and available for download in Coupling ANSA.

 

ANSA Setup

The preprocessing sequence that will be connected to LS-OPT will be defined in ANSA.

Create Morphing-Boxes and -Parameters

  • With the Morphing Tool you can reshape surface or volume mesh for optimization studies.
  • Define morphing parameters to control the shape change.
  • Save the file for example as model.ansa.
morph12.png

Set Up the Optimization Task

Define the pre-processing sequence that will be connected to LS-OPT. This sequence of actions will be invoked in every optimization loop and every action of it will be executed in the defined order modifying the shape and parameters of the model. All these actions take place before the run of the solver. When the sequence runs the following tasks are executed:

  • Reading Design Variable values from ASCII file
  • Modify the model according to the values of the ASCII file
  • Output the model in LS-DYNA format

Save the Design Variable file for example as model.txt.

This file contains the Design Variable names and upper and lower bounds needed for the optimization.

1_4

 

LS-OPT Setup

The optimization sequence that is defined in ANSA is connected and controlled from LS-OPT.

 

Pre-Processor ANSA

  1. Select the Setup tab.
  2. As Package Name select ANSA.
  3. Browse for the Command that runs ANSA (in this case ansa64, add the command line option -lm_retry 60 to avoid that the optimization stops because of missing ANSA licenses ). Make sure to use ANSA v.14.x or later if you use the files provided.
  4. Browse for the DV File  generated by ANSA: rail_DV.txt.
  5. Browse for the Model Database file rail_task.ansa. The path of the selected file is displayed on the screen.
ANSA_2

 

File Transfers

To use results of upstream stages, LS-OPT allows file transfers between stages. In this case, the output file of the stage ANSA is used as input file in LS_DYNA.

The File Transfers dialog is accessible by selecting the dependency icon on the arrow connecting the stages.

Then the necessary Source and Destination Files for the selected transfer Operation type, which is Copy in this case, have to be defined. Since the file is needed to run the LS-DYNA simulation, the operation in the case of Error is set to fail.

LS-DYNA Setup

  1. Select the Setup tab.
  2. Select the Package Name for the stage to LS-DYNA.
  3. For Command specify the LS-DYNA executable ls-dyna (This name can be different on your computer). On Windows, the command has to be specified using the absolute path.
  4. Make sure that the Basefile name is the Destination file name specified in the file transfer, DynaOpt.inp.

 

exp_ansa_rail_01.png

exp_ansa_rail_02.png

 

LSDYNA2