Optimization of crane hook META integrations · a) Select project / DV file generated by ANSA b)...

Post on 07-Mar-2020

7 views 0 download

Transcript of Optimization of crane hook META integrations · a) Select project / DV file generated by ANSA b)...

1

Tutorial

optiSLang

Optimization of crane hook –ANSA & METAintegrations

2ANSA & META

Tutorial optiSLang © Dynardo GmbH

Problem definition

• Structural optimization of the crane hook

• 4 design variables (morphing parameter)

• Static analysis of the crane hook geometry using MSC Nastran

• Optimization criteria

Outer width

Section A Section B

Section C

morphing box & desgin variables

20 kN

Max von Mises stress

Boundary conditions for static analysis

𝑚 → min

maxi

𝜎𝑉𝑀𝑖 ≤ 0.4𝑘𝑁/𝑚𝑚2

𝜎𝑉𝑀𝑖 : nodal von Mises stress

3ANSA & META

Tutorial optiSLang © Dynardo GmbH

I. Prepare the ANSA model & Optimization task:(see ANSA tutorials, e.g. tutorials/tutorials-morph_optimization/optimization_with_ANSA_META.pdf)

a) Prepare geometry and setup boundary conditions b) Create morphing boxes c) Define the design variables and setup optimization task

1. Open task manager

3. Define location of the reference DV file

4. Define optimization variables

2. Switch to “Definition” mode

5. Define FE output file & output deckinfocontaining mass information

4ANSA & META

Tutorial optiSLang © Dynardo GmbH

Reference value and ranges for the design variables can already be defined in ANSA

5ANSA & META

Tutorial optiSLang © Dynardo GmbH

Switch to “Execution” mode

6ANSA & META

Tutorial optiSLang © Dynardo GmbH

II. Define response values with META post:(Load simulation results from baseline geometry)

a) Load geometry b) Load result values

1.2.

3.

4.

5.

1. 2.

3.

4.

5.

7ANSA & META

Tutorial optiSLang © Dynardo GmbH

c) Calculate maximum nodal stress

1. Switch to last time step

2. Fringe: show stress values for each node

3. Create annotation

4. Choose function

5. Pick solid part

8ANSA & META

Tutorial optiSLang © Dynardo GmbH

d) Define response & export session file

1. Open OptimizerSetup Dialog (User Toolbars/Optimization)

2. Add annotation as response (area select annotation & confirm with middle mouse button)

4. Export session to session file, e.g. META_post.ses

3. Optionally give the response a proper name

9ANSA & META

Tutorial optiSLang © Dynardo GmbH

• hook.ansa: ANSA project file

• hook.nas: FE output file / Nastran deck file

• hook.op2: Result of the finite element analysios of the baseline hook geometry

• mass.txt: Results from exporting deck info of the base geometry containing mass information

• hook_DV.txt: ANSA Design variables and optimization task definition

• hook_META_resp.ses: Meta-post session file to extract max stress response

• hook_META_resp.ses.results: Meta-post results containing max stress value of the baseline geometry

III.Setup of the baseline optiSLang workflow:

a) Summary of the baseline files

10ANSA & META

Tutorial optiSLang © Dynardo GmbH

b) Setup of the ANSA pre-processing using optiSLang solver Wizard:

2. Create new system withANSA wizard

1. Start optiSlang and createnew empty project

11ANSA & META

Tutorial optiSLang © Dynardo GmbH

3. Follow wizard instructions

a) Select project / DV file generated by ANSA b) Select ANSA executable (only once)

c) Select FE output / Nastran deck file d) Select response file from ANSA –if you don‘t have a response file press Cancel

12ANSA & META

Tutorial optiSLang © Dynardo GmbH

Baseline parametric system generated by the wizard

The design variables are read from the DV file and together with the range and reference values registered as parameter on the parametric system

Optionally change the name of the system, e.g., to “Hook”

13ANSA & META

Tutorial optiSLang © Dynardo GmbH

4. Register mass as response value

a) Enable advanced settings and change delimiter from space to comma

14ANSA & META

Tutorial optiSLang © Dynardo GmbH

b) Select response value

d) Use as responsec) Specify variable name

15ANSA & META

Tutorial optiSLang © Dynardo GmbH

Optionally edit ANSA run script, e.g., modify license server settings, change FE output file or change number of max parallel ANSA calls.

16ANSA & META

Tutorial optiSLang © Dynardo GmbH

c) Setup of the META post-processing using optiSLang solver Wizard:

2. Add post-processing nodesusing OSL META post wizard

1. Drag and drop the solver wizard into the “Hook“ system

17ANSA & META

Tutorial optiSLang © Dynardo GmbH

3. Follow wizard instructions

a) Select META-post session file b) Select META-post executable (only once)

c) Select session output / response file

18ANSA & META

Tutorial optiSLang © Dynardo GmbH

Updated baseline parametric system

Responses that are written to the META default response file format are automatically registered on the parametric system

4. Re-name the respone(alterantively change thename in META post)

19ANSA & META

Tutorial optiSLang © Dynardo GmbH

d) Add solver node:

1. Drag and drop solver node into the system: we use a bash script node to call Nastran (to rename the node, once selected, press F2)

Leave the “Initialize Integration“ dialog as is and conform with ok

20ANSA & META

Tutorial optiSLang © Dynardo GmbH

2. Edit bash script to run NASTRAN

21ANSA & META

Tutorial optiSLang © Dynardo GmbH

3. Connect solver node:

a) Connect slot ANSA oDesign withNASTRAN iDesign

b) Connect slot NASTRAN oDesign withMETA iDesign

22ANSA & META

Tutorial optiSLang © Dynardo GmbH

4. Re-align nodes & press play to run the baseline system:

a)b)

23ANSA & META

Tutorial optiSLang © Dynardo GmbH

5. Verify the results: double click on the Hook system and change to “Result designs” tab

24ANSA & META

Tutorial optiSLang © Dynardo GmbH

IV. Setup optimization task with Evolution Strategy:

1. Drop the Optimization wizard onto the Hook system

25ANSA & META

Tutorial optiSLang © Dynardo GmbH

2. Define the optimization parameter (we use parameter ranges as is, as defined in ANSA)

3. Define optimization criteria:a) objective: minimize mas b) Less than constraint:

max_stress <= 0.4

26ANSA & META

Tutorial optiSLang © Dynardo GmbH

4. In the last steps of the wizard select the optimization method: Evolutionary Algorithm

5. Leave additional options as is

27ANSA & META

Tutorial optiSLang © Dynardo GmbH

6. EA settings: Open the settings dialog of the EA and change to “local” predefined settings in the “Other” tab to run a local search strategy

28ANSA & META

Tutorial optiSLang © Dynardo GmbH

7. Run the optimization

29ANSA & META

Tutorial optiSLang © Dynardo GmbH

Once finished, optiSLang post-processing will open up for analyzing the optimization history. By default the best design from the optimization is pre-selected.

30ANSA & META

Tutorial optiSLang © Dynardo GmbH

a) Baseline hook geometry b) optimized hook geometry

Comparison of the baseline and optimized hook design using META post

<0.4 <0.4 Mass: -10.8%