PDF

Bracket — Topology Optimization
Introduction
Topology optimization in a structural mechanics context can answer the question: Given that you know the loads on the structure, which distribution of the available material maximizes stiffness? Or, conversely, how much material is necessary to obtain a predefined stiffness, and how should it be distributed? Such investigations typically occur during the concept design stages.
The conflicting goals of stiffness maximization and mass minimization lead to a continuum of possible optimal solutions, depending on how you balance the goals against each other.
This topology optimization example demonstrates how to use a penalization method (SIMP) to obtain an optimal distribution of a fixed amount of material such that stiffness is maximized. Changing the amount of material available leads to a different solution which is also Pareto optimal, representing a different balance between the conflicting objectives.
The various examples based on a bracket geometry form a suite of tutorials which summarizes the fundamentals when modeling structural mechanics problems in COMSOL Multiphysics and the Structural Mechanics Module. This example also requires the Optimization Module.
Model Definition
The model shows how to determine the optimal material distribution in a bracket geometry. The bracket is symmetric about the plane x = 0 and is made of a linear elastic material, structural steel.
It is optimized in two load configurations: First a single load case, which gives rise to an asymmetric design with two poorly connected halves. In a second analysis, eight load cases are used (two load groups times four constraint groups). This results in a symmetric design with a stronger connection between the two halves.
The original geometry, which can be considered as the design space, is imported as a geometry sequence (Figure 1).
Figure 1: The computational domain of the bracket is partitioned, so that the circles around the holes can be excluded from the design space.
The optimality criterion is defined by the objective function, which is chosen to be the total strain energy in this example. Note that the strain energy exactly balances the work done by the applied load, so minimizing the strain energy minimizes the displacement induced at the points where loads are applied, effectively minimizing the compliance of the structure — maximizing its stiffness. The other, conflicting, objective is minimization of total mass, which is implemented as an upper bound on the mass of the optimized structure.
To regularize the problem we introduce a minimum length scale via a filter radius in a Helmholtz filter. See the Topology Optimization of an MBB Beam example for illustrations of this process. Ideally, the topology of the resulting designs should be mesh independent and for designs with moderate complexity this can be achieved. If the optimal design is very complex, other designs with slightly different topologies perform only marginally worse, so the optimization problem has many local minima, and it is likely that a slightly suboptimal design is identified. To reduce the probability of this happening, the model is solved using continuation in the SIMP exponent and the projection slope, that is, a sequence of optimization problems are solved. One optimization result is thus used as the initial guess of the next. This is achieved by combining a Parametric Sweep and an Optimization study step.
Results
The result of the optimization with one load case is shown in Figure 2.
Figure 2: A filtered volume plot, colored with the displacement magnitude. Only a single load case is considered, so the design becomes asymmetric and the two halves are poorly connected.
When eight load cases are considered, the optimization instead results in the design displayed in Figure 3.
Figure 3: When eight load cases are considered, the design becomes symmetric, and the connection between the two halves is stronger when compared to the single load case.
The following plot shows the displacement field for the optimized solution after the geometry has been transferred to another component via a Filter dataset.
Figure 4: A plot of the displacement field for the optimized design after it has been transferred to another component using a Filter dataset, a mesh part and a Import geometry feature. The hole furthest away from the camera is unconstrained for Load case 1.
Notes About the COMSOL Implementation
This example demonstrates a strategy based on using the MMA solver with a limited number of iterations. The filtered variable is solved on a finer mesh to get a smooth design for postprocessing.
The example makes use of box selections for imposing the boundary conditions on the imported geometry. This can be a significant time saver in the context of topology optimization, because many designs with similar boundary conditions can quickly be generated and tested against each other.
This model demonstrates how to export all domains together. This simplifies the import, but the Mesh part describes curved boundaries with flat triangles, so the hole geometry will be affected in this process, which might affect a contact analysis.
The control variable field, Helmholtz filter and SIMP penalization are defined through the use of a topology optimization feature. A Solid Mechanics interface represents the structural properties of the bracket, while an Optimization study step allows adding the objective and the constraints for the optimization problem. The elastic strain energy density is a predefined variable, solid.Ws, available to use as the objective function for the optimization problem.
In this example the solver settings are changed slightly from their default values, in order to speed up the solution:
Finally, it is worth noting that the problem of finding a stiff design can be quite different from finding a design that does not fail, and it is generally advised to use shape or parameter optimization to ensure that the design is free of excessive stress concentrations.
References
1. B.S. Lazarov and O. Sigmund, “Filters in topology optimization based on Helmholtz-type differential equations,” International Journal for Numerical Methods in Engineering, vol. 86, pp. 765–781, 2011.
2. F. Wang, B.S. Lazarov, and O. Sigmund, “On projection methods, convergence and robust formulations in topology optimization,” Structural and Multidisciplinary Optimization, vol. 43, pp. 767–784, 2011.
3. M.P. Bendsøe, “Optimal shape design as a material distribution problem,” Structural Optimization, vol. 1, pp. 193–202, 1989.
Application Library path: Optimization_Module/Topology_Optimization/bracket_topology_optimization_stl
Modeling Instructions
From the File menu, choose New.
New
In the New window, click  Model Wizard.
Model Wizard
1
In the Model Wizard window, click  3D.
2
In the Select Physics tree, select Structural Mechanics>Solid Mechanics (solid).
3
Click Add.
4
Click  Study.
5
In the Select Study tree, select Preset Studies for Selected Physics Interfaces>Optimization>Topology Optimization, Stationary.
6
Global Definitions
Parameters 1
1
In the Model Builder window, under Global Definitions click Parameters 1.
2
In the Settings window for Parameters, locate the Parameters section.
3
Click  Load from File.
4
Geometry 1
Create the geometry. To simplify this step, insert a prepared geometry sequence.
1
In the Geometry toolbar, click  Insert Sequence.
2
3
In the Geometry toolbar, click  Build All.
4
Click the  Zoom Extents button in the Graphics toolbar.
The geometry should now look like that in Figure 1.
5
In the Model Builder window, collapse the Geometry 1 node.
Global Definitions
Geometrical Parameters
Add a new parameter group and a function for imposing the forces on the two large holes. The forces correspond to a torque on the bracket.
1
In the Model Builder window, under Global Definitions click Parameters 1.
2
In the Settings window for Parameters, type Geometrical Parameters in the Label text field.
Parameters 2
1
In the Home toolbar, click  Parameters and choose Add>Parameters.
2
In the Settings window for Parameters, locate the Parameters section.
3
Definitions
Analytic 1 (an1)
1
In the Home toolbar, click  Functions and choose Global>Analytic.
2
In the Settings window for Analytic, type load in the Function name text field.
3
Locate the Definition section. In the Expression text field, type F*cos(atan2(py,abs(px))).
4
In the Arguments text field, type F,px,py.
5
Locate the Units section. In the Arguments text field, type Pa, m, m.
6
In the Function text field, type Pa.
Add Material
1
In the Home toolbar, click  Add Material to open the Add Material window.
2
Go to the Add Material window.
3
In the tree, select Built-in>Structural steel.
4
Click  Add to Global Materials.
5
In the Home toolbar, click  Add Material to close the Add Material window.
Materials
Topology Link 1 (toplnk1)
1
In the Settings window for Topology Link, locate the Link Settings section.
2
From the Material list, choose Structural steel (mat1).
Solid Mechanics (solid)
Fixed Constraint 1
1
In the Model Builder window, under Component 1 (comp1) right-click Solid Mechanics (solid) and choose Fixed Constraint.
2
In the Settings window for Fixed Constraint, locate the Boundary Selection section.
3
From the Selection list, choose Constraint 1.
4
In the Physics toolbar, click  Constraint Group and choose New Constraint Group.
Fixed Constraint 2
1
In the Physics toolbar, click  Boundaries and choose Fixed Constraint.
2
In the Settings window for Fixed Constraint, locate the Boundary Selection section.
3
From the Selection list, choose Constraint 2.
4
In the Physics toolbar, click  Constraint Group and choose New Constraint Group.
Fixed Constraint 3
1
In the Physics toolbar, click  Boundaries and choose Fixed Constraint.
2
In the Settings window for Fixed Constraint, locate the Boundary Selection section.
3
From the Selection list, choose Constraint 3.
4
In the Physics toolbar, click  Constraint Group and choose New Constraint Group.
Fixed Constraint 4
1
In the Physics toolbar, click  Boundaries and choose Fixed Constraint.
2
In the Settings window for Fixed Constraint, locate the Boundary Selection section.
3
From the Selection list, choose Constraint 4.
4
In the Physics toolbar, click  Constraint Group and choose New Constraint Group.
Boundary Load 1
1
In the Physics toolbar, click  Boundaries and choose Boundary Load.
2
In the Settings window for Boundary Load, locate the Boundary Selection section.
3
From the Selection list, choose Load 1.
4
Locate the Coordinate System Selection section. From the Coordinate system list, choose Boundary System 1 (sys1).
5
Locate the Force section. Specify the FA vector as
6
In the Physics toolbar, click  Load Group and choose New Load Group.
Mesh 1
Mesh one side of the domain using swept and tetrahedral meshes.
Free Triangular 1
1
In the Mesh toolbar, click  Boundary and choose Free Triangular.
2
Size
1
In the Model Builder window, click Size.
2
In the Settings window for Size, locate the Element Size section.
3
Click the Custom button.
4
Locate the Element Size Parameters section. In the Maximum element size text field, type meshsz.
5
In the Minimum element size text field, type meshsz/2.
Swept 1
1
In the Mesh toolbar, click  Swept.
2
In the Settings window for Swept, locate the Domain Selection section.
3
From the Geometric entity level list, choose Domain.
4
Free Tetrahedral 1
1
In the Mesh toolbar, click  Free Tetrahedral.
2
In the Settings window for Free Tetrahedral, locate the Domain Selection section.
3
From the Geometric entity level list, choose Domain.
4
Copy the mesh from one side to the other.
Copy Domain 1
1
In the Model Builder window, right-click Mesh 1 and choose More Operations>Copy Domain.
2
3
In the Settings window for Copy Domain, locate the Destination Domains section.
4
Select the  Activate Selection toggle button.
5
Compute a characteristic elastic strain energy.
Study 1
Step 1: Stationary
1
In the Model Builder window, under Study 1 click Step 1: Stationary.
2
In the Settings window for Stationary, click to expand the Study Extensions section.
3
Select the Define load cases check box.
4
5
Global Definitions
Parameters 2
1
In the Model Builder window, under Global Definitions click Parameters 2.
2
In the Settings window for Parameters, locate the Parameters section.
3
The characteristic strain energy is taken as double the computed value to compensate for the fact that half of the material will be removed.
Set up the density topology feature and let it control Young’s modulus.
Definitions
Density Model 1 (dtopo1)
1
In the Model Builder window, under Component 1 (comp1)>Definitions>Topology Optimization click Density Model 1 (dtopo1).
2
In the Settings window for Density Model, locate the Filtering section.
3
From the Rmin list, choose User defined.
4
The filter radius must be larger or equal to the mesh size.
5
Locate the Projection section. From the Projection type list, choose Hyperbolic tangent projection.
6
In the β text field, type proj_beta.
7
Locate the Interpolation section. From the pSIMP list, choose User defined.
8
9
Locate the Control Variable Discretization section. From the Element order list, choose Constant.
10
Locate the Control Variable Initial Value section. In the θ0 text field, type Vfrac.
Prescribed Material 1
1
In the Definitions toolbar, click  Optimization and choose Prescribed Material.
2
In the Settings window for Prescribed Material, locate the Geometric Entity Selection section.
3
From the Selection list, choose Domains Outside Design Space.
Study 1
Topology Optimization
1
In the Model Builder window, under Study 1 click Topology Optimization.
2
In the Settings window for Topology Optimization, locate the Optimization Solver section.
3
In the Maximum number of iterations text field, type 50.
4
Locate the Constraints section. In the table, enter the following settings:
5
In the Model Builder window, click Study 1.
6
In the Settings window for Study, type One Load Case in the Label text field.
7
In the Study toolbar, click  Get Initial Value.
Use the plot to show the design during the optimization.
8
In the Model Builder window, click Topology Optimization.
9
In the Settings window for Topology Optimization, locate the Output While Solving section.
10
Select the Plot check box.
11
From the Plot group list, choose Threshold.
In general it is best to scale the objective function with the initial value, but in this case the scale is close enough to 1 that it is unnecessary.
12
In the Model Builder window, click One Load Case.
13
In the Settings window for Study, locate the Study Settings section.
14
Clear the Generate default plots check box.
Parametric Sweep
1
In the Study toolbar, click  Parametric Sweep.
2
In the Settings window for Parametric Sweep, locate the Study Settings section.
3
Click  Add twice.
4
5
Click to expand the Advanced Settings section. Select the Reuse solution from previous step check box.
6
In the Study toolbar, click  Compute.
Results
One Load Case
1
In the Model Builder window, under Results click Topology Optimization.
2
In the Settings window for Group, type One Load Case in the Label text field.
Threshold
1
In the Model Builder window, expand the One Load Case node, then click Threshold.
2
In the Threshold toolbar, click  Plot.
3
Click the  Zoom Extents button in the Graphics toolbar.
The resulting design is asymmetric due to the load and the two halves being poorly connected. If one of the bolt breaks, significant stiffness will be lost. Add a second load case together with a study using two load groups and four constraints giving a total of eight load cases. Run the optimization again to see what effect this has on the optimal design.
Solid Mechanics (solid)
Boundary Load 2
1
In the Model Builder window, under Component 1 (comp1)>Solid Mechanics (solid) right-click Boundary Load 1 and choose Duplicate.
2
In the Settings window for Boundary Load, locate the Boundary Selection section.
3
From the Selection list, choose Load 2.
4
In the Physics toolbar, click  Load Group and choose New Load Group.
Add Study
1
In the Home toolbar, click  Add Study to open the Add Study window.
2
Go to the Add Study window.
3
Find the Studies subsection. In the Select Study tree, select General Studies>Stationary.
4
Click Add Study in the window toolbar.
5
In the Home toolbar, click  Add Study to close the Add Study window.
Study 2
Step 1: Stationary
Add the eight load cases with the load groups changing most frequently. The purpose is to avoid unnecessary updates of the stiffness matrix by first changing the right hand side.
1
In the Settings window for Stationary, locate the Study Extensions section.
2
Select the Define load cases check box.
3
Click  Add eight times.
4
5
In the Model Builder window, click Study 2.
6
In the Settings window for Study, type Eight Load Cases in the Label text field.
7
In the Home toolbar, click  Compute.
One Load Case
Parametric Sweep, Topology Optimization
1
In the Model Builder window, under One Load Case, Ctrl-click to select Parametric Sweep and Topology Optimization.
2
Eight Load Cases
Parametric Sweep
In the Model Builder window, right-click Eight Load Cases and choose Paste Multiple Items.
Topology Optimization
1
In the Settings window for Topology Optimization, locate the Objective Function section.
2
3
Locate the Output While Solving section. From the Plot group list, choose Threshold 1.
4
In the Model Builder window, click Eight Load Cases.
5
In the Settings window for Study, locate the Study Settings section.
6
Clear the Generate default plots check box.
The default solver works, but the computational time can be decreased by using the PARDISO solver and avoiding reuse of the sparsity pattern. Finally, the log becomes cleaner if the solver is not allowed to change the order of the loadcases.
Solution 7 (sol7)
1
In the Model Builder window, right-click Solver Configurations and choose Reset Solver to Default.
2
Expand the Solution 7 (sol7) node.
3
In the Model Builder window, expand the Eight Load Cases>Solver Configurations>Solution 7 (sol7)>Optimization Solver 1>Stationary 1 node, then click Segregated 1.
4
In the Settings window for Segregated, locate the General section.
5
From the Termination technique list, choose Iterations.
6
In the Model Builder window, click Direct.
7
In the Settings window for Direct, locate the General section.
8
From the Solver list, choose PARDISO.
9
In the Model Builder window, click Suggested Direct Solver (solid).
10
In the Settings window for Direct, locate the General section.
11
From the Solver list, choose PARDISO.
12
In the Model Builder window, click Advanced.
13
In the Settings window for Advanced, click to expand the Assembly Settings section.
14
Clear the Reuse sparsity pattern check box.
15
In the Model Builder window, click Parametric.
16
In the Settings window for Parametric, locate the General section.
17
From the Parameter value run order list, choose As specified.
18
In the Home toolbar, click  Compute.
Results
Applied Loads (solid), Applied Loads (solid) 1
1
In the Model Builder window, under Results, Ctrl-click to select Applied Loads (solid) and Applied Loads (solid) 1.
2
Eight Load Cases
1
In the Model Builder window, under Results click Topology Optimization.
2
In the Settings window for Group, type Eight Load Cases in the Label text field.
Threshold 1
1
In the Model Builder window, expand the Eight Load Cases node, then click Threshold 1.
2
In the Threshold 1 toolbar, click  Plot.
Now the design is symmetric and the two halves are better connected.
3
Click the  Zoom Extents button in the Graphics toolbar.
Add a finer mesh and solve for the filtered material volume factor.
Mesh 1
In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and choose Duplicate.
Mesh 2
Size
1
In the Model Builder window, expand the Mesh 2 node, then click Size.
2
In the Settings window for Size, locate the Element Size Parameters section.
3
In the Maximum element size text field, type meshsz/2.
4
In the Minimum element size text field, type meshsz/4.
5
Click  Build All.
Add Study
1
In the Home toolbar, click  Add Study to open the Add Study window.
2
Go to the Add Study window.
3
Find the Studies subsection. In the Select Study tree, select General Studies>Stationary.
4
Find the Physics interfaces in study subsection. In the table, clear the Solve check box for Solid Mechanics (solid).
5
Click Add Study in the window toolbar.
6
In the Home toolbar, click  Add Study to close the Add Study window.
Smooth Design (mesh2)
1
In the Model Builder window, click Study 3.
2
In the Settings window for Study, type Smooth Design (mesh2) in the Label text field.
Solution 13 (sol13)
In the Study toolbar, click  Show Default Solver.
Step 1: Stationary
1
In the Model Builder window, click Step 1: Stationary.
2
In the Settings window for Stationary, click to expand the Values of Dependent Variables section.
3
Find the Initial values of variables solved for subsection. From the Settings list, choose User controlled.
4
From the Method list, choose Solution.
5
From the Study list, choose Eight Load Cases, Stationary.
6
In the Study toolbar, click  Compute.
Results
Filter 1
Create a new component from the filter dataset.
Add Component
1
In the Model Builder window, expand the Results>Datasets node.
2
Mesh 3
Import 1
1
In the Mesh toolbar, click  Import.
2
In the Settings window for Import, locate the Import section.
3
From the Source list, choose Dataset.
4
From the Dataset list, choose Filter 2.
5
From the Boundary partitioning list, choose Minimal.
6
Click Import.
Adapt 1
1
In the Mesh toolbar, click  Modify and choose Elements>Adapt.
2
In the Settings window for Adapt, locate the Adaptation section.
3
From the Solution list, choose None.
4
From the Type of expression list, choose Absolute size.
5
In the Size expression text field, type meshsz.
6
In the Maximum number of refinements text field, type 0.
7
In the Maximum coarsening factor text field, type Inf.
8
Click  Build Selected.
Free Tetrahedral 1
In the Mesh toolbar, click  Free Tetrahedral.
Size
1
In the Model Builder window, expand the Free Tetrahedral 1 node, then click Size.
2
In the Settings window for Size, locate the Element Size section.
3
From the Predefined list, choose Extremely fine.
4
Click  Build All.
Materials
Material Link 1 (matlnk1)
In the Model Builder window, under Component 2 (comp2) right-click Materials and choose More Materials>Material Link.
Solid Mechanics (solid)
Copy/paste the physics from the first component and fix the selections.
1
In the Model Builder window, under Component 1 (comp1) right-click Solid Mechanics (solid) and choose Copy.
Solid Mechanics (solid2)
1
In the Model Builder window, right-click Component 2 (comp2) and choose Paste Solid Mechanics.
2
In the Messages from Paste dialog box, click OK.
We can use 2nd order displacements now that we have an explicit geometry representation.
3
In the Model Builder window, click Solid Mechanics (solid2).
4
In the Settings window for Solid Mechanics, click to expand the Discretization section.
5
From the Displacement field list, choose Quadratic serendipity.
Fixed Constraint 1
1
In the Model Builder window, expand the Solid Mechanics (solid2) node, then click Fixed Constraint 1.
2
In the Settings window for Fixed Constraint, locate the Boundary Selection section.
3
From the Selection list, choose Constraint 1.
Fixed Constraint 2
1
In the Model Builder window, click Fixed Constraint 2.
2
In the Settings window for Fixed Constraint, locate the Boundary Selection section.
3
From the Selection list, choose Constraint 2.
Fixed Constraint 3
1
In the Model Builder window, click Fixed Constraint 3.
2
In the Settings window for Fixed Constraint, locate the Boundary Selection section.
3
From the Selection list, choose Constraint 3.
Fixed Constraint 4
1
In the Model Builder window, click Fixed Constraint 4.
2
In the Settings window for Fixed Constraint, locate the Boundary Selection section.
3
From the Selection list, choose Constraint 4.
Boundary Load 1
1
In the Model Builder window, click Boundary Load 1.
2
In the Settings window for Boundary Load, locate the Boundary Selection section.
3
From the Selection list, choose Load 1.
4
Locate the Force section. Specify the FA vector as
Boundary Load 2
1
In the Model Builder window, click Boundary Load 2.
2
In the Settings window for Boundary Load, locate the Boundary Selection section.
3
From the Selection list, choose Load 2.
4
Locate the Force section. Specify the FA vector as
Add Study
1
In the Home toolbar, click  Add Study to open the Add Study window.
2
Go to the Add Study window.
3
Find the Physics interfaces in study subsection. In the table, clear the Solve check box for Solid Mechanics (solid).
The filtered material volume factor is always solved for, but this takes less time on the coarse mesh.
4
Find the Studies subsection. In the Select Study tree, select Empty Study.
5
Click Add Study in the window toolbar.
6
In the Home toolbar, click  Add Study to close the Add Study window.
Verification
1
In the Settings window for Study, type Verification in the Label text field.
2
Locate the Study Settings section. Clear the Generate default plots check box.
One Load Case
Step 1: Stationary
1
In the Model Builder window, under One Load Case click Step 1: Stationary.
2
In the Settings window for Stationary, locate the Physics and Variables Selection section.
3
In the table, clear the Solve for check box for Solid Mechanics (solid2).
Smooth Design (mesh2)
Step 1: Stationary
1
In the Model Builder window, under Smooth Design (mesh2) click Step 1: Stationary.
2
In the Settings window for Stationary, locate the Physics and Variables Selection section.
3
In the table, clear the Solve for check box for Solid Mechanics (solid2).
Eight Load Cases
Step 1: Stationary
1
In the Model Builder window, under Eight Load Cases click Step 1: Stationary.
2
In the Settings window for Stationary, locate the Physics and Variables Selection section.
3
In the table, clear the Solve for check box for Solid Mechanics (solid2).
4
Right-click Eight Load Cases>Step 1: Stationary and choose Copy.
Verification
In the Model Builder window, right-click Verification and choose Paste Stationary.
Step 1: Stationary
1
In the Settings window for Stationary, locate the Physics and Variables Selection section.
2
In the table, select the Solve for check box for Solid Mechanics (solid2).
3
In the Home toolbar, click  Compute.
Add a new 3D plot group to plot the displacement.
Results
Topology Optimization
In the Model Builder window, under Results right-click Topology Optimization and choose Delete.
Displacement (solid2)
1
In the Home toolbar, click  Add Plot Group and choose 3D Plot Group.
2
In the Settings window for 3D Plot Group, type Displacement (solid2) in the Label text field.
3
Locate the Data section. From the Dataset list, choose Verification/Solution 14 (7) (sol14).
Surface 1
Right-click Displacement (solid2) and choose Surface.
Deformation 1
1
In the Model Builder window, right-click Surface 1 and choose Deformation.
2
Click the  Zoom Extents button in the Graphics toolbar.
3
In the Displacement (solid2) toolbar, click  Plot.