PDF

Maximizing the Eigenfrequency of a Beam
Introduction
Topology optimization can be used to get good ideas for the initial design of a new product. COMSOL supports topology optimization with the new density method via the Density Model feature in the Topology Optimization interface. This method assigns spatially varying material properties depending on the local value of a control variable field, and this happens automatically for structural mechanics, if you use the Topology Link material feature. For more details, see the Topology Optimization of an MBB Beam Application Library model.
Model Definition
This example considers a beam fixed at one end with an added mass at the other end. In this case the added mass is only 15% of the total beam weight, so the self-weight of the beam plays a large role in determining the eigenfrequency of the beam, but the added mass still has to be supported to avoid low eigenfrequencies.
The beam is made of steel, and the objective is to maximize the lowest eigenfrequency by distributing the material without violating a volume constraint.
The beam is supposed to be symmetric across the xz-plane, but the eigenmodes are not expected to respect this symmetry, so the full beam has to be modeled in every optimization iteration. A symmetric design of the beam can still be imposed using the Mirror Symmetry feature in the Topology Optimization interface.
It can be difficult to get discrete designs when maximizing the eigenfrequency using topology optimization, because the process of removing a structural member will typically introduce a low eigenfrequency for one of the intermediate designs, which can lead to grayscale. This model uses continuation of the SIMP exponent and projection slope (see Topology Optimization of an MBB Beam in the application library) using a Parametric Sweep. This is not necessary for the mesh size used in the model, but it is necessary if a finer mesh is used.
Results and Discussion
The optimal design is Figure 1, where it can be seen that the optimization supports the added weight, but a minimal amount of material is spent far away from the supports because the extra stiffness does not justify the added mass in this region.
Figure 1: The default topology optimization plot shows the mass distribution of the optimized beam. Note that there is an added mass of 15% (of the beam weight) at the tip, and that the optimization is free to place material anywhere in the box.
Notes About the COMSOL Implementation
This model combines the Topology Optimization interface with the Stationary Then Eigenfrequency study step. The study step allows computing the dependent variables associated with the Helmholtz filter (for imposing a minimum length scale) in a Stationary solver, while the dependent variables associated with the eigenfrequency analysis of the Solid Mechanics interface is computed by an Eigenvalue Solver. The use of this study step is thus critical when gradient-based optimization is used for optimizing eigenvalues using the Shape Optimization and Topology Optimization interfaces.
Application Library path: Optimization_Module/Topology_Optimization/beam_eigenfrequency_topology_optimization
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 Empty Study.
6
Global Definitions
Parameters 1
1
In the Model Builder window, expand the Component 1 (comp1) > Definitions node, then click Global Definitions > Parameters 1.
2
In the Settings window for Parameters, locate the Parameters section.
3
Component 1: Optimization
1
In the Model Builder window, click Component 1 (comp1).
2
In the Settings window for Component, type Component 1: Optimization in the Label text field.
Geometry 1
Block 1 (blk1)
1
In the Geometry toolbar, click  Block.
2
In the Settings window for Block, locate the Size and Shape section.
3
In the Width text field, type Lx.
4
In the Depth text field, type Lyz.
5
In the Height text field, type Lyz.
6
Click to expand the Layers section. In the table, enter the following settings:
7
Click to expand the Layers section. Find the Layer position subsection. Select the Front checkbox.
8
Select the Right checkbox.
9
Select the Back checkbox.
10
Locate the Selections of Resulting Entities section. Select the Resulting objects selection checkbox.
Block 2 (blk2)
1
In the Geometry toolbar, click  Block.
2
In the Settings window for Block, locate the Size and Shape section.
3
In the Width text field, type Lx-thk.
4
In the Depth text field, type Lyz-2*thk.
5
In the Height text field, type Lyz-thk.
6
Locate the Position section. In the y text field, type thk.
7
Locate the Selections of Resulting Entities section. Select the Resulting objects selection checkbox.
Difference 1 (dif1)
1
In the Geometry toolbar, click  Booleans and Partitions and choose Difference.
2
In the Settings window for Difference, locate the Difference section.
3
From the Objects to add list, choose Block 1.
4
From the Objects to subtract list, choose Block 2.
Work Plane 1 (wp1)
1
In the Geometry toolbar, click  Work Plane.
2
In the Settings window for Work Plane, locate the Plane Definition section.
3
From the Plane list, choose zx-plane.
4
In the y-coordinate text field, type Lyz/2.
Partition Objects 1 (par1)
1
In the Geometry toolbar, click  Booleans and Partitions and choose Partition Objects.
2
In the Settings window for Partition Objects, locate the Partition Objects section.
3
From the Objects to partition list, choose Block 1.
4
From the Partition with list, choose Work plane.
Fixed Boundaries
1
In the Geometry toolbar, click  Selections and choose Box Selection.
2
In the Settings window for Box Selection, type Fixed Boundaries in the Label text field.
3
Locate the Geometric Entity Level section. From the Level list, choose Boundary.
4
Locate the Box Limits section. In the x maximum text field, type 0.001*Lx.
5
Locate the Output Entities section. From the Include entity if list, choose Entity inside box.
Load Boundary
1
In the Geometry toolbar, click  Selections and choose Box Selection.
2
In the Settings window for Box Selection, type Load Boundary in the Label text field.
3
Locate the Geometric Entity Level section. From the Level list, choose Boundary.
4
Locate the Box Limits section. In the x minimum text field, type Lx-1.001*thk.
5
In the y minimum text field, type Lyz/2-thk*1.001.
6
In the y maximum text field, type Lyz/2+thk*1.001.
7
In the z minimum text field, type 0.999*Lyz.
8
Locate the Output Entities section. From the Include entity if list, choose Entity inside box.
Design Domain
1
In the Geometry toolbar, click  Selections and choose Box Selection.
2
In the Settings window for Box Selection, type Design Domain in the Label text field.
3
Locate the Box Limits section. In the y maximum text field, type Lyz/1.999.
4
Locate the Output Entities section. From the Include entity if list, choose Entity inside box.
Mirror Domain
1
In the Geometry toolbar, click  Selections and choose Complement Selection.
2
In the Settings window for Complement Selection, type Mirror Domain in the Label text field.
3
Locate the Input Entities section. Click  Add.
4
In the Add dialog, select Design Domain in the Selections to invert list.
5
Add Material
1
In the Materials 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 the Add to Global Materials button in the window toolbar.
5
In the Materials toolbar, click  Add Material to close the Add Material window.
Component 1: Optimization (comp1)
Density Model 1 (dtopo1)
1
In the Physics toolbar, click  Optimization and choose Topology Optimization.
2
In the Settings window for Density Model, locate the Geometric Entity Selection section.
3
From the Selection list, choose Design Domain.
4
Locate the Filtering section. From the Rmin list, choose User defined.
5
6
Locate the Projection section. From the Projection type list, choose Hyperbolic tangent projection.
7
In the β text field, type beta.
8
Locate the Interpolation section. From the pSIMP list, choose User defined.
9
10
Locate the Control Variable Discretization section. From the Element order list, choose Constant.
11
Locate the Control Variable Initial Value section. In the θ0 text field, type volfrac.
The eigenmodes are not symmetric, so the entire beam has to be modeled in every optimization iteration, but a symmetric design can be enforced using the Mirror Symmetry feature.
Mirror Symmetry 1
1
In the Topology Optimization toolbar, click  Mirror Symmetry.
2
In the Settings window for Mirror Symmetry, locate the Geometric Entity Selection section.
3
From the Selection list, choose Mirror Domain.
Materials
Topology Link 1 (toplnk1)
1
In the Model Builder window, under Component 1: Optimization (comp1) right-click Materials and choose More Materials > Topology Link.
2
In the Settings window for Topology Link, locate the Link Settings section.
3
From the Topology source list, choose Density Model 1 (dtopo1).
Solid Mechanics (solid)
When doing topology optimization, the representation of the geometry is not sufficiently accurate to warrant second order discretization.
1
In the Model Builder window, under Component 1: Optimization (comp1) click Solid Mechanics (solid).
2
In the Settings window for Solid Mechanics, click to expand the Discretization section.
3
From the Displacement field list, choose Linear.
Fixed Constraint 1
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 Fixed Boundaries.
Added Mass 1
1
In the Physics toolbar, click  Boundaries and choose Added Mass.
2
In the Settings window for Added Mass, locate the Boundary Selection section.
3
From the Selection list, choose Load Boundary.
4
Locate the Added Mass section. From the Mass type list, choose Total mass.
5
In the m text field, type mat1.def.rho*(Lx*Lyz^2-(Lx-thk)*(Lyz-thk)*(Lyz-2*thk))*volfrac*loadFactor.
Mesh 1
Mapped 1
1
In the Mesh toolbar, click  More Generators and choose Mapped.
2
In the Settings window for Mapped, locate the Boundary Selection section.
3
From the Selection list, choose Fixed Boundaries.
Size
1
In the Model Builder window, click Size.
2
In the Settings window for Size, click to expand the Element Size Parameters section.
3
In the Maximum element size text field, type meshsz.
4
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, click  Build All.
Study 1
The Helmholtz filter in the Density Model feature requires a Stationary solver, whereas the computation of the eigenfrequency requires an Eigenvalue Solver.
Step 1: Stationary Then Eigenfrequency
In the Study toolbar, click  More Study Steps and choose Eigenfrequency > Stationary Then Eigenfrequency.
Topology Optimization
1
In the Study toolbar, click  Optimization and choose Topology Optimization.
2
In the Settings window for Topology Optimization, locate the Optimization Solver section.
3
From the Method list, choose MMA.
4
In the Maximum number of iterations text field, type 50.
5
Select the Move limits checkbox. In the associated text field, type 0.1.
6
Locate the Objective Function section. In the table, enter the following settings:
7
From the Type list, choose Maximization.
8
From the Solution list, choose Minimum of objectives to set up a maximin optimization problem.
9
Find the Objective settings subsection. From the Objective scaling list, choose Initial solution based.
10
Click Add Expression in the upper-right corner of the Constraints section. From the menu, choose Component 1: Optimization (comp1) > Definitions > Density Model 1 > Global > comp1.dtopo1.theta_avg - Average material volume factor - 1.
11
Locate the Constraints section. In the table, enter the following settings:
12
In the Model Builder window, click Study 1.
13
In the Settings window for Study, type Study 1 - Optimization in the Label text field.
14
In the Study toolbar, click  Get Initial Value.
It can be difficult to avoid a bad local optimum, but the situation can be improved by using a Parametric Sweep, to perform continuation in the projection slope, and SIMP penalization parameters.
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 checkbox.
Topology Optimization
1
In the Model Builder window, click Topology Optimization.
2
In the Settings window for Topology Optimization, click to expand the Output section.
3
Select the Plot checkbox.
4
5
In the Study toolbar, click  Compute.
Results
Threshold
1
In the Model Builder window, expand the Topology Optimization node, then click Threshold.
2
In the Threshold toolbar, click  Plot.
3
Click the  Zoom Extents button in the Graphics toolbar.
Notice that the optimization causes identical values for the two lowest eigenfrequencies.
Topology Optimization - Parametric
1
In the Model Builder window, under Results click Topology Optimization 1.
2
In the Settings window for Group, type Topology Optimization - Parametric in the Label text field.
Perform verification on a body-fitted mesh in a new component. Start by solving the Helmholtz filter on a finer mesh.
Mesh 1
In the Model Builder window, under Component 1: Optimization (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.
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 checkbox for Solid Mechanics (solid).
4
Find the Studies subsection. In the Select Study tree, select Preset Studies for Selected Physics Interfaces > Stationary.
5
Click the Add Study button in the window toolbar.
6
In the Home toolbar, click  Add Study to close the Add Study window.
Study 2
Step 1: Stationary
1
In the Settings window for Stationary, click to expand the Values of Dependent Variables section.
2
Find the Initial values of variables solved for subsection. From the Settings list, choose User controlled.
3
From the Method list, choose Solution.
4
From the Study list, choose Study 1 - Optimization, Stationary Then Eigenfrequency.
5
In the Model Builder window, click Study 2.
6
In the Settings window for Study, locate the Study Settings section.
7
Clear the Generate default plots checkbox.
8
In the Label text field, type Study 2 - Smooth Design (mesh2).
9
In the Study toolbar, click  Compute.
Results
Filter
1
In the Model Builder window, expand the Results > Datasets node, then click Filter.
2
In the Settings window for Filter, locate the Data section.
3
From the Dataset list, choose Study 2 - Smooth Design (mesh2)/Solution 8 (sol8).
4
Locate the Expression section. In the Expression text field, type dtopo1.theta_f.
5
Right-click Results > Datasets > Filter and choose Create Mesh-Based Geometry.
Component 2: Verification
In the Settings window for Component, type Component 2: Verification in the Label text field.
Mesh-Based Geometry 1
Import 2
In the Model Builder window, under Component 2: Verification (comp2) > Mesh-Based Geometry 1 right-click Import 1 and choose Duplicate.
Transform 1
1
In the Mesh toolbar, click  More Attributes and choose Transform.
2
In the Settings window for Transform, locate the Displacement section.
3
In the y text field, type Lyz.
4
Locate the Scale section. From the Scaling list, choose Anisotropic.
5
In the y scale text field, type -1.
6
Click  Build Selected.
Remesh Faces 1
In the Mesh toolbar, click  More Generators and choose Remesh Faces.
Size
1
In the Model Builder window, expand the Remesh Faces 1 node, then click Size.
2
In the Settings window for Size, click to expand the Element Size Parameters section.
3
In the Maximum element size text field, type meshsz.
4
In the Minimum element size text field, type meshsz/2.
Remesh Faces 1
1
In the Model Builder window, click Remesh Faces 1.
2
In the Settings window for Remesh Faces, locate the Boundary Selection section.
3
From the Selection list, choose Filter.
Remesh Faces 2
1
Right-click Component 2: Verification (comp2) > Mesh-Based Geometry 1 > Remesh Faces 1 and choose Duplicate.
2
In the Settings window for Remesh Faces, locate the Boundary Selection section.
3
Click to select the  Activate Selection toggle button.
4
From the Selection list, choose Filter(1).
Size
1
In the Model Builder window, expand the Remesh Faces 2 node, then click Size.
2
In the Settings window for Size, click to expand the Element Size Parameters section.
3
In the Maximum element size text field, type meshsz.
4
In the Minimum element size text field, type meshsz/2.
5
Click  Build Selected.
Union 1
In the Mesh toolbar, click  Booleans and Partitions and choose Union.
Finalize
In the Model Builder window, right-click Finalize and choose Build Selected.
Component 1: Optimization (comp1)
In the Model Builder window, expand the Component 1: Optimization (comp1) node.
Materials
Material Link 1 (matlnk1)
1
In the Model Builder window, expand the Component 1: Optimization (comp1) > Materials node.
2
Right-click Component 2: Verification (comp2) > Materials and choose More Materials > Material Link.
Solid Mechanics (solid)
In the Model Builder window, under Component 1: Optimization (comp1) right-click Solid Mechanics (solid) and choose Copy.
Solid Mechanics (solid2)
1
In the Model Builder window, right-click Component 2: Verification (comp2) and choose Paste Solid Mechanics.
2
In the Messages from Paste dialog, click OK.
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 Fixed Boundaries.
Fixed Constraint 2
1
Right-click Component 2: Verification (comp2) > Solid Mechanics (solid2) > Fixed Constraint 1 and choose Duplicate.
2
In the Settings window for Fixed Constraint, locate the Boundary Selection section.
3
From the Selection list, choose Fixed Boundaries(1).
Added Mass 1
1
In the Model Builder window, click Added Mass 1.
2
In the Settings window for Added Mass, locate the Boundary Selection section.
3
From the Selection list, choose Load Boundary.
4
Locate the Added Mass section. In the m text field, type 0.5*mat1.def.rho*(Lx*Lyz^2-(Lx-thk)*(Lyz-thk)*(Lyz-2*thk))*volfrac*loadFactor.
Added Mass 2
1
Right-click Component 2: Verification (comp2) > Solid Mechanics (solid2) > Added Mass 1 and choose Duplicate.
2
In the Settings window for Added Mass, locate the Boundary Selection section.
3
From the Selection list, choose Load Boundary(1).
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 checkbox for Solid Mechanics (solid).
4
Find the Studies subsection. In the Select Study tree, select General Studies > Eigenfrequency.
5
Click the Add Study button in the window toolbar.
6
In the Home toolbar, click  Add Study to close the Add Study window.
Study 1 - Optimization
Step 1: Stationary Then Eigenfrequency
1
In the Settings window for Stationary Then Eigenfrequency, locate the Physics and Variables Selection section.
2
In the Solve for column of the table, under Component 2: Verification (comp2), clear the checkbox for Solid Mechanics (solid2).
Study 2 - Smooth Design (mesh2)
Step 1: Stationary
1
In the Model Builder window, under Study 2 - Smooth Design (mesh2) click Step 1: Stationary.
2
In the Settings window for Stationary, locate the Physics and Variables Selection section.
3
In the Solve for column of the table, under Component 2: Verification (comp2), clear the checkbox for Solid Mechanics (solid2).
Study 3
Step 1: Eigenfrequency
1
In the Model Builder window, under Study 3 click Step 1: Eigenfrequency.
2
In the Settings window for Eigenfrequency, locate the Physics and Variables Selection section.
3
In the Solve for column of the table, under Component 1: Optimization (comp1), clear the checkbox for Topology Optimization.
Mesh 3
Free Tetrahedral 1
In the Mesh toolbar, click  Free Tetrahedral.
Size
1
In the Model Builder window, click Size.
2
In the Settings window for Size, click to expand the Element Size Parameters section.
3
In the Maximum element size text field, type meshsz.
4
In the Minimum element size text field, type meshsz/2.
5
Click  Build All.
Study 3 - Verification
1
In the Model Builder window, click Study 3.
2
In the Settings window for Study, type Study 3 - Verification in the Label text field.
3
In the Home toolbar, click  Compute.
Results
Topology Optimization 1
In the Model Builder window, under Results right-click Topology Optimization 1 and choose Delete.
Verification
1
In the Model Builder window, under Results click Mode Shape (solid2).
2
In the Settings window for 3D Plot Group, type Verification in the Label text field.
Notice how the eigenfrequencies are higher relative to the raw optimization result.
Verification
1
In the Results toolbar, click  Evaluation Group.
2
In the Settings window for Evaluation Group, type Verification in the Label text field.
Global Evaluation 1
1
Right-click Verification and choose Global Evaluation.
2
In the Settings window for Global Evaluation, click Add Expression in the upper-right corner of the Expressions section. From the menu, choose Component 1: Optimization (comp1) > Definitions > Density Model 1 > Global > dtopo1.theta_avg - Average material volume factor - 1.
Volume Integration 1
1
In the Model Builder window, right-click Verification and choose Integration > Volume Integration.
2
In the Settings window for Volume Integration, locate the Data section.
3
From the Dataset list, choose Study 3 - Verification/Solution 9 (5) (sol9).
4
Locate the Selection section. From the Selection list, choose All domains.
5
Locate the Expressions section. In the table, enter the following settings:
6
In the Verification toolbar, click  Evaluate.
Notice how the eigenfrequencies are higher with the body-fitted mesh relative to the raw optimization result. This is due to the removal of the soft material near the boundary.