PDF

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/Design_Optimization/tuning_fork_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
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.
Study 1: Sweep
1
In the Model Builder window, click Study 1.
2
In the Settings window for Study, type Study 1: Sweep in the Label text field.
Now, add optimization. The BOBYQA solver is generally the fastest of the derivative-free solvers when the objective function is smooth.
Study 2: Optimization
1
In the Model Builder window, click Study 2.
2
In the Settings window for Study, type Study 2: Optimization in the Label text field.
Parameter Optimization
1
In the Study toolbar, click  Optimization and choose Parameter Optimization.
2
In the Settings window for Parameter Optimization, locate the Objective Function section.
3
Next, add the control parameter. You can choose between the global parameters defined in your model. In this case, use the prong length.
4
Locate the Control Parameters section. Click  Add.
Specify a length scale and suitable bounds.
5
The setup is now complete.
6
In the Study toolbar, click  Compute.
Results
Mode Shape (solid) 1
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 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.
Mode Shape (solid) 1
1
Click the  Zoom Extents button in the Graphics toolbar.
2
In the Model Builder window, expand the Results > Tables node.
Eigenfrequencies (Study 1), Mode Shape (solid)
1
In the Model Builder window, under Results, Ctrl-click to select Mode Shape (solid) and Eigenfrequencies (Study 1).
2
Sweep
In the Settings window for Group, type Sweep in the Label text field.
Eigenfrequencies (Study 2: Optimization), Mode Shape (solid) 1
1
In the Model Builder window, under Results, Ctrl-click to select Mode Shape (solid) 1 and Eigenfrequencies (Study 2: Optimization).
2
Optimization
In the Settings window for Group, type Optimization in the Label text field.
Length vs. Frequency
1
In the Results toolbar, click  1D Plot Group.
2
In the Settings window for 1D Plot Group, type Length vs. Frequency in the Label text field.
3
Locate the Data section. From the Dataset list, choose Study 1: Sweep/Parametric Solutions 1 (sol2).
Global 1
1
Right-click Length vs. Frequency and choose Global.
2
In the Settings window for Global, locate the y-Axis Data section.
3
4
Locate the x-Axis Data section. From the Axis source data list, choose Outer solutions.
5
Click to expand the Legends section. Find the Include subsection. Clear the Solution checkbox.
Global 2
1
Right-click Global 1 and choose Duplicate.
2
In the Settings window for Global, locate the Data section.
3
From the Dataset list, choose Study 2: Optimization/Solution 19 (sol19).
4
Locate the y-Axis Data section. In the table, enter the following settings:
5
Locate the x-Axis Data section. From the Parameter list, choose Expression.
6
In the Expression text field, type L.
7
Click to expand the Coloring and Style section. Find the Line markers subsection. From the Marker list, choose Circle.
8
In the Length vs. Frequency toolbar, click  Plot.
9
Click the  Zoom Extents button in the Graphics toolbar.