Optimization With Isight

38
Tutorial OPTIMIZATION COUPLING ANSA / μETA TΟ Isight Table of Contents 1. Introduction .............................................................................................................................. 2 1.1. Prerequisites ................................................................................................................... 2 1.2. Problem description ........................................................................................................ 2 1.3. Data files ......................................................................................................................... 4 2. Defining the Optimization Task ................................................................................................ 5 2.1. Design Variables for Morphing Parameters .................................................................... 6 2.2. User Scripts .................................................................................................................... 9 2.3. Session Commands...................................................................................................... 11 2.4. The Design Variables Input File .................................................................................... 13 2.5. The FE output file ......................................................................................................... 14 3. Run the Optimization Task ..................................................................................................... 16 4. Set up the ANSA settings ....................................................................................................... 17 5. Define responses ................................................................................................................... 20 5.1. Define the model mass ................................................................................................. 20 5.2. Define the maximum stress .......................................................................................... 21 6. Set up Isight ........................................................................................................................... 24 6.1. Set up the ANSA Component ....................................................................................... 25 6.2. Set up the ABAQUS Component .................................................................................. 32 6.3. Set up the μETA Component ........................................................................................ 32 6.4. DOE setup .................................................................................................................... 36 6.5. Set up Working Directory .............................................................................................. 38

description

anas

Transcript of Optimization With Isight

Tutorial

OPTIMIZATION

COUPLING ANSA / μETA TΟ Isight

Table of Contents

1. Introduction ..............................................................................................................................2 1.1. Prerequisites...................................................................................................................2 1.2. Problem description ........................................................................................................2 1.3. Data files.........................................................................................................................4

2. Defining the Optimization Task ................................................................................................5 2.1. Design Variables for Morphing Parameters ....................................................................6 2.2. User Scripts ....................................................................................................................9 2.3. Session Commands......................................................................................................11 2.4. The Design Variables Input File....................................................................................13 2.5. The FE output file .........................................................................................................14

3. Run the Optimization Task .....................................................................................................16 4. Set up the ANSA settings.......................................................................................................17 5. Define responses ...................................................................................................................20

5.1. Define the model mass .................................................................................................20 5.2. Define the maximum stress ..........................................................................................21

6. Set up Isight ...........................................................................................................................24 6.1. Set up the ANSA Component .......................................................................................25 6.2. Set up the ABAQUS Component ..................................................................................32 6.3. Set up the μETA Component........................................................................................32 6.4. DOE setup ....................................................................................................................36 6.5. Set up Working Directory..............................................................................................38

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 2 ANSA v.13.1.x

1. Introduction

This tutorial presents the coupling of ANSA and μETA with the Isight optimizer and the use of the Morphing Tool in shape optimization. There are four steps needed to connect ANSA with optimization software. These steps include : Model Definition

Morphing Boxes Morphing parameters

Task Manager sequence definition

Design Variables for Morphing Parameters Script functions Session commands Design Variables and FE Output files

μETA Post-Processor set up

Response extraction Isight set up

Design Variables Responses Objective function Constraints

The definition of the Morphing Boxes and Morphing Parameters (1st step) is not described in this document. The tutorial begins with the Task Manager sequence definition.

1.1. Prerequisites

The user must be familiar with the Morphing Tool functionality of ANSA. ABAQUS solver is used for this tutorial and the model has been prepared to run to this solver. If another solver has to be used, the user must update the model properly. The steps concerning the preparation of the model in ABAQUS are not described. The user should also be familiar with the basic functionality of Isight.

1.2. Problem description

A solid model of a piston Rod will be tested in a simple static load. The goal is to minimize the mass while keeping the maximum stress bellow a specified value.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 3 ANSA v.13.1.x

The design variables that are used, are the relative change of:

- The taper of the piston rod as defined in the picture on the left. (taper)

- The curvature in the middle of pistons’ body (middle_curvature)

- The depth of the defined pocket (pocket_depth)

middle_Curvature

taper

pocket_depth

The resultant force that is applied to the pistons’ small tube is 57.134 kN.

The big tube is considered to be fixed in all 6 deegres of freedom

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 4 ANSA v.13.1.x

The initial mass of the piston rod is 1.2779 kg. A first run of the nominal case gives an estimation of the maximum stress Maximum Stress : 0.1932 kN/mm2

The boundaries for the Design Variables are : 0 <= taper <= 7 0 <= middle_curvature <= 4 0 <= pocket_depth <= 5 The boundary for the constrain is : Max_Stress < 0.17 kN/mm2

The following table summarizes the above information :

Design Variables Min Value Initial Value Max Value taper 0 0 7 middle_curvature 0 0 4 0 0 5 pocket_depth Constraints

Max_Stress - 0.1932 [KN/mm2] 0.17 [KN/mm2] Objective function Mass 1.2779 [Kg]

1.3. Data files

The files of this tutorial are located at the directory where this document is located under the /tutorial_files/. The user should copy these files in the directory where ANSA, μETA and Isight will run. The files are: piston_rod_initial.ansa initial ANSA database piston_rod_abaqus.ansa resulting ANSA database piston_rod_DV.txt design variables file Batchmesh.bs script file max_stress.ses the μETA session file max_stress.ses.results the responses file piston_rod.zmf Isight final project file

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 5 ANSA v.13.1.x

2. Defining the Optimization Task

In this section will be defined the pre-processing sequence that will be connected to the optimizer. 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 of the model, through the modification of the morphing parameters. All these actions take place before the run of the solver. When the sequence runs, the following tasks are executing:

- Reading Design Variable values from an ascii file - Modify the model according to the values of the ascii file - Output the model in ABAQUS format

Open file: piston_rod_initial.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 button of the main menu 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.

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. At this time the Optimization Task is at Definition mode. In this mode the user is able to define and modify the Task. This is the default mode when an Optimization Task is created. To run the Optimization Task the user should switch to the Execution mode. This action is described in a later section.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 6 ANSA v.13.1.x

2.1. Design Variables for Morphing Parameters

Massive definition of Design Variables The taper and pocket_depth design variables will control two morphing parameters each, while the middle_curvature design variable just one. The Morphing Parameters can be massively defined as Design Variables through the PARAMETERS window.

Press the MORPH> CONTROLS>PARAM button to view the already defined Morphing Parameters. In the window that pops up select the taper, middle_curvature and pocket_1_depth morphing parameters and left click on the Assign DV button. Three new design variables are automatically defined in the Optimization Task and connected to the selected Morphing Prameters. Right click in the first design variable which is created by default when a new Optimization Task is defined and delete it.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 7 ANSA v.13.1.x

Define the rest Morphing Parameters as Design Variables

Right click on the PARAMETERS_1 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 PARAMETERS_1 design variable.

Right click on the MORPH PARAMETER Task Item and select Edit

A window containing the already defined Morphing Parameters appears. Select the taper1_auxiliary Morphing Parameter and pick OK to confirm. Now the MORPH PARAMETER Task Item is associated with the taper1_auxiliary Morphing Parameter. The Item’s name is modified accordingly.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 8 ANSA v.13.1.x

Right click to the PARAMETERS_1 Design Variable Item and select the Edit function to define the name, the type and the boundaries of the design variable In the window that pops up 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 0 Current Value 0 Max Value 7 Optionally enter a new name for the Design Variable (taper). Pick OK to accept the settings.

In the same way assign the pocket_2_depth Morphing Parameter to the PARAMETERS_8 Design Variable. The options for the PARAMETERS_8 Design Variable are: Name = pocket_depth (optionally) TYPE = REAL RANGE = BOUNDS. Min Value 0 Current Value 0 Max Value 5 The options for the PARAMETERS_4 Design Variable are: Name = middle_curvature (optionally) TYPE = REAL RANGE = BOUNDS. Min Value 0 Current Value 0 Max Value 4 The Design variables are ready. During the run of the optimization sequence the current values of the design variables will be applied to the associated Morphing Parameters and the model will be morphed accordingly.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 9 ANSA v.13.1.x

2.2. User Scripts

User script function can be added to the optimization sequence to apply a specific operation. The user scripts can be added under a Design Variable Task Item or at the main root of the Optimization Task.

In this example a user script will be added to the main root which will create a tetra volume mesh. The corresponding script is shown bellow: def batchmesh() { 1

2 MESH_TRIA(); MESH_SHELL_MESH_RECONSTRUCT(); MESH_VOLUMEs_MESHV(); } 3 1. Only triangular elements will be generated on

the Macro areas to be meshed. 2. Remeshes an existing mesh in order to

improve the quality of the mesh. 3. Creates a TETRA FEM volume mesh. Right click on the Optimization Task and select New>User Script in the pull-down menu that appears. A new Task Item is defined at the end of the Optimization Task. Drag and drop the new Task Item one step above since this command should be executed before the final output of the FE model. drag

& drop

Right click on the User Script Item and select Edit from the pull-down menu.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 10 ANSA v.13.1.x

The Select script function window appears. Through this window the user can select the script file that will be associated to the Optimization Task. Pick the Load module button to open the file manager and select the script file to be used.

This is the batchmesh.bs that is located in the tutorial folder. The file is considered as a module. This means that every function inside this file will be loaded and will be available for use. The modules are stored in the ANSA database, so they can be used at any time without the need of loading them in every session. From the pull-down menu select the loaded module. All the scripts of the module are listed below. In this example only one user function is available, the batcmesh(). Select the function and press OK to confirm. The selected script is assigned to the User Script task Item. Optionally change the name of the Task Item to volume_mesh by clicking on it twice.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 11 ANSA v.13.1.x

2.3. Session Commands

Session commands can be added to the optimization sequence to apply a specific operation. The session commands can be added under a Design Variable Task Item or at the main root of the Optimization Task. The user can select one of the available session commands which cover a big part of the ANSA functionality.

In this example a session command will be added to the main root which will define a report for the model. Actually the session will invoke the DECK INFO function. The results will be saved in a text file where the optimizer will parse the mass of the model. Right click on the Optimization Task and select New>Session Command in the pull-down menu that appears. A new Task Item is defined at the end of the Optimization Task. Drag and drop the new Task Item one step above since this command should be executed before the final output of the FE model and after the creation of the volume mesh. drag

& drop

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 12 ANSA v.13.1.x

Right click on the Session Command Item and select Edit from the pull-down menu.

In the window that appears are listed all the available session commands. Select the command “DECKINFO:” and press ENTER to confirm. The command appears in the command line below. Enter a relative path and file name for the report file as an argument next to the command.

Optionally change the name of the Task Item to mass_report by clicking on it twice. The Deck Info command will be executed after the morphing of the model according to the defined design variables.

! NOTE: Before running the optimization sequence there is the need to make some adjustments in the ANSA.defaults file in order to correctly define the Deck Info report file. These actions are described in the section 4.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 13 ANSA v.13.1.x

2.4. The Design Variables Input File

The DV File is an ascii file which contains all the data contained in the design variable cards. Through this file, the Optimization Task is connected to the optimizer. When ANSA will be connected to the optimizer the file will be used as input file for the design variable values. In every iteration the optimizer will update the Current Values of each design variable in this file. The Current Values of the design variable cards will be updated with the new values. When the process runs, every action that is defined under any Design Variable Task will be executed using these values.

Right click on the DV File Item and select Edit from the pull-down menu. 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: Even if the input file is defined with an absolute path, Isight will overwrite this path since in every iteration a new directory will be created containing all the data of the experiment. The DV File Task is defined and the path is indicated to the Task Item name. However the file is not yet created and saved. The file will be saved as soon as the user switches from Definition to Execution mode.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 14 ANSA v.13.1.x

The DV File is shown below. # # ANSA_VERSION: 13.1.pre # # file created by A N S A Tue Jul 13 13:10:01 2010 # # Output from: # /home/demo/Desktop/10-optimization_with_Isight/piston_del.ansa #

# DESIGN VARIABLES #--------------------------------------------------------------------------------------------- # ID | DESIGN VARIABLE NAME | TYPE | RANGE | CURRENT VALUE | MIN VALUE --> MAX VALUE | STEP #--------------------------------------------------------------------------------------------- 2, taper, REAL, BOUNDS, 0., 0., 7. 3, middle_curvature, REAL, BOUNDS, 0., 0., 4. 4, pocket_depth, REAL, BOUNDS, 0., 0., 5. #---------------------------------------------------------------------------------------------

Current values

Min values Max values

2.5. The FE output file

A last Task Item of the optimization sequence creates an output of the model in FE format.

Right click on the FE Output Task Item and select the Edit function The OUTPUT DECK window appears. Select the ABAQUS option from the pull-down menu to output the model in this format. Press OK to confirm.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 15 ANSA v.13.1.x

The file manager window opens. Select the working path and the filename for the FE output file and confirm. In this example the name of the file is piston_rod.inp.

! NOTE: Even if the output file is defined with an absolute path, Isight will overwrite this path since in every iteration a new directory will be created containing all the data of the experiment. The OUTPUT PARAMETERS window opens. Select the options for the ABAQUS file and confirm. In this example the user must use the “Visible” option to output only the visible model, since only the solid elements (not the shells ) must be output.

! NOTE: Before running the optimization sequence there is the need to make some adjustments in the ANSA.defaults file in order to correctly define the visible entities. These actions are described in section 4. The FE Output Task is defined and the path is indicated to the Task Item name. However the file is not yet created and saved. The file will be created when the Optimization Task runs in the Execution mode.

The result model is: piston_rod_abaqus.ansa

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 16 ANSA v.13.1.x

3. Run the Optimization Task

Before running the optimization sequence and connect it with the optimizer the user is able to simulate the actions that will take place in each loop. In this way the user can check the model validity for different values of the design variables. The simulate tool can open by right click on the Optimization Task and selecting the Simulate function. For more information about the simulate tool see the section 2.3.2. of the “Optimization_with_ANSA.pdf” located at <ANSA installation directory>/docs/ In addition the user is able to create a Design Of Experiments (DOE). Using this ANSA capability, it is possible to create separate experiments based on user defined values. For more information about the DOE, see the “Optimization_with_ANSA.pdf” located at <ANSA installation directory>/docs/

After the definition and checking of the model for different design variables combinations, the ANSA file should be saved with the Optimization Task in Execution mode. Right click on the Optimization Task and select Edit. The Optimization Task card appears. Switch the Run Mode pull-down menu to Execution. Pick OK to confirm. At this time the DV File is created. In case that the DV File already exists a warning window appears. Pick OK to overwrite the DV File.

NOTES: If the Cancel button is picked, the Optimization Task will remain in Definition mode. This ensures that the Optimization Run won’t run using a not compatible DV File. The Optimization Task is able to switch to Execution mode only if all Task Items are defined properly.

The symbol of the Optimization Task indicates that the current mode is the Execution. Now, save the ANSA file. The model is ready to be connected to the Isight workflow.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 17 ANSA v.13.1.x

4. Set up the ANSA settings

Every time ANSA runs, the default settings are read from the ANSA.defaults and ANSA.xml files. Before connect ANSA with the optimizer the user should ensure that the correct settings will be applied to ANSA when running in batch mode. The visibility of entities to be output and the current deck should be set up.

The ABAQUS file that will be output from ANSA should contain only the Solid elements. For this reason the SOLID entities in the Database Browser should be marked to be visible. Double click on the VOLUME entity in the Database Browser

In the VOLUME list window that pops up right click on the already defined volume. From the pull down menu that appears, select the Mesh>Tetra Fem option in order to create a tetra volume mesh. This action is being made to appear the SOLID entity in the Database browser, in order to select it as visible for the ANSA.defaults file.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 18 ANSA v.13.1.x

Set the visibility of entities - Open the Database Browser and select the entities to be visible.

This change will be saved to the ANSA.defaults file. Set the current Deck - Open ANSA - Switch to ABAQUS Deck This change will be saved to the ANSA.xml file. Set up the Deck Info Report - Activate the D.INFO function from the D.UTIL menu - In the DECK INFORMATION window that appears make active only the “Masses” flag. - Deactivate any other flag of the “Shells” and “Solids” TABS. - Pick OK to proceed.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 19 ANSA v.13.1.x

- The DECK REPORT window appears. - Switch the pull-down menu on the top to the“As Text” option in order to save the report in a text file. - Press ESC to exit the function. Save settings Open the MENUBAR>Windows> Options and pick the Save Settings and Save GUI settings buttons to save the changes to the ANSA.defaults and ANSA.xml files accordingly.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 20 ANSA v.13.1.x

5. Define responses

The constraints and objective parameters needed for the optimization problem can be extracted directly from the result files of the solver. Such values can be for example the stress or strain of selected elements. However when calculations are needed in order to extract the constraints and objective parameters from the result files, μETA Post-Processor can be used. Also parameters that refer to the geometry of the model (for example the mass) can be directly extracted from the ANSA database.

5.1. Define the model mass

Using the already defined Optimization Task and more specific the mass_report Task Item, the model mass will be extracted and saved to the mass.log file. When the Optimization Task runs the text file is created. However, to create the file for the first time before running the whole optimization sequence, the user should use the Update function while the Optimization Task is in Execution mode. This function runs only the selected Task Item so the mass.log file will be created. From this file the optimizer’s file parser can extract the mass of the model. The mass.log file is shown below.

ANSA 's DECK INFORMATION from file: /home/demo/Desktop/10- optimization_with_Isight/NEW/piston_rod_abaqus.ansa

A N S A DECK REPORT MASS INFORMATION TYPE,NET MASS,NSM MASS,TOTAL MASS, SOLIDs,0.0012779,0,0.0012779, TOTAL,0.0012779,0,0.0012779, TOTAL SOLID VOLUME,162790,-,

C.O.G. Cartesian coordinates (x,y,z),-171.922,110.249,-86.6811, INERTIA TENSOR, 0.578389,2.28414e-05,-2.14245e-06, 2.28414e-05,3.70055,-8.92011e-07, -2.14245e-06,-8.92011e-07,4.07304, PRINCIPAL INERTIAS, 4.07304,0,0, 0,3.70055,0, 0,0,0.578389, PRINCIPAL DIRECTIONS, 6.12884e-07,7.31593e-06,1, 2.39428e-06,-1,7.31593e-06, 1,2.3938e-06,-6.12901e-07, NSM MASS PER SUBCASE SUBCASE ID,NSM MASS, COMMON,0, A N S A DECK REPORT

Total Solids Mass

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 21 ANSA v.13.1.x

5.2. Define the maximum stress

As a constraint in the optimization problem will be used the maximum stress of all the elements of the model. For the maximum stress extraction μETA Post-Processor will be used which provides a special tool for the response extraction. This is the OptimizerSetup User Toolbar. This functionality is available since the 6.4.0 μETA version. This tool converts any defined annotation to responses or any curves to histories while defines the needed data for the coupling of μETA Post-Processor to the optimizer. After running the initial model (baseline run) the user can open the solver’s results to μETA and extract the response. Any action that takes place to extract the response is saved to a session file. This file will be used to repeat these actions in every optimization iteration. The actions that needed for this task are described below.

1. Open μETA at the directory where the optimization will be set up. 2. Pick the shown button of the Geometry tab to open the file manager. 3. Read the piston_rod_abaqus.inp file.

2

3

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 22 ANSA v.13.1.x

4. Switch to the Results tab to read solver results. At the Scalar tab select Stresses>Von

Misses>Centroid. Pick the Read button to read the results.

5. Switch to the States tab and select the STEP 1, TIME 1 state. 6. Activate the Fringe flag to visualize the fringes. Optionally right click on the Fringe flag and

activate the on Node option in order for results to be computed on Nodes. 7. Pick the Tools>Annotations of the main menu to open the annotation tool.

4

5

6

7

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 23 ANSA v.13.1.x

8. Pick the New button to create a new annotation. 9. Select the Function on Part option. 10. Select the Node Max Val from the Function field to get

the maximum value of the part. 11. Select the Pick button and select the part from the

screen.

8

9

10

11

12. An annotation is created with the maximum value of the function (val=0.1932). The arrow

points at the node with the maximum stress.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 24 ANSA v.13.1.x

13. Select the User Toolbars>OptimizerSetup from the main menu. The toolbar for response extraction opens.

14. Pick the Add>Pick Annotations and select the defined annotation from the screen.

15. Rename the response if needed. At the relative field enter the name (max_stress) and hit ENTER to confirm. 14

16. Pick the Export Session button to export the response file.

15 16

17. The file manager opens. Enter the response name (max_stress.ses) and confirm.

18

18. Select a path from the imported files that will be identified as the working directory. This is helpful when many solver results have been imported from different locations.

19. Pick OK to confirm. Two files will be created. The max_stress.ses which is the session file of μETA and the max_stress.ses.results that contains the defined responses

6. Set up Isight

In this example a simple DOE task will be defined. The optimization loop will contain: • ANSA for shaping the model • ABAQUS as solver • μETA for response extraction

One Simcode will be defined for each one of the above tasks.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 25 ANSA v.13.1.x

6.1. Set up the ANSA Component

1. Open Isight and pick File>New to create a new DOE component.

1

2

2. Switch to Activities tab and drag and drop a Simcode component on the workflow line. This will be the ANSA component.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 26 ANSA v.13.1.x

3

3. Drag and drop two more Simcode components for the ABAQUS and μETA tasks. The components can be renamed from the Model Selection window.

4

5

4. Double click the ANSA component and switch to the Input tab to define the design variables of the optimization problem.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 27 ANSA v.13.1.x

5. Pick in the middle of the window to create a new Data Source.

6. Select the design variable file and confirm. In this example the file is the DV_file.txt

6

7

8

9

7. The design variable file contains three design variables (taper, middle_curvature, pocket_depth). Select the current value of the taper variable

8. Enter the parameter name at the relative field and 9. Select the Write button. A new Input Parameter is defined.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 28 ANSA v.13.1.x

10. Do the same for the rest design variables.

Switch to the Command tab to define the ANSA command. Switch to the Required Files sub-tab. One File Parameter for the design variables file is already defined.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 29 ANSA v.13.1.x

11

12

13

11. Create a new File Parameter for the ANSA file. The File Parameter will be of type Input. Pick the relative button to define the parameter.

12. Pick the file browser button and at the window that appears select the ANSA file. 13. Since the initial ANSA file will be used for all the optimization iterations the path should be

absolute.

14

15

16

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 30 ANSA v.13.1.x

14. Switch to the Basic sub-tab to enter the ANSA command. This command will do the following:

- Invoke ANSA in batch mode. - Open the ANSA file - Read the design variables file. The optimizer updates this file in every iteration. - Runs the Optimization Task. - Creates an output for ABAQUS. - Creates a report for the model mass.

15. Enter the following command at the Command Line field ansa –nogui –foregr –i ANSA_MODEL –exec’InputDV(“DV_file_txt”); FEOutputName(“piston_rod.inp”); RunAllTasks();’ where ansa the ANSA command 16. Enter the File Parameters for the ANSA model and design variable file by selecting the

already defined parameters

17

18

In this example the mass of the model is used as response (objective function). A text file containing the mass value is created by the Optimization Task of ANSA. This file is updated in every optimization iteration when the Optimization Task of ANSA runs.

17. Switch to the Output tab. 18. Pick in the middle of the window to create a new Data Source. The Exchanger Wizard

opens.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 31 ANSA v.13.1.x

19. Select the mass report file and confirm. In this example the file is the mass.log.

20. Select the value of the total mass.

20

21

22

23

21. Enter the parameter name at the relative filed. 22. Select the Read button. A new Output Parameter is defined. 23. Pick OK to confirm and exit from the ANSA component.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 32 ANSA v.13.1.x

6.2. Set up the ABAQUS Component

24

25

24. Double click the Solver component. At the window that appears switch to the Command>Basic tab.

25. Enter the command for ABAQUS at the Command Line field. In this example the job name is piston_rod.

6.3. Set up the μETA Component

27

28

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 33 ANSA v.13.1.x

At the μETA Component the user will define the responses of the optimization problem. 26. Double click on the μETA Component to open the Component Editor. 27. Switch to the Output tab. 28. Pick in the middle of the window to create a new Data Source. The Exchanger Wizard

opens.

29

29. Select the responses file that is defined in μETA. In this example the file is the responses.ses.results and it contains the value of the maximum stress of the model.

30

31

32

33

30. Select the value of the maximum stress. 31. Enter the parameter name at the relative filed. 32. Select the Read button. A new Output Parameter is defined. 33. Pick OK to confirm and exit from the μETA Component.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 34 ANSA v.13.1.x

Switch to the Command tab to define the μETA command. Switch to the Required Files sub-tab. One File Parameter for the responses file is already available as soon as the file is imported to the parser.

34. Create a new File Parameter for the μETA session file. The File Parameter will be of type

Input. Pick the relative button to define the parameter. 35. Pick the file browser button and at the window that appears select the μETA session file.

In this example the session file is the responses.ses. Since a unique session file will be used for all iteration the path should be absolute.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 35 ANSA v.13.1.x

36. Switch to the Basic sub-tab to enter the μETA command. This command will do the

following: - Invoke μETA in batch mode. - Reads solver results. - Extracts responses and saves them at the responses.ses.results file.

37. Enter the following command at the Command Line field meta –b –foregr –s session_file “./” “responses_ses_results” where meta the μETA command 38. Enter the File Parameters for the session file and responses file.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 36 ANSA v.13.1.x

39. Switch to the Advanced sub-tab and de-activate the three flags as shown at the picture

above.

6.4. DOE setup

40. Set up the parameters for the DOE. In this example the Latin Hypercube technique is

used.

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 37 ANSA v.13.1.x

41. Set up the bounds of the design variables to define the design area.

42. Set up the parameters for Post Processing

OPTIMIZATION – Coupling ANSA / μETA to Isight

BETA CAE Systems S.A. 38 ANSA v.13.1.x

6.5. Set up Working Directory

43

43. To run the optimization problem properly the user needs to define the directory where all

actions will take place. To set up the working directory pick with the right mouse button one of the defined Components and select the Properties function. At the window that appears define the “Runtime folder”. DO THE SAME FOR ALL COMPONENTS AND ENTER THE SAME WORKING DIRECTORY.