PDF

Shape Optimization of a Tuning Fork
Introduction
This model extends the model Tuning Fork in the COMSOL Multiphysics Application Library by adding a second study, in which the Parametric Sweep is replaced by an Optimization study node. The prong length Lp = L + πRb/2, where L is the straight cylindrical part and Rb is the prong base radius, is determined by minimizing the objective function (f − 440 Hz)2, where f is the fundamental frequency of the fork. The result agrees with that found in the original model version. For a detailed description of the model geometry and setup, see Tuning Fork in the COMSOL Multiphysics Application Library.
Application Library path: Optimization_Module/Shape_Optimization/tuning_fork_shape_optimization
Modeling Instructions
Root
In this model version you determine the prong length by using an Optimization study node.
Application Libraries
1
From the File menu, choose Application Libraries.
2
In the Application Libraries window, select COMSOL Multiphysics > Structural Mechanics > tuning_fork in the tree.
3
Add a parameter for scaling the prong length using the Deformed Geometry interface, so that the problem can be solved using gradient based optimization.
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
Component 1 (comp1)
Prescribed Deformation 1
1
In the Physics toolbar, click  Deformed Geometry and choose Prescribed Deformation.
2
3
In the Settings window for Prescribed Deformation, locate the Prescribed Deformation section.
4
Specify the dx vector as
The Zg variable refers to the z-component in the geometry frame.
Definitions
Define a Global Variable Probe to keep track of the prong length in the material frame.
Scaled Prong Length
1
In the Definitions toolbar, click  Probes and choose Global Variable Probe.
2
In the Settings window for Global Variable Probe, type Scaled Prong Length in the Label text field.
3
In the Variable name text field, type scaledL.
4
Locate the Expression section. In the Expression text field, type L*scaleZ.
To keep the results of the parametric study, add a second study with an Eigenfrequency step set up the same way as before.
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 > Eigenfrequency.
4
Click the Add Study button in the window toolbar.
5
In the Home toolbar, click  Add Study to close the Add Study window.
Study 2
Step 1: Eigenfrequency
1
In the Settings window for Eigenfrequency, locate the Study Settings section.
2
Select the Desired number of eigenfrequencies checkbox. In the associated text field, type 1.
3
In the Search for eigenfrequencies around shift text field, type 440.
Now, add optimization. The BOBYQA solver is generally the fastest of the derivative-free solvers when the objective function is smooth.
General Optimization
1
In the Study toolbar, click  Optimization and choose General Optimization.
2
In the Settings window for General Optimization, locate the Optimization Solver section.
3
From the Method list, choose IPOPT.
4
Locate the Objective Function section. In the table, enter the following settings:
Next, add the control parameter. You can choose between the global parameters defined in your model. In this case, use the scaling parameter.
5
Locate the Control Variables and Parameters section. Click  Add.
Specify a length scale and suitable bounds.
6
The setup is now complete.
7
In the Study toolbar, click  Compute.
Results
Probe Plot Group 2
1
Click the  Zoom Extents button in the Graphics toolbar.
The default plot shows the eigenmode that corresponds to the optimized value of the cylinder length L.
Objective Probe Table 3
The optimized value of the cylinder length can be seen in the Objective Table:
The resulting cylinder length is close to 7.91 cm, which agrees with the value determined using a parametric sweep.
Probe Plot Group 2
Click the  Zoom Extents button in the Graphics toolbar.