tosca topo

20
A SA v.13.x Optimization with A SA N N BE A CAE Systems S.A. 1 T Tutorial OPTIMIZATION WITH TOSCA TOPO OPTIMIZATION Table of Contents 1. Introduction .........................................................................................................................................2 1.1. Prerequisites ...............................................................................................................................2 1.2. What is the Topology optimization ..............................................................................................2 1.3. The Model ...................................................................................................................................3 1.4. Optimization Task .......................................................................................................................4 1.5. Data files .....................................................................................................................................4 2. Recipe ................................................................................................................................................5 3. Preprocessing.....................................................................................................................................6 4. Start Optimization .............................................................................................................................13 5. Postprocessing - Viewing the intermediate results using TOSCA.post .............................................13 6. Result Transfer and Validation Run ..................................................................................................14 6.1. Generating the surface using TOSCA.smooth ..........................................................................14 6.2. Modifying the surface using RECONSTRUCT ..........................................................................15 6.3. Remeshing the model ...............................................................................................................15 6.4. Saving the resulting model in solver format ..............................................................................16 6.5. Running the solver with the new model ....................................................................................16 7. Result Discussion .............................................................................................................................17

Upload: kathirqwerty123

Post on 08-Nov-2014

72 views

Category:

Documents


0 download

DESCRIPTION

ansa

TRANSCRIPT

Page 1: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 1 T

Tutorial

OPTIMIZATION WITH TOSCA

TOPO OPTIMIZATION

Table of Contents

1. Introduction.........................................................................................................................................2 1.1. Prerequisites...............................................................................................................................2 1.2. What is the Topology optimization ..............................................................................................2 1.3. The Model...................................................................................................................................3 1.4. Optimization Task .......................................................................................................................4 1.5. Data files.....................................................................................................................................4

2. Recipe ................................................................................................................................................5 3. Preprocessing.....................................................................................................................................6 4. Start Optimization .............................................................................................................................13 5. Postprocessing - Viewing the intermediate results using TOSCA.post.............................................13 6. Result Transfer and Validation Run..................................................................................................14

6.1. Generating the surface using TOSCA.smooth..........................................................................14 6.2. Modifying the surface using RECONSTRUCT..........................................................................15 6.3. Remeshing the model ...............................................................................................................15 6.4. Saving the resulting model in solver format ..............................................................................16 6.5. Running the solver with the new model ....................................................................................16

7. Result Discussion .............................................................................................................................17

Page 2: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 2

1. Introduction

This tutorial presents the set up of a simple Topo optimization task using TOSCA Structure Optimizer and the TOSCA Environment of ANSA.

1.1. Prerequisites

- The user should be familiar with the basic functionality of ANSA and TOSCA Structure. - In this tutorial the NASTRAN solver is used 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.

1.2. What is the Topology optimization

At the beginning of the conventional design process the design engineer defines the shape and the topology of new components using the experience and the results gained from the forerunner. This results in an evolution process which might lead to an optimum design after some iterations and a long period of time. Nowadays, it is necessary to shorten the development process of new components. Therefore tools are necessary that replace the natural evolution process by an automatic procedure. With TOSCA Structure it is possible to carry out topology and shape optimization in the CAE environment. Topology optimization is a tool to generate a design proposal and is often used within the concept finding for a new component. Starting with the design area which is the maximum allowed area for the component and with the boundary conditions, such as loads, fixtures and manufacturing conditions, the optimization system will determine a new material distribution by removing material from the design area. This design proposal fulfills all mechanical requirements and represents a weight-optimal design proposal. For the optimization the following constraints and objectives can be realized: • stiffness (compliance and displacements) • eigenfrequencies • internal and reaction forces • dynamic compliance • dynamic displacements, velocities and accelerations • weight, volume • center of gravity • moment of inertia

T

Page 3: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 3

In addition, a number of manufacturing constraints can be applied so that the design proposal can be produced with casting or stamping. For this casting constraints, member size constraints, freezing, symmetry and coupling constraints can be defined. As result the optimization system creates a design proposal with the information where the material has to be positioned. This design proposal has to be interpreted and be used for the more detailed analysis. For supporting this step, the TOSCA Structure system supports the generation of a verification model within ANSA. This means a new model based on the results of the topology optimization can be created easily without the necessity of applying the loads and boundary conditions to the verification model. All loadcases and boundary conditions of the optimization model are transferred automatically to the verification model. With the results of the verification run it is possible to perform a normal FE postprocessing step within the postprocessing environement suitable for the relative solver. Alternatevely, a CAD model can be generated which then can be transferred back to the CAD system.

1.3. The Model

The model for the topology optimization was modified in such a way that the inner areas of the component are filled with elements to create a design area. In that area, the optimization system can remove or rearrange elements for getting a better solution with lower weight and the same mechanical behavior. The start model for the optimization represents a design of a control arm for a car. The component has to be manufactured by forging and consists of aluminum.

The red areas of the component are not free for the optimization because they are used for the fixtures and for the load application. One red area is used for the mounting of a sensor for the headlight range adjustment. The fixture is realized with spring elements on the right upper red area. The springs represent a rubber bearing. The left bearing is fixed in all three translation degrees of freedom. As loading, a force is applied in the center of the lower bearing. Due to symmetry reasons only one half of the model is meshed so the symmetry plane is fixed in z-direction for ensuring the symmetry condition.

Optimization model representing the design area of the model.

T

Page 4: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 4 T

1.4. Optimization Task

The optimization task is to find a structure with the maximum stiffness for the component with a volume or weight restriction. This represents the most common standard optimization task for the topology optimization. The value to be optimized is the compliance which is the reciprocal value of the stiffness. The compliance is represented as the sum of the strain energy of the complete model. This value has to be minimized. The constraint is the weight or volume constraint which is defined to be 57% of the initial volume/ weight of the structure. As manufacturing constraint a casting/forging constraint has to be defined. The idea of the constraint is to ensure that the created structure of the topology optimization has no undercuts and can be demolded (or removed from the forging die).

1.5. Data files

The files of this tutorial are located in the directory /ANSA-installation-directory/docs/tutorials/MORPH_OPTIMIZATION/tosca_topo/tutorial_files The file is: Control_arm_tosca_env.bdf initial FE-model in NASTRAN format Note: in case another solver is needed to be used,the appropriate input files are also located in the same path.

Page 5: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 5 T

2. Recipe

If you have never worked with ANSA-TOSCA Environment before, skip this summary and go directly to the detailed description. If you do have some experience with ANSA-TOSCA Environment you can try to generate your parameter file just using the recipe summary. Recipe summary Preprocessing 1. Load the ANSA-TOSCA Environment Task in Task manager: Tasks> TOSCA Structure Task> TOPO_CONTROLLER. 2. Input file: PRE_PROCESSING> MODEL_LINK(NASTRAN)> New> FILE PRE_PROCESSING> MODEL_LINK>FILE> Update 3. Design area: PRE_PROCESSING> TOPOLOGY_OPTIMIZATION_CONTROLLER> DESIGN_AREA> Edit 4. Design constraints: PRE_PROCESSING> TOPOLOGY_OPTIMIZATION_CONTROLLER> DESIGN_AREA> DV_CONSTRAINTS 5. Objective function: PRE_PROCESSING> TOPOLOGY_OPTIMIZATION_CONTROLLER> OBJECTIVE_FUNCTION 6. Constraints: PRE_PROCESSING> TOPOLOGY_OPTIMIZATION_CONTROLLER> CONSTRAINTS 7. Saving TOSCA Structure parameter file: PRE_PROCESSING> TOPOLOGY_OPTIMIZATION_ CONTROLLER> Output Start Optimization 8. Running TOSCA Structure: START_OPTIMIZATION> RUN Postprocessing 9. Viewing the intermediate results: POST-PROCESSING> GENERATE_POST_FILE Result Transfer and Validation Run 10. Smooth surface: SMOOTH> SMOOTH_INSTANCE> RUN_SMOOTH 11. Modified surface: SMOOTH> SMOOTH_INSTANCE> VALIDATE> BATCH_RECONSTRUCT 12. Remeshing: SMOOTH> SMOOTH_INSTANCE> VALIDATE> SOLID_MESH 13. Saving the result: SMOOTH> SMOOTH_INSTANCE> VALIDATE> VALIDATION_OUTPUT 14. Running the solver: SMOOTH> SMOOTH_INSTANCE> VALIDATE> VALIDATION_RUN Please note that TOSCA Structure 7.0 is required in order to complete the optimization task. With previous versions of TOSCA Structure some changes may be necessary to achieve the same result.

Page 6: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 6

3. Preprocessing

Step 1 - Choice of the optimization type

T

1. If the Task Manager is not already activated,

click the 1

symbol, in order to activate it Task Manager appears in the left side of ANSA interface. 2. In the Task Manager window, select Tasks>

TOSCA Structure Task>TOPO_CONTROLLER 2

3. In the Task Manager window, select View> Expand in order to view the Task, expanded 3

The TOPO_CONTROLLER Task appears automatically. It contains the below main Task items, which are later described, in detail: • PRE-PROCESSING

prepare the model and define the design area, the objective function and the constraints

• CHECK INPUTS define some checks, if needed

• START OPTIMIZATION run the optimization Task

• POST PROCESSING view results

• SMOOTH create the smooth surface and set up the validation model

Page 7: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 7

Step 2 - Loading the input model file

T

1. Press right mouse button on the MODEL_ LINK

Task item 2. Select Edit 3. In the WORKING DECK window, that appears,

choose the solver that matches the input file (NASTRAN in this example) and pick OK 1

4 NOTE: These steps are not needed if the correct solver is already chosen in MODEL_LINK Task item. 3 4. Right click on the FILE Task Manager item 5. Select Edit

6. In the Open window, navigate and choose the

input file : /ANSA-installation-directory /docs/tutorials/MORPH_OPTIMIZATION/ tosca_topo/tutorial_files/mscnastran/Control_arm_tosca_env.bdf

7. Click Open. The FILE Task item gets renamed automatically 7

Simultaneously, the selected path is indicated just after the PRE-PROCESSING Task item.

8. Right click the FILE Task item 9. Select Update

8 The input file is loaded and the model is shown in the main window.

9

Step 3 - Choice of the design area In topology optimization, the design area denotes the set of elements that may be removed during the optimization, in contrast to the frozen areas that remain unchanged. 1. Right click on the DESIGN_AREA Task item 2. Select Edit

2

Page 8: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 8

3. In the DV_TOPO window that appears, enter the EL_GROUP (Element Group) field and select the GROUP_DEF (Group Definition) option from the relative dropdown menu 4

The text-field GROUP_DEF appears automatically.

3 4. Enter this field and press the "?" key

5. In the appeared GROUP_DEF HELP window,

right click on the empty area and press NEW

5

6. Automatically, the Modifying SET window

appears, listing all entities of the ANSA database. In fact, an empty SET has been created automatically and the user is prompt to place entities in it

6

7 7. Pick the ELEMENT entity category Now, the design group can be defined using the mouse.

T

8. First, select the whole model with left mouse button box selection 9. Deselect the 4 areas shown in the figure with right mouse box selection. It is recommended to

rotate the model in plane and zoom in/out to make selection more accurately 10. Press middle mouse button to confirm the selection

9 8

Page 9: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 9

11. Optionally, enter the desired group name (my_design_group) in SET window and pick OK

11

12. Back in GROUP_DEF HELP window, double

click on the group that have just been created The window will close then.

x2

The defined group fills the GROUP_DEF field of the DV_TOPO window 13. Pick OK to confirm

Step 4 - Choice of the design constraintsDesign contstraints introduce restrictions on the shape of the optimized model. Besides the demolding constraint discussed below, other types of design constraints such as symmetry and member size restrictions are supported by TOSCA. 1. Right click on the DV_CONSTRAINTS Task

item under the DESIGN_AREA 1

2. Select New> DEMOLD_CONTROL

2

T

Page 10: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 10

3. In DEMOLD_CONTROL window that appears, choose GROUP_DEF from the dropdown list below the EL_GROUP field 4

4. Enter a "?" at the GROUP_DEF field 3

5. In the GROUP_DEF HELP window that

appears, double click the previously defined my_design_group item.

The window automatically closes.

X2

6. Repeat the same steps in order to fill in the

CHECK_ GROUP field as well

The Element Set “my_design_group” is now used in both EL_GROUP and CHECK_GROUP fields.

7

7. In the same window enter the values 0, 0, 1 in the PULL_DIR_1, PULL_DIR_2 and PULL_DIR_3 fields, respectively. These values are the components of the pull direction needed for the definition of the demolding constraint

6

8 8. Press OK

Step 5 - Choice of the objective function1. Right click on the OBJECTIVE_FUNCTION

Task item

T

2. Select New> COMPLIANCE 1

2

Page 11: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 11

The relative card appears 3. Press OK. The desired Task item has been

added just below the OBJECTIVE_FUNCTION

3

4. Right click on the OBJECTIVE _FUNCTION Task item again

5. Select Edit 5

6. In the window that appears, select ‘‘MIN’’ in the TARGET pull down menu

7. Press OK The word MINIMIZE is automatically placed after the OBJECTIVE_FUNCTION item. 6 Note : Although no changes are needed, since TARGET field has already been set to the correct value (MIN), this step is required in order to proceed.

7

Step 6 - Choice of the constraintsConstraints are equations or inequations that are maintained by TOSCA during the optimization 1 1. Right click on the CONSTRAINTS Task item 2. Select New> VOLUME_CONSTRAINT

2

T

Page 12: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 12

3. The CONSTRANT_ITEM window appears. Switch the MAGNITUDE pull-down menu to REL (relative) and enter the value 0.57 in the VALUE field

3 Thus, the volume constraint is defined to be 57% of the initial volume of the structure. 4. Press OK

4

Step 7 - Saving TOSCA Structure parameter fileThe TOSCA Structure parameter file contains ASCII commands which define all settings for the optimization task. 1 1. Right click on the Output item 2. Select Update. The parameter file for TOSCA

Structure is written at this point. The file is saved in the same directory where the input model is located and is called Output.par. TOSCA will also run in this directory

2

T

Page 13: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 13

4. Start Optimization

1. Right click on the RUN Task item under START_OPTIMIZATION

2. Select Update 1 TOSCA Structure starts in background. Wait until it finishes.

5. Postprocessing - Viewing the intermediate results using TOSCA.post

T

Using TOSCA.post, the intermediate results of topology optimization, namely the densities of individual elements, can be visualized. This subsection is optional. 1. Right click on the POST_FILE Task item under

GENERATE_POST_FILE 2. Select Update

3. Right click VTF_VISUALIZATION Task item under GENERATE_POST_FILE

4. Select Update The generated VTF file containing the original (non-smoothed) optimization result will open in TOSCA.view.

5. Close the TOSCA.view window in order to proceed

1

2

4

2

3

5

Page 14: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 14

6. Result Transfer and Validation Run

6.1. Generating the surface using TOSCA.smooth

TOSCA.smooth generates the surface of the material remaining after the topology optimization and improves the surface quality. 2 1. Right click on the RUN_SMOOTH item under

SMOOTH_ INSTANCE 2. Select Edit

3. Pick OK in the window that appears

73

4. Right click on the RUN_SMOOTH item under SMOOTH 4 5. Select Update

5 TOSCA Structure.smooth will start in background.

When finished, the triangular surface generated is loaded and shown in place of the initial model, as shown in the picture below.

T

Page 15: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 15

6.2. Modifying the surface using RECONSTRUCT

1. Right click on the BATCH_RECONSTRUCT Task item under VALIDATE

2. Select Edit 1

The RECONSTRUCT PARAMETER window appears. 3. Uncheck the Preview flag button 4. Check the Automatic feature line recognition at

SMOOTH_CUT_ELEMENTS area flag 3

5. Press OK

4

5

6. Right click BATCH_RECONSTRUCT item 7. Select Update 6 BATCH_RECONSTRUCT generates a new, more regular triangular surface that can be used for the remeshing of the volume with tetrahedral. 7

6.3. Remeshing the model

1. Right click on the SOLID_MESH item under VALIDATE

2. Select Update

1 2

Some times after SOLID_MESH starts, the PROPERTIES window appears. 3. Double click the first (and only) line in the list, in

order to select the existing Property for the solid elements

x2

The list closes automatically and SOLID_MESH resumes. When it finishes, a new tetrahedral mesh will appear in addition to the triangular surface.

T

Page 16: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 16

6.4. Saving the resulting model in solver format

1. Choose the file name for the output model to be saved in the format of the used solver

2. Click Save

2

1

3. Right click the item with the chosen file name under VALIDATE

4. Select Update

3

4

6.5. Running the solver with the new model

1. Right click on the VALIDATION_RUN Task item

T

2. Select Update 1 2 Then, the solver will start in the same folder where the output file has been saved NOTE: To run the VALIDATION RUN the solver command should be defined at the ANSA.defaults or TOSCA.defaults file. To setup the solver command refer to the ANSA v13.x Set-Up Guide section 7.

Page 17: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 17

7. Using existing result files

7.1. Postprocessing, Viewing the intermediate results

ANSA TOSCA structure gives the opportunity to view intermediate results using already existing result files. 1. Right click on the POST_FILE item under

GENERATE_POST_FILE 1 2. Select Edit

3. In the window that appears

73

4. Right click on the RUN_SMOOTH item under SMOOTH 4 5. Select Update

5 TOSCA Structure.smooth will start in background.

When finished, the triangular surface generated is loaded and shown in place of the initial model, as shown in the picture below.

T

Page 18: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 18

8. Result Discussion

The topology optimization created a new design proposal for the control arm component. The result of the topology optimization has to be discussed in several ways. First of all the optimization result has to be checked. This can be done with viewing the convergence plot and with checking the TOSCA.OUT file for warnings and errors. If there is a critical error during the optimization, the optimization loop will be stopped. In other cases (if some results are missing) the optimization system will continue but the result may be not sufficient. Second, the resulting model and the finite element analysis of the model has to be checked if the displacements, the stresses and all other finite element related information are suitable. Initial model (complete distributed)

model with 57% of material homogeneously Final model Result

Strain Energy 1645850 425093.5 Table 1 Result comparision For this optimization task the stresses are in the same range compared to the initial model but the stiffness of the structure is higher and the material amount necessary for the structure is lower. The values to be compared are the volume or weight of the structure and the sum of the strain energy. The strain energy is the measure for the compliance which is the reciprocal value of the stiffness.

Von Mises stresses of optimized structure. After checking the results, the remaining structure can be passed to the design department as a CAD model to be used as design proposal for the fine tuning of the design. If the stresses within the component are not below the allowed range, the shape optimization of TOSCA Structure (TOSCA Structure shape) will be able to remove the stress peaks so that the component will be suitable from the mechanical point of view.

T

Page 19: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 19

Optimization result represented as IGES surface The results can be transferred as surfaces in STL format or IGES format. Another way to transfer less data is to export the results as slices.

Optimization result represented as slices For sharing the result and the animation with colleagues or partners the VTF format is comfatable way. This result format is able to contain a full 3D animated model with the optimization history. The model can be rotated and zoomed during the animation. The viewer is available for free for different platforms and there is also a possibilty to include the files into HTML-pages and into Powerpoint presentations.

T

Page 20: Tosca Topo

A SA v.13.x Optimization with A SA N N

BE A CAE Systems S.A. 20

Material distribution after topology optimization

T