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

define optimization task

In this section will be defined 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 an ASCII file
  • Modify the model according to the values of the ASCII file
  • Output the model in LS-DYNA format

In order to skip the previous sections the user can use the rail_morph.ansa file where the morphing actions are already defined. However there is the need to rename the file as rail.ansa.

The optimization sequence will be defined through the Task Manager Tool. This sequence will be saved in the ANSA database when the user saves the database. Use the FILE>TASK ON to open the Task Manager. To create a new Optimization Task pick on the Tasks button and select the Optimization Task from the pull-down menu that appears.task1.png
  
A default Optimization Task is defined which contains the following Task Items:
  • DV file: design variables input file
  • Design Variable: A design variable
  • FE_output: Output command for the FE model.
task2.png
  
To define one more Design Variable Items, right click on the Optimization Task and select New>Design Variable in the pull-down menu that appears.task3.png
  
A new Design Variable Item is added to the Optimization Task.task4.png
  

The first Design Variable will control the depth of the embosses. To achieve this, the Design Variable will control the Morphing Parameters Emboss_Depth_1_2 and Emboss_Depth_2_2.

Right click to the Design Variable Item and select the Edit function to define the type and boundaries of the Design Variable.

task5.png
  

In the window that appears set the TYPE pull-down to REAL and the RANGE to BOUNDS. With these settings the Design Variable can get any real value between the Min and Max Value. Enter the values:

  • Min Value -6
  • Current Value -1
  • Max Value 0
Optionally enter a new name for the Design Variable (Emboss_Depth). Pick OK to accept the settings.
task6.png
  
Right click on the Design Variable Item and select the New>MORPH PARAMETER. A new Task Item of type MORPH PARAMETER is created and it is connected with the Emboss_Depth Design Variable.task7.png
  
Right click on the MORPH PARAMETER Task Item and select Edit.task8.png
  
A window containing the already defined Morphing Parameters from the Morphing Tool appears. Select the first Morphing Parameter and pick OK to confirm. Now the MORPH PARAMETER Task Item is associated with the Emboss_depth_1_2 Morphing Parameter. The Item’s name is modified accordingly.task9.png
  
In the same way create one more MORPH PARAMETER Task Item under the same Design Variable. Select the second Morphing Parameter and confirm.task10.png
  
The first Design Variable is ready. Two Morphing Parameters are associated to this Design Variable since, to modify the depth of the embosses, two Morphing Parameters are needed. During the run of the optimization sequence the current value of the Design Variable will be applied to the associated Morphing Parameters and the model will be morphed accordingly.task11.png
  

Right click on the second Design Variable Item and select the Edit to open the Design Variable card. Switch the TYPE pull-down to REAL and the RANGE to STEP. With these settings the Design Variable can get the real values between the Min and Max Value by a specified step. Enter the values:

  • Min Value -2
  • Current Value 1
  • Max Value 2
  • Step Value 1
Optionally enter a new name for the Design Variable (Emboss_Width) and press OK to accept the settings.
task12.png
  

Right click on the Design Variable Item and select the New>MORPH PARAMETER. A new Task Item of type MORPH PARAMETER is created and it is connected with the Emboss_Width Design Variable.

Right click on the new MORPH PARAMETER Task Item and select Edit.

task13.png
  
In the window that appears select the third Morphing Parameter and press OK to confirm.task14.png
  
The way that the Emboss_width Morphing Parameter has been defined leads to the following result: Morphing the above parameter by 1 mm moves both edges of the emboss to the opposite sides resulting to a movement of 2 mm. To overcome this problem a calculation can be added between the Design Variable and the Morphing Parameter.task15.png
  
Open again the Morph Parameters window. (Right click on the new MORPH PARAMETER Task Item and select Edit).
Double click on the Current Value field of the third parameter. The current value is displayed which is 1. Enter “/2” to divide by two the current value.
task16.png
  

Press ENTER to confirm.

The Design Variable that controls the emboss width is ready.

task17.png
  

The third Design Variable will control the distance between the embosses. Create a new Design Variable Task Item and Edit it. Leave the TYPE pull-down to REAL and the RANGE to BOUNDS. Enter the values:

  • Min Value -5
  • Current Value 1
  • Max Value 10
Optionally enter a new name for the Design Variable (Emboss_Dist) and press OK to accept the settings.
task18.png
  
Right click on the Design Variable Item and select the New>MORPH PARAMETER to create such Task Item. Right click on the new MORPH PARAMETER Task Item and select Edit.
In the window that appears select the fourth Morphing Parameter and press OK to confirm.
task19.png
  
Right click on this Design Variable Item and select the Edit to open the Design Variable card. Switch the TYPE pull-down to REAL and the RANGE to LIST. With these settings the Design Variable can get the real values from a list since the shell thickness can only have discrete values. Enter the values: Text Values 0.8, 0.9, 1, 1.2, 1.4, 1.7 Current Value 1.2 Optionally enter a new name for the Design Variable (Thickness) and press OK to accept the settings.task20.png
  
Right click on the Design Variable Item and select the New>A_PARAMETER. A new Task Item of type ANSA Parameter is created and it is connected with the Thickness Design Variable.task21.png
  
Right click on the new A_PARAMETER Task Item and select Edit.task22.png
  
The A_PARAMETERs window opens. Pick the NEW button to define a new ANSA Parameter.task23.png
  
The card of the new ANSA Parameter opens. Enter a name (Thickness) and a valid value for the shell thickness. In this case valid is a value not equal to zero. Press OK to confirm.task24.png
  
As the Parameter is defined double click on it to assign it to the A_PARAMETER Task Item.task25.png
  
Open the property list using the PR.LIST button of the Focus menu, select the property of the rail body and pick EDIT. task26.png
  
The SECTION_SHELL card opens. Delete the content of the field T1 and pick the F3 key.task27.png
  
The A_PARAMETERs list opens. Select the Thickness ANSA Parameter by double click on it. The expression “= Thickness” is entered in the T1 field. Now the shell thickness of the specific property will be controlled by the Thickness Design Variable through the relative ANSA Parameter.task28.png
  
The Design Variable which controls the shell thickness of the model is ready.task29.png
  
Right click on the Optimization Task and select New>Session Command in the pull-down menu that appears.task30.png
  
A new Task Item is defined at the end of the Optimization Task.task31.png
  
Drag and drop the new Task Item one step above since this command should be executed before the final output of the FE model.task32.png
  
Right click on the Session Command Item and select EDIT from the pull-down menu.task33.png
  
In the window that appears are listed all the available session commands. Select the command “MESH>SHELL MESH>SMOOTH:” and press ENTER to confirm.task34.png
  

Optionally change the name of the Task Item by clicking on it twice. The Smooth command will be executed after the morphing of the model and the change of the thickness according to the defined Design Variables.

task35.png
  
Right click on the DV File Item and select EDIT from the pull-down menu.task36.png
  
In the file manager that appears enter the path where the DV file should be saved. It is recommended to save the file to the working directory. NOTE: In every optimization loop ANSA will search for the DV file in the defined path. So the user should not move the file from this directory. Otherwise the user must EDIT again the DV File Task to update the path.task37.png
  
The DV File Task is defined. However the file is not yet created and saved.task38.png
  
To create the file right click on the Optimization Task and select the Output DV button. Now the file is defined and saved.task39.png

 The DV File is shown below.

task40.png

 

 

A last Task Item is used to create an output of the model in FE format.
Right click on the FE-output Task Item and select the EDIT function.
task41.png
  
The OUTPUT DECK window appears. Select the LS_DYNA option from the pull-down to output the model in this format. Press OK to confirm.task42.png
  

The file manager window opens. Select the path and filename for the output file and confirm. In this example the name of the file is rail.key.

NOTE: Since ANSA will output this file in the defined path in every optimization loop, it is recommended not to move the file from this directory. Otherwise the user should EDIT again the FE Output Task to update the path.

task43.png
  
The OUTPUT PARAMETERS window opens. Select the options for the LS-DYNA file and confirm. In this example the user could use the “All” option to output the whole model.task44.png
  
The Optimization Task is ready.task45.png
  

Before connect the optimization sequence with LS-OPT the user is able to simulate the actions that will take place in each loop and check the results.


Right click on the Optimization Task and select the Simulate function.

task46.png

 

task47.png

 

task48.png

task49.png task50.png

 

 

task51.png

 

 

Select the Run button of the Task Managertask52.png
  
Press OK to the warning message that appears.task53.png
  
Every Task Item that runs correctly is checked.task54.png
  

The model is modified.

NOTE: Do not save the model since the optimization loop will always use the initial model.

 

task55.png

The Run function does exactly what will take place in every optimization loop so this is the most accurate check of the model. The actions that take place in the specific example through the Run action are listed below. The sequence of the Optimization Task defines also the order that all actions take place.

  • Reading the Design Variables current values from the rail_DV.txt file.
  • Substitute the current value of the first Design Variable (Emboss_Depth) with the relative value from the rail_DV.txt file.
  • The Morph Parameters that are assigned to the Emboss_Depth Design Variable use the above value to morph the model.
  • The same applies for all Design Variable Tasks.
  • The Reconstruct Session Command applies reconstruct to the visible model using the default meshing parameters. (See section 9.6.).
  • The FE Output Task output the model in LS-DYNA format which will be used from the solver.