COMSOL ApplicationLibraryManual
COMSOL ApplicationLibraryManual
Contact Information
Visit the Contact COMSOL page at www.comsol.com/contact to submit general
inquiries, contact Technical Support, or search for an address and phone number. You can
also visit the Worldwide Sales Offices page at www.comsol.com/contact/offices for
address and contact information.
If you need to contact Support, an online request form is located at the COMSOL Access
page at www.comsol.com/support/case. Other useful links include:
Automotive Muffler
Introduction
This example describes the pressure wave propagation in a muffler for an explosion
engine. The approach is general for analysis of damping of harmonic pressure waves.
The purpose of the application is to show how to treat 3D acoustics in a fairly complex
geometry consisting of several separate sections and pipes divided by thin perfectly
rigid walls. The analysis gives the transmission loss in the frequency range 100 Hz
1000 Hz.
Model Definition
The model geometry consists of three separate resonator chambers divided by thin
walls. The inlet and the outlet correspond to the connection in the direction of the
engine and of free air, respectively.
Figure 1: The geometry of a muffler. The exhaust fumes enter through the left pipe, pass the
three resonator chambers, and exit through the right pipe.
1 | AUTOMOTIVE MUFFLER
Solved with COMSOL Multiphysics 5.2
DOMAIN EQUATIONS
You solve the problem in the frequency domain using the Pressure Acoustics,
Frequency Domain interface. The model equation is a slightly modified Helmholtz
equation for the acoustic pressure p:
2
p p-
------- --------- = 0
2
c
where is the density, c is the speed of sound, and is the angular frequency. The
density needs to be included in the equation in cases where variations in density in
different materials exist. The model assumes that in the low-frequency range, reactive
damping prevails. Resistive damping is therefore not included.
BOUNDARY CONDITIONS
The boundary conditions are of three different types. At all the solid boundaries, which
include the outer walls of the muffler, the dividing walls between the resonator
chambers, and the walls of the pipes, sound hard (wall) boundary conditions are used:
------p- n = 0
------p- n = ------
i 2 i
p ----------- p 0
c c
In this equation p0 denotes the applied outer pressure and i the imaginary unit. At the
outlet boundary, an outgoing plane wave is set:
------p- n = ------
i
p
c
2 | AUTOMOTIVE MUFFLER
Solved with COMSOL Multiphysics 5.2
Figure 2: The solution at 490 Hz. The real value of the pressure is plotted as isosurfaces,
and the absolute value of the pressure is displayed as a boundary plot on the inner walls of
the muffler.
P in
TL = 10 log -----------
P out
Here, Pin and Pout denote the acoustic effect at the inlet and outlet, respectively. The
acoustic effect is calculated using the following equations:
2
p0
P in = ----------
2c
- dA
2
pc
P out = ----------
2c
- dA
Figure 3 shows the result of a parametric frequency study. This plot reveals that the
damping is better at higher frequencies, with the exception of several deep dips
3 | AUTOMOTIVE MUFFLER
Solved with COMSOL Multiphysics 5.2
throughout the frequency range. The dips correspond to the resonance frequencies for
different parts of the muffler system.
Figure 3: The damping (dB) in the muffler as a function of the frequency (Hz).
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 3D.
2 In the Select physics tree, select Acoustics>Pressure Acoustics>Pressure Acoustics,
Frequency Domain (acpr).
4 | AUTOMOTIVE MUFFLER
Solved with COMSOL Multiphysics 5.2
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Frequency Domain.
6 Click Done.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
3 In the table, enter the following settings:
GEOMETRY
Create the geometry. To simplify this step, insert a prepared geometry sequence.
5 | AUTOMOTIVE MUFFLER
Solved with COMSOL Multiphysics 5.2
DEFINITIONS
Define integration operators for the inlet and outlet, then use these to calculate the
attenuation.
Integration 1 (intop1)
1 On the Definitions toolbar, click Component Couplings and choose Integration.
2 In the Settings window for Integration, locate the Source Selection section.
3 From the Geometric entity level list, choose Boundary.
4 Select Boundary 1 only.
5 In the Operator name text field, type intop_inlet.
6 In the Label text field, type inlet.
Integration 2 (intop2)
1 On the Definitions toolbar, click Component Couplings and choose Integration.
2 In the Settings window for Integration, locate the Source Selection section.
3 From the Geometric entity level list, choose Boundary.
4 Select Boundary 50 only.
6 | AUTOMOTIVE MUFFLER
Solved with COMSOL Multiphysics 5.2
Variables 1
1 On the Definitions toolbar, click Local Variables.
2 In the Settings window for Variables, locate the Variables section.
3 In the table, enter the following settings:
Note that you need to define the incoming power using p0 rather than the pressure
variable, p, because p is the sum of incident and reflected pressure waves.
Create a selection to simplify setting up the interior boundary conditions.
Explicit 1
1 On the Definitions toolbar, click Explicit.
2 In the Settings window for Explicit, locate the Input Entities section.
3 From the Geometric entity level list, choose Boundary.
4 Click the Transparency button on the Graphics toolbar.
7 | AUTOMOTIVE MUFFLER
Solved with COMSOL Multiphysics 5.2
5 Select Boundaries 10, 11, 13, 14, 16, 2023, 25, 26, 28, 29, 32, and 3639 only.
To do this, click the Paste Selection button next to the Selection box, paste the text:
10, 11, 13, 14, 16, 2023, 25, 26, 28, 29, 32, 3639 in the text field of the dialog
box that opens, and finally click OK.
ADD MATERIAL
1 On 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>Air.
4 Click Add to Component in the window toolbar.
MATERIALS
By default, the first material you add applies for all domains. In the Material Contents
table you can see which material properties the physics interfaces use, in this case the
density and the speed of sound. Notice that these quantities are functions of the
temperature and (in the case of the density) the ambient pressure.
1 On the Home toolbar, click Add Material to close the Add Material window.
8 | AUTOMOTIVE MUFFLER
Solved with COMSOL Multiphysics 5.2
Pressure Acoustics 1
In the Model Inputs section you can read off and, if desired, modify the temperature
and absolute pressure at which the expressions for the air density and speed of sound
are calculated. For this model, use the default settings.
MESH 1
Use the default physics-controlled mesh as a starting point and then modify the
maximum element size so that you get 10 elements per wavelength for the highest
frequency in the sweep, that is 1 kHz.
1 In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and
choose Build All.
Size
1 Right-click Component 1 (comp1)>Mesh 1 and choose Edit Physics-Induced Sequence.
9 | AUTOMOTIVE MUFFLER
Solved with COMSOL Multiphysics 5.2
STUDY 1
10 | AUTOMOTIVE MUFFLER
Solved with COMSOL Multiphysics 5.2
RESULTS
Selection
On the Results toolbar, click Selection.
Data Sets
1 In the Settings window for Selection, locate the Geometric Entity Selection section.
2 From the Geometric entity level list, choose Boundary.
3 From the Selection list, choose All boundaries.
4 Ctrl+click to highlight the six top faces of the muffler, then right-click to remove
them from the selection.
Alternatively, you can click the Paste Selection button next to the Selection box and
then paste the text 17, 914, 16, 17, 1929, 3133, 3541, 4350 in the text
field of the dialog box that opens before clicking OK.
11 | AUTOMOTIVE MUFFLER
Solved with COMSOL Multiphysics 5.2
1 In the Model Builder window, under Results click Acoustic Pressure (acpr).
2 In the Settings window for 3D Plot Group, locate the Data section.
3 From the Parameter value (freq (Hz)) list, choose 490.
4 In the Model Builder window, expand the Acoustic Pressure (acpr) node, then click
Surface 1.
5 In the Settings window for Surface, click Replace Expression in the upper-right corner
of the Expression section. From the menu, choose Component 1>Pressure Acoustics,
Frequency Domain>Pressure and sound pressure level>acpr.absp - Absolute pressure.
6 On the Acoustic Pressure (acpr) toolbar, click Plot.
7 In the Model Builder window, right-click Acoustic Pressure (acpr) and choose
Isosurface.
8 In the Settings window for Isosurface, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Component 1>Pressure
Acoustics, Frequency Domain>Pressure and sound pressure level>p - Pressure.
9 Locate the Levels section. In the Total levels text field, type 10.
What is a suitable number of isosurface levels for the isosurface plot varies with the
frequency. At frequencies with low damping many of the isosurfaces tend to
congregate inside the pipe.
10 On the Acoustic Pressure (acpr) toolbar, click Plot.
11 Click the Zoom Extents button on the Graphics toolbar.
Finally, reproduce the plot of attenuation versus frequency shown in Figure 3.
1D Plot Group 4
On the Home toolbar, click Add Plot Group and choose 1D Plot Group.
Global 1
On the 1D Plot Group 4 toolbar, click Global.
1D Plot Group 4
1 In the Settings window for Global, click Replace Expression in the upper-right corner
of the y-axis data section. From the menu, choose Component
1>Definitions>Variables>TL - Transmission loss.
2 In the Model Builder window, click 1D Plot Group 4.
3 In the Settings window for 1D Plot Group, type Transmission Loss in the Label
text field.
4 Locate the Plot Settings section. Select the x-axis label check box.
12 | AUTOMOTIVE MUFFLER
Solved with COMSOL Multiphysics 5.2
13 | AUTOMOTIVE MUFFLER
Solved with COMSOL Multiphysics 5.2
14 | AUTOMOTIVE MUFFLER
Solved with COMSOL Multiphysics 5.2
A call option is the right to buy a security at a specified price (called the exercise or
strike price) during a specified period of time.
A put option is the right to sell a security at a specified price during a specified period
of time.
American options can be exercised at any time up to and including the day the option
expires. European options can be exercised only on the day the option expires.
The famous Black-Scholes equation computes the cost u of a European stock option
2
u 1 2 2 u u
+ --- x + rx = ru
t 2 x
2 x
u ( T, x ) = max ( K x, 0 )
where K is the strike price. The problem domain is infinite and consists of the entire
real axis across the time domain 0 t T.
Black and Scholes derived an analytical expression for the solution to the above
problem. However, the formula works only for certain cases. For instance, you cannot
use it when and r are functions of x and t. Using the PDE formulation, you can
determine the price for such cases.
Model Definition
Because you work within a finite domain 0 x X, it is necessary to specify not only
the boundary conditions for t = T but also for x = 0 and x = X. It is therefore necessary
to analyze the problems characteristics to determine the location of the input and
output boundaries.
EQUATION DEFINITION
To put the equation in coefficient form, rewrite the equation as
u 1 1
--- 2 x 2 u + rx --- 2 x 2 u rc = 0.
+
t x 2 x x 2 x
1 2 2
r = rx --- x .
x 2
To reduce the problems with inflow boundaries, start by considering a put option:
Study the value of a put option at a strike price K = 40 with = 0.3 and r = 0.12.
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 1D.
2 In the Select physics tree, select Mathematics>PDE Interfaces>Coefficient Form PDE (c).
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Time Dependent.
6 Click Done.
ROOT
1 In the Model Builder window, click the root node.
2 Locate the Unit System section.
3 From the Unit system list, choose None.
Keeping track of units is not important in this model; by turning off unit support,
you avoid the need to specify dimensions for equation coefficients and coordinates
to get rid of unit warnings.
GEOMETRY 1
Interval 1 (i1)
1 On the Geometry toolbar, click Interval.
2 In the Settings window for Interval, locate the Interval section.
3 In the Right endpoint text field, type 80.
4 Right-click Interval 1 (i1) and choose Build Selected.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
3 In the table, enter the following settings:
Initial Values 1
1 In the Model Builder window, under Component 1 (comp1)>Coefficient Form PDE (c)
click Initial Values 1.
2 In the Settings window for Initial Values, locate the Initial Values section.
3 In the u text field, type (x<40)*(40-x).
Flux/Source 1
1 On the Physics toolbar, click Boundaries and choose Flux/Source.
2 Select Boundary 1 only.
MESH 1
Size
1 In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and
choose Edge.
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 2.
5 Click the Build All button.
The mesh consists of 40 elements.
STUDY 1
RESULTS
1D Plot Group 1
To see the plot of u as a Line Graph at time = 0, follow the steps given below.
9 In the Model Builder window, expand the 1D Plot Group 1 node, then click Line Graph
1.
10 In the Settings window for Line Graph, click Replace Expression in the upper-right
corner of the x-axis data section. From the menu, choose Geometry>Coordinate>x -
x-coordinate.
11 Click to expand the Legends section. Select the Show legends check box.
12 From the Legends list, choose Manual.
13 In the table, enter the following settings:
Legends
Time=0
Model Definition
Consider a homogeneous free-stream flow with speed U0 parallel to an infinitely thin,
flat plate located along the positive x-axis. The flow is assumed to be steady, symmetric
with respect to y, and homogeneous in the z direction. Due to friction, the flow
adjacent to the plate is retarded and a thin boundary layer, where the velocity gradually
grows from zero to the free-stream value, develops downstream of the leading edge
(see Figure 1).
y
U0 (x)
x
Figure 1: The boundary layer on a flat plate. (x) is the boundary-layer thickness, such that
u(x, (x)) = U0.
A reasonably accurate solution for the flow field can be found by considering the
boundary-layer approximation to the steady, incompressible Navier-Stokes equations
u u 2u
u ------ + v ------ = ---------2 (1)
x y y
u v-
------ + ----- = 0 (2)
x y
u = --------, v = --------
y x
y
= xU 0 f ( ), = ----------------------
x U 0
COMSOL solves Equation 3 on the interval [0, 10] with the boundary conditions
f ( 0 ) = 0, f ' ( 0 ) = 0
lim f ' ( ) = 1
f ' = f prime
1
f '' prime = --- ff prime
2
and implementing the system within the Coefficient Form PDE interface.
Using the Laminar Flow interface for single-phase flow, the model solves the steady,
incompressible Navier-Stokes equation in a domain (x, y) ([-1, 2.1], [0, 0.5]) m with
the leading edge of the plate located at x = 0 m. The working fluid is air at a
temperature of T = 20 C and U0 = 0.75 m/s. The simulations uses discretizations with
linear basis functions for velocity and pressure (P1+P1) on three different meshes.
x-
99 ( x ) = 4.99 ------
U0
Figure 3 shows a comparison between the Blasius similarity solution and the results
from the two-dimensional simulations at xE = 2 m, corresponding to a Reynolds
number of Rex = 1.0105. Only the results from the P1+P1 simulation on the coarse
mesh show a significant deviation from the similarity solution. To quantify differences
in the results, define the following measure,
2
------
- f '
u
= d
U0
0
Here, = 10, for which the similarity solution has converged to its asymptotic value
to within the numerical precision in the computations.
Table 1 displays deviations from the similarity solution together with the number of
degrees of freedom (DOF) for the three simulations. The convergence is displayed in
Figure 4 where the mesh size h is calculated as the maximum cell side in the mesh. The
curve is close to straight line, which means that the model is in a mesh convergence
regime; that is, the solution converges toward the correct solution when the mesh is
refined.
TABLE 1: DEVIATION FROM THE BLASIUS SOLUTION
1/H 10 20 40
-2 -2
6.1010 3.3310 1.6810-2
DOF 2016 7749 30375
Reference
1. H. Blasius, Grenzschichten in Flssigkeiten mit kleiner Reibung, Z. Math. Phys.,
vol. 56, pp. 137, 1908 (Engl. transl. in NACA TM 1256).
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 1D.
2 In the Select physics tree, select Mathematics>PDE Interfaces>Coefficient Form PDE (c).
3 Click Add.
4 In the Field name text field, type f.
5 Click Add Dependent Variable.
6 In the Dependent variables table, enter the following settings:
f
fprime
7 Click Study.
8 In the Select study tree, select Preset Studies>Stationary.
9 Click Done.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
3 In the table, enter the following settings:
GEOMETRY 1
Interval 1 (i1)
1 On the Geometry toolbar, click Interval.
2 In the Settings window for Interval, locate the Interval section.
3 In the Right endpoint text field, type 10.
MESH 1
Edge 1
1 In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and
choose Edge.
2 In the Settings window for Edge, locate the Domain Selection section.
3 From the Geometric entity level list, choose Entire geometry.
Distribution 1
1 Right-click Component 1 (comp1)>Mesh 1>Edge 1 and choose Distribution.
2 In the Settings window for Distribution, locate the Distribution section.
3 From the Distribution properties list, choose Predefined distribution type.
4 In the Number of elements text field, type 10000.
5 In the Element ratio text field, type 100.
6 From the Distribution method list, choose Geometric sequence.
7 Click the Build Selected button.
STUDY 1
Solution 1 (sol1)
1 On the Study toolbar, click Show Default Solver.
2 In the Model Builder window, expand the Solution 1 (sol1) node, then click Stationary
Solver 1.
3 In the Settings window for Stationary Solver, locate the General section.
4 In the Relative tolerance text field, type 1e-6.
Allocate more memory than the default suggestion to avoid a warning message. The
solver will automatically increase the allocation factor when needed, but changing it
manually is more computationally efficient.
5 In the Model Builder window, expand the Study 1>Solver Configurations>Solution 1
(sol1)>Stationary Solver 1 node, then click Direct.
6 In the Settings window for Direct, locate the General section.
7 In the Memory allocation factor text field, type 1.5.
8 On the Study toolbar, click Compute.
STUDY 1
1 In the Model Builder window, right-click Study 1 and choose Rename.
2 In the Rename Study dialog box, type Similarity soln. in the New label text field.
3 Click OK.
RESULTS
1D Plot Group 1
1 In the Model Builder window, expand the 1D Plot Group 1 node, then click Line Graph
1.
2 In the Settings window for Line Graph, locate the y-Axis Data section.
3 In the Expression text field, type fprime.
4 Click to expand the Legends section. Select the Show legends check box.
5 From the Legends list, choose Manual.
6 In the table, enter the following settings:
Legends
Similarity soln.
DEFINITIONS
ROOT
1 In the Model Builder window, click the root node.
2 On the Home toolbar, click Add Component and choose 2D.
ADD PHYSICS
1 On the Home toolbar, click Add Physics to open the Add Physics window.
2 Go to the Add Physics window.
3 In the Add physics tree, select Fluid Flow>Single-Phase Flow>Laminar Flow (spf).
4 Find the Physics interfaces in study subsection. In the table, enter the following
settings:
Studies Solve
Similarity soln.
ADD STUDY
1 On 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 Preset Studies>Stationary.
4 Click Add Study in the window toolbar.
5 On the Home toolbar, click Add Study to close the Add Study window.
GEOMETRY 2
Rectangle 1 (r1)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 In the Width text field, type 3.1.
4 In the Height text field, type 0.5.
5 Locate the Position section. In the x text field, type -1.
6 On the Geometry toolbar, click Build All.
Point 1 (pt1)
1 On the Geometry toolbar, click Primitives and choose Point.
2 Click Build All.
Point 2 (pt2)
1 On the Geometry toolbar, click Primitives and choose Point.
2 In the Settings window for Point, locate the Point section.
3 In the y text field, type 0.5.
4 On the Geometry toolbar, click Build All.
ADD MATERIAL
1 On 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>Air.
4 Click Add to Component in the window toolbar.
5 On the Home toolbar, click Add Material to close the Add Material window.
Inlet 1
1 On the Physics toolbar, click Boundaries and choose Inlet.
2 Select Boundary 1 only.
3 In the Settings window for Inlet, locate the Velocity section.
4 In the U0 text field, type U0.
Open Boundary 1
1 On the Physics toolbar, click Boundaries and choose Open Boundary.
Outlet 1
1 On the Physics toolbar, click Boundaries and choose Outlet.
2 Select Boundary 6 only.
Symmetry 1
1 On the Physics toolbar, click Boundaries and choose Symmetry.
2 Select Boundary 2 only.
MESH 2
Mapped 1
In the Model Builder window, under Component 2 (comp2) right-click Mesh 2 and choose
Mapped.
Distribution 1
1 In the Model Builder window, under Component 2 (comp2)>Mesh 2 right-click Mapped
1 and choose Distribution.
2 Select Boundaries 4 and 5 only.
3 In the Settings window for Distribution, locate the Distribution section.
4 In the Number of elements text field, type 21*N.
Distribution 2
1 Right-click Mapped 1 and choose Distribution.
2 Select Boundaries 2 and 3 only.
3 In the Settings window for Distribution, locate the Distribution section.
4 In the Number of elements text field, type 10*N.
Distribution 3
1 Right-click Mapped 1 and choose Distribution.
2 Select Boundaries 1 and 6 only.
3 In the Settings window for Distribution, locate the Distribution section.
4 From the Distribution properties list, choose Predefined distribution type.
5 In the Number of elements text field, type 20*N.
6 In the Element ratio text field, type 15.
7 From the Distribution method list, choose Geometric sequence.
8 Click the Build Selected button.
STUDY 2
Parametric Sweep
1 On the Study toolbar, click Parametric Sweep.
2 In the Settings window for Parametric Sweep, locate the Study Settings section.
3 Click Add.
4 In the table, enter the following settings:
Step 1: Stationary
1 In the Model Builder window, expand the Study 2 node, then click Step 1: Stationary.
2 In the Settings window for Stationary, click to expand the Values of dependent
variables section.
3 Locate the Values of Dependent Variables section. Find the Values of variables not
solved for subsection. From the Settings list, choose User controlled.
4 From the Method list, choose Solution.
5 From the Study list, choose Similarity soln., Stationary.
Solution 2 (sol2)
1 On the Study toolbar, click Show Default Solver.
2 In the Model Builder window, expand the Solution 2 (sol2) node, then click Stationary
Solver 1.
3 In the Settings window for Stationary Solver, locate the General section.
4 In the Relative tolerance text field, type 1e-5.
5 In the Model Builder window, expand the Study 2>Solver Configurations>Solution 2
(sol2)>Stationary Solver 1 node, then click Fully Coupled 1.
6 In the Settings window for Fully Coupled, click to expand the Method and
termination section.
7 Locate the Method and Termination section. In the Maximum number of iterations text
field, type 50.
8 On the Study toolbar, click Compute.
RESULTS
Cut Line 2D 1
On the Results toolbar, click Cut Line 2D.
Data Sets
1 In the Settings window for Cut Line 2D, locate the Data section.
2 From the Data set list, choose Study 2/Parametric Solutions 1 (5) (sol3).
3 Locate the Line Data section. In row Point 1, set x to xE.
4 In row Point 2, set x to xE.
5 In row Point 2, set y to 10*sqrt(b0*xE).
1D Plot Group 1
1 In the Model Builder window, expand the Results>1D Plot Group 1 node.
2 In the Model Builder window, expand the 1D Plot Group 1 node.
3 Right-click Line Graph 1 and choose Duplicate.
4 In the Settings window for Line Graph, locate the y-Axis Data section.
5 In the Expression text field, type u/U0.
6 Locate the Data section. From the Data set list, choose Cut Line 2D 1.
7 Locate the x-Axis Data section. In the Expression text field, type y/sqrt(b0*x).
8 Click to expand the Legends section. In the table, enter the following settings:
Legends
N=1
N=2
N=4
Derived Values
In the Model Builder window, under Results click Derived Values.
Line Integration 1
On the Results toolbar, click More Derived Values and choose Integration>Line
Integration.
Derived Values
1 In the Settings window for Line Integration, locate the Data section.
2 From the Data set list, choose Cut Line 2D 1.
3 Locate the Expression section. In the Expression text field, type (u/
U0-comp1.genext1(fprime))^2/sqrt(b0*x).
Surface Minimum 1
On the Results toolbar, click More Derived Values and choose Minimum>Surface
Minimum.
Derived Values
1 Select Domain 1 only.
2 In the Settings window for Surface Minimum, locate the Expression section.
3 In the Expression text field, type 1/h.
4 Locate the Data section. From the Data set list, choose Study 2/Parametric Solutions
1 (5) (sol3).
5 Right-click Surface Minimum 1 and choose Evaluate>Table 1 - Line Integration 1 ((u/
U0-comp1.genext1(fprime))^2/sqrt(b0*x)).
TA BL E
1 Go to the Table window.
2 Click Table Graph in the window toolbar.
RESULTS
1D Plot Group 5
1 In the Model Builder window, under Results>1D Plot Group 5 click Table Graph 1.
2 In the Settings window for Table Graph, locate the Data section.
3 From the x-axis data list, choose 1/h (1/m).
4 From the Plot columns list, choose Manual.
5 In the Columns list, select Err^2 (1).
6 In the Columns list, select Err^2 (1).
7 Locate the Coloring and Style section. Find the Line markers subsection. From the
Marker list, choose Diamond.
8 From the Positioning list, choose In data points.
1 | P A R A M E T E R I Z E D WO V E N C A R B O N F I B E R S G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
2 | P A R A M E T E R I Z E D WO V E N C A R B O N F I B E R S G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
Introduction
Quantum dots are nanoscale or microscale devices created by confining free electrons
in a 3D semiconducting matrix. The tiny islands or droplets of confined free
electrons (those with no potential energy) present many interesting electronic
properties. They are of potential importance for applications in quantum computing,
biological labeling, and lasers, to name only a few.
To compute the electronic states taken on by the quantum dot/wetting layer assembly
embedded in the GaAs surrounding matrix, you must solve the 1-band Schrdinger
equation in the effective mass approximation:
2
---------2 --------------- ( r ) + V ( r ) ( r ) = E ( r )
h 1
8 m e(r)
where h is Plancks constant, is the wave function, E is the eigenvalue (energy), and
me is the effective electron mass (to account for screening effects).
Model Definition
The model works with the 1-particle stationary Schrdinger equation
h2
--------------
2
- + V = E
8 m
It solves this eigenvalue problem for the quantum-dot/wetting-layer system using the
following step potential barrier and effective-mass approximations:
V = 0 for the InAs quantum dot/wetting layer and V = 0.697 eV for the GaAs
substrate.
me = 0.023 m for InAs and me = 0.067 m for GaAs.
Assume the quantum dot has perfect cylindrical symmetry. In that case you can model
the overall structure in 2D as shown in the following figure.
= ( z, r ) ( )
where is the azimuthal angle. Then rewrite the Schrdinger equation in cylindrical
coordinates as
2 2 2
1 r d
---------2 ------- + --- ------- ---------2 ------------2- 2 + V = E
h 1 h
8 z m e z r r m e r 8 m e r d
( z, r )
----------------
2
()
me r
2
1- d 2
--- = l (1)
d 2
and
-------
1 l ----
1 1 r l 1
2 2
2 h 2 h 2
m e r ---------2 - + --- ------- ----- + m e r [ V E ] = ------ l (2)
8 z m e z l r r m e r l 8
= exp [ il ]
1 l 1 r l
------- h2 l2
2
h
---------2 - ----- + V l = E l l ,
+ --- ------- + ----------------- lZ
8 z m
e z r r m
e r 2
8 m e r 2
( c u u + ) + au + u = d a u
2 2 2 2
h h - ---- l- h -1
c = -----------------
2
-, a = -----------------
2 2
+ V, r = ----------------- --- , da = 1
8 m r
2
8 m e 8 m e r e
and = El.
Results
This exercise models the eigenvalues for the four lowest electronic energy levels for the
principal quantum number l = 0. The plots in Figure 2 show the eigenwave functions
for those four states.
Reference
1. R. Melnik and M. Willatzen, Band structure of conical quantum dots with wetting
layers, Nanotechnology, vol. 15, pp. 18, 2004.
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 2D Axisymmetric.
2 In the Select physics tree, select Mathematics>PDE Interfaces>Coefficient Form PDE (c).
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Eigenvalue.
6 Click Done.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
Define dimensionless parameters for the electron mass and the reduced Planck
constant expressed in electronvolt units. You can obtain these values by dividing the
SI-unit values of the corresponding predefined COMSOL Multiphysics constants,
me_const and hbar_const, by the value of the elementary charge e_const in
coulombs:
2 In the Settings window for Parameters, locate the Parameters section.
GEOMETRY 1
1 In the Model Builder window, under Component 1 (comp1) click Geometry 1.
2 In the Settings window for Geometry, locate the Units section.
3 From the Length unit list, choose nm.
Rectangle 1 (r1)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size section.
3 In the Width text field, type 25.
4 In the Height text field, type 100.
5 Locate the Position section. From the Base list, choose Center.
6 In the r text field, type 12.5.
7 Right-click Component 1 (comp1)>Geometry 1>Rectangle 1 (r1) and choose Build
Selected.
Rectangle 2 (r2)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size section.
3 In the Width text field, type 25.
Polygon 1 (pol1)
1 On the Geometry toolbar, click Primitives and choose Polygon.
2 In the Settings window for Polygon, locate the Coordinates section.
3 In the r text field, type 0 12 0.
4 In the z text field, type 0 0 3.6.
5 Right-click Component 1 (comp1)>Geometry 1>Polygon 1 (pol1) and choose Build
Selected.
Compose 1 (co1)
1 On the Geometry toolbar, click Booleans and Partitions and choose Compose.
2 Select the objects pol1 and r2 only.
3 In the Settings window for Compose, locate the Compose section.
4 In the Set formula text field, type r2+pol1.
5 Clear the Keep interior boundaries check box.
6 Right-click Component 1 (comp1)>Geometry 1>Compose 1 (co1) and choose Build
Selected.
Compose 2 (co2)
1 On the Geometry toolbar, click Booleans and Partitions and choose Compose.
2 Select the objects r1 and co1 only.
3 In the Settings window for Compose, locate the Compose section.
4 In the Set formula text field, type r1+co1.
5 Right-click Component 1 (comp1)>Geometry 1>Compose 2 (co2) and choose Build
Selected.
-c_In/r r
0 z
6 Click to expand the Convection coefficient section. Locate the Convection Coefficient
section. Specify the vector as
-c_Ga/r r
0 z
MESH 1
1 In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and
choose Build All.
STUDY 1
Step 1: Eigenvalue
1 In the Model Builder window, expand the Study 1 node, then click Step 1: Eigenvalue.
2 In the Settings window for Eigenvalue, locate the Study Settings section.
3 In the Desired number of eigenvalues text field, type 4.
4 On the Home toolbar, click Compute.
RESULTS
2D Plot Group 1
Follow the instructions below to reproduce the series of plots in Figure 2.
An exception to this occurs when you place a slender body at right angles to a slow
flow because the eddies organize. A von Krmn vortex street appears with a
predictable frequency and involves the shedding of eddies from alternating sides.
Everyday examples of this phenomenon include singing telephone wires and an
automobile radio antenna vibrating in an air stream.
Model Definition
To illustrate how you can study such effects, the following model examines unsteady,
incompressible flow past a long cylinder placed in a channel at right angle to the
oncoming fluid. With a symmetric inlet velocity profile, the flow needs some kind of
asymmetry to trigger the vortex production. This can be achieved by placing the
cylinder with a small offset from the center of the flow. In this case, an unstructured
mesh is used, and the small asymmetry in the mesh proves to be enough to trigger the
vortex production.
The simulation time necessary for a periodic flow pattern to appear is difficult to
predict. A key predictor is the Reynolds number, which is based on cylinder diameter.
For low values (below 100) the flow is steady. In this simulation, the Reynolds number
equals 100, which gives a developed von Krmn vortex street, but the flow still is not
fully turbulent.
The frequency and amplitude of oscillations are stable features, but flow details are
extremely sensitive to perturbations. To gain an appreciation for this sensitivity, you
can compare flow images taken at the same time but with such minor differences as are
created by different tolerances for the time stepping. It is important to note that this
sensitivity is a physical reality and not simply a numerical artifact.
Before calculating the time-varying forces on the cylinder, you can validate the method
of computation at a lower Reynolds number using the direct nonlinear solver. This
saves time because you can find and correct simple errors and mistakes before the final
time-dependent simulation, which requires considerable time.
The viscous forces on the cylinder are proportional to the gradient of the velocity field
at the cylinder surface. Evaluating the velocity gradient on the boundary by directly
differentiating the FEM solution is possible but not very accurate. The differentiation
produces 1st-order polynomials when second-order elements are used for the velocity
field. A far better approach is to use a pair of reaction force operators to compute the
integrals of the viscous forces, comparable to second-order accurate integrals of the
viscous forces. An alternative approach would be to use a pair of weak-constraint
variables to enforce the no slip condition. Preferably use the reaction force operator
instead of weak constraints when computing integrals of reaction forces or fluxes in
postprocessing.
The drag and lift forces themselves are not as interesting as the dimensionless drag and
lift coefficients. These depend only on the Reynolds number and an objects shape, not
its size. The coefficients are defined as
2F D
C D = -------------------------
2
-
U mean L
2F L
C L = -------------------------
2
-
U mean L
Figure 1: A plot of the last time step clearly shows the von Krmn path.
The flow around a cylinder is a common benchmark test for CFD algorithms. Various
research teams have tried their strengths on this problem using different techniques.
Results from some of these experiments have been collected by Schfer and Turek (Ref.
1), who also used them to compute a probable value for the real answer.
Figure 2 shows how the lift coefficient develops a periodic variation as the von Krmn
vortex structure is formed.
Reference
1. M. Schfer and S. Turek, Benchmark Computations of Laminar Flow Around
Cylinder, E.H. Hirschel ed., Flow Simulation with High-Performance Computers
II, Volume 52 of Notes on Numerical Fluid Mechanics, Vieweg, pp. 547566, 1996.
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 2D.
2 In the Select physics tree, select Fluid Flow>Single-Phase Flow>Laminar Flow (spf).
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Time Dependent.
6 Click Done.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
3 In the table, enter the following settings:
Next, create a smoothed step function feature that you will use for ramping up the
inflow velocity.
Step 1 (step1)
1 On the Home toolbar, click Functions and choose Global>Step.
2 In the Settings window for Step, locate the Parameters section.
3 In the Location text field, type 0.1.
GEOMETRY 1
Rectangle 1 (r1)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 In the Width text field, type 2.2.
4 In the Height text field, type 0.4.
Circle 1 (c1)
1 Right-click Rectangle 1 (r1) and choose Build Selected.
2 On the Geometry toolbar, click Primitives and choose Circle.
3 In the Settings window for Circle, locate the Position section.
4 In the x text field, type 0.2.
5 In the y text field, type 0.2.
6 Locate the Size and Shape section. In the Radius text field, type 0.05.
Difference 1 (dif1)
1 Right-click Circle 1 (c1) and choose Build Selected.
2 On the Geometry toolbar, click Booleans and Partitions and choose Difference.
3 Select the object r1 only.
4 In the Settings window for Difference, locate the Difference section.
5 Find the Objects to subtract subsection. Select the Active toggle button.
6 Select the object c1 only.
7 On the Geometry toolbar, click Build All.
MATERIALS
Material 1 (mat1)
1 In the Model Builder window, under Component 1 (comp1) right-click Materials and
choose Blank Material.
2 In the Settings window for Material, locate the Material Contents section.
3 In the table, enter the following settings:
Inlet 1
1 On the Physics toolbar, click Boundaries and choose Inlet.
2 Select Boundary 1 only.
To define a parabolic velocity profile use the predefined local curve parameter s.
Ramp up the velocity using the previously defined step function. Append the inverse
unit bracket [1/s] to the time variable t because the step function expects a
dimensionless argument.
3 In the Settings window for Inlet, locate the Velocity section.
4 In the U0 text field, type U_mean*6*s*(1-s)*step1(t[1/s]).
Outlet 1
1 On the Physics toolbar, click Boundaries and choose Outlet.
2 Select Boundary 4 only.
MESH 1
1 In the Model Builder window, under Component 1 (comp1) click Mesh 1.
2 In the Settings window for Mesh, locate the Mesh Settings section.
3 From the Element size list, choose Finer.
4 Click the Build All button.
If you zoom in on the inlet and the cylinder you can see the boundary layers that
the physics-controlled mesh gives.
STUDY 1
2 In the Settings window for Time Dependent, locate the Study Settings section.
3 In the Times text field, type range(0,0.2,3.4) range(3.5,0.02,7).
Solution 1 (sol1)
1 On the Study toolbar, click Show Default Solver.
2 In the Model Builder window, expand the Study 1>Solver Configurations node.
3 In the Model Builder window, expand the Solution 1 (sol1) node, then click
Time-Dependent Solver 1.
4 In the Settings window for Time-Dependent Solver, click to expand the Time
stepping section.
5 Locate the Time Stepping section. From the Steps taken by solver list, choose
Intermediate.
6 On the Study toolbar, click Compute.
RESULTS
Velocity (spf)
Add a Particle Tracing with Mass node to the first default plot group to reproduce the
plot in Figure 1.
Velocity (spf)
1 In the Settings window for Particle Tracing with Mass, click to expand the Mass and
velocity section.
2 Locate the Mass and Velocity section. In the Mass text field, type 4*pi/3*1e-9.
3 Find the Initial velocity subsection. In the x component text field, type u.
4 In the y component text field, type v.
5 Locate the Particle Positioning section. In the y text field, type
range(0.1,0.05,0.3).
6 In the x text field, type 0.
7 Click to expand the Release section. From the Release particles list, choose At
intervals.
8 Select the Start time check box.
9 In the associated text field, type 3.6.
To reproduce Figure 2 and Figure 3 of the lift and drag coefficients, first add an
Integral data set for computing the total reaction force on the cylinder.
Integral 1
On the Results toolbar, click More Data Sets and choose Evaluation>Integral.
Selection
On the Results toolbar, click Selection.
Data Sets
1 In the Settings window for Selection, locate the Geometric Entity Selection section.
2 From the Geometric entity level list, choose Boundary.
3 Select Boundaries 58 only.
1D Plot Group 3
1 On the Results toolbar, click 1D Plot Group.
2 In the Settings window for 1D Plot Group, locate the Data section.
3 From the Data set list, choose Integral 1.
Point Graph 1
On the 1D Plot Group 3 toolbar, click Point Graph.
1D Plot Group 3
1 In the Settings window for Point Graph, locate the y-Axis Data section.
2 In the Expression text field, type -reacf(v)*2/(spf.rho*U_mean^2*0.1).
3 Select the Description check box.
4 In the associated text field, type Lift coefficient.
5 On the 1D Plot Group 3 toolbar, click Plot.
Compare the graph with that shown in Figure 2.
Finally, visualize the drag coefficient using the following steps:
1D Plot Group 4
1 On the Home toolbar, click Add Plot Group and choose 1D Plot Group.
2 In the Settings window for 1D Plot Group, locate the Data section.
3 From the Data set list, choose Integral 1.
Point Graph 1
On the 1D Plot Group 4 toolbar, click Point Graph.
1D Plot Group 4
1 In the Settings window for Point Graph, locate the y-Axis Data section.
2 In the Expression text field, type -reacf(u)*2/(spf.rho*U_mean^2*0.1).
3 Select the Description check box.
4 In the associated text field, type Drag coefficient.
5 On the 1D Plot Group 4 toolbar, click Plot.
Compare with Figure 3.
Di f f r a c t i o n P a tt ern s
Introduction
This example simulates a two-slit interference experiment with water waves or sound.
The model mimics the plane-wave excitation with two thin waveguides leading to slits
in a screen and computes the diffraction pattern on the other side of the screen.
Model Definition
Theory predicts amplitude minima along rays where the difference in travel distance is
an odd multiple of half the wavelength, and maxima at even multiples. For
n = 0, 1, 2, :
min, sin = n + 1
--- ----
2 D
-
max, sin = n ---
D
In this example, the distance D between the slits is 2. Maxima should then be present
at = 0 and 30, while minima should appear at = 14.48 and 48.59.
Equation
For time-harmonic propagation, the wave equation turns into the Helmholtz
equation:
2 2
( u ) k u = 0, k = ------
Boundary Conditions
The absorbing boundary conditions have the form
where n is the outward boundary normal vector. This follows directly from the
assumption that the total wave consists of an incident plane wave plus an outgoing
plane wave, both at normal incidence:
1 | DIFFRACTION PATTERNS
Solved with COMSOL Multiphysics 5.2
ikx ikx
u = u1 e + u2 e
where the first term represents the outgoing wave and the second term the incident
wave. For example, at the left boundary of a computational domain along the x axis,
the normal derivative becomes
u u ikx i kx ikx
= = iku 1 e + iku 2 e = ik ( u 2u 2 e )
n x
u
+ iku = 2iku 2
n
and for u2 = 1, you get the absorbing boundary condition at the inflow.
Results
The plot in Figure 1 shows the diffraction pattern clearly. The effect of quantization is
that the numerical wavelength differs from , which results in a shift of the angles. You
can correct for this effect by adjusting the value of k in the Helmholtz equation to the
2 | DIFFRACTION PATTERNS
Solved with COMSOL Multiphysics 5.2
element size. These practices are important for modeling the interference effects of
monochromatic waves.
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 2D.
2 In the Select physics tree, select Mathematics>PDE Interfaces>Coefficient Form PDE (c).
3 Click Add.
3 | DIFFRACTION PATTERNS
Solved with COMSOL Multiphysics 5.2
4 Click Study.
5 In the Select study tree, select Preset Studies>Stationary.
6 Click Done.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
3 In the table, enter the following settings:
GEOMETRY 1
Circle 1 (c1)
1 On the Geometry toolbar, click Primitives and choose Circle.
2 In the Settings window for Circle, locate the Size and Shape section.
3 In the Sector angle text field, type 180.
4 Locate the Position section. In the x text field, type 0.5.
5 Locate the Rotation Angle section. In the Rotation text field, type -90.
6 Right-click Component 1 (comp1)>Geometry 1>Circle 1 (c1) and choose Build
Selected.
Rectangle 1 (r1)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size section.
3 In the Width text field, type 0.5.
4 In the Height text field, type 0.03.
5 Locate the Position section. In the y text field, type -0.015-0.1.
6 Right-click Component 1 (comp1)>Geometry 1>Rectangle 1 (r1) and choose Build
Selected.
Copy 1 (copy1)
1 On the Geometry toolbar, click Transforms and choose Copy.
4 | DIFFRACTION PATTERNS
Solved with COMSOL Multiphysics 5.2
Union 1 (uni1)
1 On the Geometry toolbar, click Booleans and Partitions and choose Union.
2 Click in the Graphics window and then press Ctrl+A to select all objects.
3 In the Settings window for Union, locate the Union section.
4 Clear the Keep interior boundaries check box.
5 On the Geometry toolbar, click Build All.
Flux/Source 1
1 On the Physics toolbar, click Boundaries and choose Flux/Source.
2 Select Boundaries 1 and 4 only.
3 In the Settings window for Flux/Source, locate the Boundary Flux/Source section.
4 In the g text field, type 2*i*k-i*k*u.
Flux/Source 2
1 On the Physics toolbar, click Boundaries and choose Flux/Source.
2 Select Boundaries 11 and 12 only.
3 In the Settings window for Flux/Source, locate the Boundary Flux/Source section.
4 In the g text field, type -i*k*u.
5 | DIFFRACTION PATTERNS
Solved with COMSOL Multiphysics 5.2
MESH 1
Create a mesh with a maximum element size determined by the wavelength. As a rule
of thumb, you need 5 elements per wavelength for quadratic elements (the default for
the PDE interface) to fully resolve the wave.
Size
1 In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and
choose Free Triangular.
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 l/5.
5 Click the Build All button.
STUDY 1
On the Home toolbar, click Compute.
RESULTS
2D Plot Group 1
To reproduce the plot shown in Figure 1, just change the color table.
6 | DIFFRACTION PATTERNS
Solved with COMSOL Multiphysics 5.2
1 In the Model Builder window, expand the 2D Plot Group 1 node, then click Surface 1.
2 In the Settings window for Surface, locate the Coloring and Style section.
3 From the Color table list, choose WaveLight.
4 On the 2D Plot Group 1 toolbar, click Plot.
7 | DIFFRACTION PATTERNS
Solved with COMSOL Multiphysics 5.2
8 | DIFFRACTION PATTERNS
Solved with COMSOL Multiphysics 5.2
The exercise consists of two parts. The first part describes how to create the model with
a detailed geometry. The second part shows how to define a homogeneous model for
porous media using an effective diffusivity calculated using the detailed model from
the first part.
Introduction
Transport through porous structures is usually treated using simplified homogeneous
models with effective transport properties. This is in most cases a necessity, since the
typical dimensions of the pores and particles making up the porous structure are several
orders of magnitude smaller than the size of the domain that is to be modeled.
The artificial porous structure used in this example is shown in Figure 1 below.
Concentration Flux
boundary boundaries
Figure 1: Artificial porous structure. The domain colored in red is accessible for diffusion.
Model Definition
The model equation in the modeled domain shown in Figure 1 is the time-dependent
equation
c
----- + ( D c ) = 0
t
where c denotes concentration (mol/m3 using SI units) and D the diffusion coefficient
(m2/s) of the solute.
c = c0
( D c ) n = k m ( c c 1 )
where km is the mass transfer coefficient (m/s), and c1 is the concentration in a bulk
solution outside of the porous structure.
( D c ) n = 0
The initial condition is given by a bell-shaped profile along the x-axis with its maximum
at x = 0 and a corresponding value of c = c0:
2
c ( t 0 ) = c 0 exp ( ax )
The second part of this exercise uses a homogenized 1D model geometry with
effective transport properties and an average porosity. The model equation then
becomes:
c eff
----- + ( D c ) = 0
t
where denotes the average porosity and Deff the effective diffusivity. These properties
are calculated from the results of the detailed structure; see the next section. At the
boundaries, the concentration and flux conditions described above apply.
Already at this stage the concentration has almost reached steady state, which is visible
by the nearly linear concentration profile across the structure.
When modeling porous media, the exact concentration in the pore structure is not the
most important issue because the description of the structure is homogenized and not
detailed as in Figure 2. The most interesting issue is then the description of the flux.
To calculate the average flux, integrate over the flux boundary and divide by its length,
L0, which yields the following expression:
L0
1
N average
L0
= ------ k m ( c c 1 ) dS
0
Figure 3 shows the value of this integral as a function of time. If you let the process
reach steady-state, the average flux becomes 8.051103 molm2/s. Considering the
almost linear profile across the structure, it is natural to replace the porous structure
with a 1D homogenized structure along the x-axis. It is then possible to calculate the
effective diffusivity according to the following:
eff ( c 0 c out )
D -------------------------
- = N average
L1
where cout is the average concentration (mol/m3) at the flux boundary, and L1 is the
length of the geometry along the x-axis. The average concentration is obtained by
integrating according to the expression below:
L0
1
c out
L0
= ------ c dS.
0
3 4
eff 8.051 10 8.0 10 -
D = -------------------------------------------------------------
3
( 3 1.61 10 )
which yields a value for the effective diffusivity of 2.15106 m2/s compared to the
free diffusivity of 1105 m2/s. The effective and free diffusivities are usually
related according to the equation
eff
D = D --
where is the porosity of the structure and the tortuosity, which is a measure of the
actual length per unit effective length a molecule has to diffuse in a porous structure.
To calculate the porosity of the modeled structure, you integrate the value 1 over the
structure and then divide this by the length and width of the structure:
L1 L0
1
= --------------
L0 L1 1 dx dy
0 0
resulting in a value of 0.382. The value of can then be calculated to 1.78. In addition,
the tortuosity is usually expressed as a power of the porosity, resulting in an expression
for the effective diffusivity according to
eff p
D = D
If you use the calculated values for porosity and effective diffusivity, the value for p is
1.60. The experimental values for p for porous structures used for transport in
catalysts, soils, and other porous structures is usually in the range 1.52.
Using the value of the effective diffusivity, a simple homogenized 1D model provides
the possibility to compare the value of the flux using a homogenized model to the
value using the detailed 2D structure. Figure 3 shows that there is an excellent
agreement between the model using a detailed geometry and the homogenized model.
The difference in the time-dependent flux is hardly visible between the two cases in the
graph.
Figure 3: Average flux at the flux boundary in the detailed 2D model (solid blue line) and
the 1D homogenized approximation (dashed green line).
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 2D.
2 In the Select physics tree, select Chemical Species Transport>Transport of Diluted
Species (tds).
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Time Dependent.
6 Click Done.
GEOMETRY 1
Import 1 (imp1)
1 On the Home toolbar, click Import.
2 In the Settings window for Import, locate the Import section.
3 From the Source list, choose COMSOL Multiphysics file.
4 Click Browse.
5 Browse to the applications Application Library folder and double-click the file
effective_diffusivity.mphbin.
6 Click Import.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
Variables 1
1 On the Home toolbar, click Variables and choose Global Variables.
2 In the Settings window for Variables, locate the Variables section.
3 In the table, enter the following settings:
DEFINITIONS
Next, define selections that will be useful when defining the boundary conditions and
an integration coupling operator, and also during postprocessing.
Explicit 1
1 On the Definitions toolbar, click Explicit.
2 In the Model Builder window, right-click Explicit 1 and choose Rename.
3 In the Rename Explicit dialog box, type Left boundary in the New label text field.
4 Click OK.
5 In the Settings window for Explicit, locate the Input Entities section.
6 From the Geometric entity level list, choose Boundary.
7 Select Boundary 1 only.
Explicit 2
1 On the Definitions toolbar, click Explicit.
2 In the Model Builder window, right-click Explicit 2 and choose Rename.
3 In the Rename Explicit dialog box, type Right boundary in the New label text field.
4 Click OK.
5 In the Settings window for Explicit, locate the Input Entities section.
6 From the Geometric entity level list, choose Boundary.
7 Select Boundary 276 only.
Explicit 3
1 On the Definitions toolbar, click Explicit.
2 In the Model Builder window, right-click Explicit 3 and choose Rename.
3 In the Rename Explicit dialog box, type Top-right vertex in the New label text
field.
4 Click OK.
5 In the Settings window for Explicit, locate the Input Entities section.
6 From the Geometric entity level list, choose Point.
7 Select Point 532 only.
TR A N S P O R T O F D I L U T E D S P E C I E S ( T D S )
1 In the Settings window for Transport of Diluted Species, locate the Transport
Mechanisms section.
2 Clear the Convection check box.
This setting gives a pure diffusion interface.
Transport Properties 1
1 In the Model Builder window, expand the Transport of Diluted Species (tds) node, then
click Transport Properties 1.
2 In the Settings window for Transport Properties, locate the Diffusion section.
3 In the Dc text field, type D2.
Initial Values 1
1 In the Model Builder window, under Component 1 (comp1)>Transport of Diluted
Species (tds) click Initial Values 1.
2 In the Settings window for Initial Values, locate the Initial Values section.
3 In the c text field, type c0.
Concentration 1
1 On the Physics toolbar, click Boundaries and choose Concentration.
2 In the Settings window for Concentration, locate the Boundary Selection section.
3 From the Selection list, choose Left boundary.
Flux 1
1 On the Physics toolbar, click Boundaries and choose Flux.
2 In the Settings window for Flux, locate the Boundary Selection section.
3 From the Selection list, choose Right boundary.
4 Locate the Inward Flux section. From the Flux type list, choose External forced
convection.
5 Select the Species c check box.
6 In the kc,c text field, type k_f.
DEFINITIONS
Proceed to define a variable for the average flux through the porous structure. Begin
by defining an Average coupling operator on the rightmost boundary.
Average 1 (aveop1)
1 On the Definitions toolbar, click Component Couplings and choose Average.
2 In the Settings window for Average, locate the Source Selection section.
3 From the Geometric entity level list, choose Boundary.
4 From the Selection list, choose Right boundary.
Variables 2
1 On the Definitions toolbar, click Local Variables.
2 In the Settings window for Variables, locate the Variables section.
3 In the table, enter the following settings:
MESH 1
In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and choose
Build All.
STUDY 1
RESULTS
Concentration (tds)
1 Click the Zoom Extents button on the Graphics toolbar.
The default plot shows concentration at the end time, that is, 0.1 seconds.
1D Plot Group 2
On the Home toolbar, click Add Plot Group and choose 1D Plot Group.
Point Graph 1
On the 1D Plot Group 2 toolbar, click Point Graph.
1D Plot Group 2
1 In the Settings window for Point Graph, locate the Selection section.
2 From the Selection list, choose Top-right vertex.
3 Click Replace Expression in the upper-right corner of the y-axis data section. From
the menu, choose Component 1>Definitions>Variables>flux_avg - Average flux.
4 In the Model Builder window, click 1D Plot Group 2.
5 In the Settings window for 1D Plot Group, click to expand the Title section.
6 In the Label text field, type Molar fluxes.
7 Locate the Title section. From the Title type list, choose None.
8 Locate the Plot Settings section. Select the y-axis label check box.
9 In the associated text field, type Average flux (mol/(m*s)).
10 On the Molar fluxes toolbar, click Plot.
To get the porosity of the domain for the 1D model, perform a surface integration.
Surface Integration 1
On the Results toolbar, click More Derived Values and choose Integration>Surface
Integration.
Derived Values
1 In the Settings window for Surface Integration, locate the Selection section.
2 From the Selection list, choose All domains.
3 Locate the Expression section. In the Expression text field, type 1/(0.8[mm])^2.
The denominator in this expression represents the product of the length and the
width of the 2D model structure.
4 Click the Evaluate button.
TA BL E
1 Go to the Table window.
The evaluated value of the integral should be close to 0.383.
ROOT
Now turn to the 1D model.
ADD PHYSICS
1 On the Home toolbar, click Add Physics to open the Add Physics window.
2 Go to the Add Physics window.
3 In the Add physics tree, select Chemical Species Transport>Transport of Diluted Species
(tds).
4 Find the Physics interfaces in study subsection. In the table, enter the following
settings:
Studies Solve
Study 1
ADD STUDY
1 On the Home toolbar, click Add Study to open the Add Study window.
Physics Solve
Transport of Diluted Species (tds)
4 Find the Studies subsection. In the Select study tree, select Preset Studies>Time
Dependent.
5 Click Add Study in the window toolbar.
6 On the Home toolbar, click Add Study to close the Add Study window.
GEOMETRY 2
Interval 1 (i1)
1 On the Geometry toolbar, click Interval.
2 In the Settings window for Interval, locate the Interval section.
3 In the Right endpoint text field, type 8e-4.
4 Right-click Interval 1 (i1) and choose Build Selected.
5 Click the Zoom Extents button on the Graphics toolbar.
GLOBAL DEFINITIONS
Parameters
Add the following parameters to those you already defined.
TR A N S P O R T O F D I L U T E D S P E C I E S 2 ( T D S 2 )
On the Physics toolbar, click Transport of Diluted Species (tds) and choose Transport of
Diluted Species 2 (tds2).
1 In the Model Builder window, under Component 2 (comp2) click Transport of Diluted
Species 2 (tds2).
2 In the Settings window for Transport of Diluted Species, locate the Transport
Mechanisms section.
3 Clear the Convection check box.
Transport Properties 1
1 In the Model Builder window, expand the Transport of Diluted Species 2 (tds2) node,
then click Transport Properties 1.
2 In the Settings window for Transport Properties, locate the Diffusion section.
3 In the Dc2 text field, type D1/epsilon.
Initial Values 1
1 In the Model Builder window, under Component 2 (comp2)>Transport of Diluted
Species 2 (tds2) click Initial Values 1.
2 In the Settings window for Initial Values, locate the Initial Values section.
3 In the c2 text field, type c0.
Concentration 1
1 On the Physics toolbar, click Boundaries and choose Concentration.
2 Select Boundary 1 only.
3 In the Settings window for Concentration, locate the Concentration section.
4 Select the Species c2 check box.
5 In the c0,c2 text field, type c_max.
Flux 1
1 On the Physics toolbar, click Boundaries and choose Flux.
2 Select Boundary 2 only.
3 In the Settings window for Flux, locate the Inward Flux section.
4 From the Flux type list, choose External forced convection.
5 Select the Species c2 check box.
6 In the kc,c2 text field, type k_f/epsilon.
DEFINITIONS
Create a variable for the flux in the homogenized 1D model.
Variables 3
1 On the Home toolbar, click Variables and choose Local Variables.
2 In the Settings window for Variables, locate the Variables section.
3 In the table, enter the following settings:
MESH 2
1 In the Model Builder window, under Component 2 (comp2) click Mesh 2.
2 In the Settings window for Mesh, locate the Mesh Settings section.
3 From the Element size list, choose Extra fine.
4 Click the Build All button.
STUDY 2
RESULTS
Concentration (tds2)
The default plot for the 1D model shows the concentration for all time steps.
Finally, plot the result for the flux at the flux boundary in the homogenized 1D model
in the same plot as the 2D result for comparison.
Molar fluxes
In the Model Builder window, under Results click Molar fluxes.
Point Graph 2
On the Molar fluxes toolbar, click Point Graph.
Molar fluxes
1 In the Settings window for Point Graph, locate the Data section.
2 From the Data set list, choose Study 2/Solution 2 (3) (sol2).
3 Select Boundary 2 only.
4 Click Replace Expression in the upper-right corner of the y-axis data section. From
the menu, choose Component 2>Definitions>Variables>flux_hom - Flux, 1D model.
5 Click to expand the Coloring and style section. Locate the Coloring and Style section.
Find the Line style subsection. From the Line list, choose Dashed.
Eigenmodes of a Room
Introduction
Resonance can at times be a problem in everyday life. The low bass notes from the
music system or home theater in the living room can shake the windows and make the
floor vibrate. This happens only for certain frequenciesthe eigenfrequencies of the
room.
It is only in the low-frequency range that the eigenfrequencies are well separated. In
the mid- and high-frequency ranges, the eigenfrequencies are packed so closely, with
less than a halftone between them, that the individual resonances are insignificant for
music and other natural sounds. Nevertheless, the music experience is affected by the
acoustics of the room.
When designing a concert hall, it is extremely important to take the resonances into
account. For a clear and neutral sound, the eigenfrequencies should be evenly spaced.
For the home theater or music system owner, who cannot change the shape of the
living room, another question is more relevant: Where should the speakers be located
for the best sound?
Model Definition
For example, take a room with the dimensions 5 by 4 by 2.6 meters equipped with a
flat-screen TV, a sideboard, two speakers, and a couch. To illustrate the effects on the
music, compute a few resonance frequencies in the vicinity of 90 Hz together with the
corresponding eigenmodes. The eigenmode shows the sound intensity pattern for its
associated eigenfrequency. From the characteristics of the eigenmodes, you can draw
some conclusions as to where the speakers should be placed.
DOMAIN EQUATIONS
Sound propagating in free air is described by the wave equation:
2
1 p
p + ----2- 2 = 0
c t
where p is the pressure, and c is the speed of sound. If the air is brought into motion
by a harmonically oscillating source, for example, a loudspeaker, only one frequency f
1 | EIGENMODES OF A ROOM
Solved with COMSOL Multiphysics 5.2
exists in the room. For that reason it makes sense to look for a time-harmonic solution
on the form
p = p e
it
The wave equation then simplifies to the Helmholtz equation for p, the amplitude of
the acoustic disturbances:
2
p + ------
2
p = 0
c
BOUNDARY CONDITIONS
This model assumes that all boundarieswalls, floor, ceiling, and furniture are
perfectly rigid (sound hard boundaries). This means that it returns no information of
the damping properties of the room, but the distribution of the pressure should still
be reasonably correct.
ANALYTIC COMPARISON
It is possible to solve the simpler case of an empty room analytically. Each
eigenfrequency corresponds to an integer triple (i, l, m):
i 2 l 2 m 2
f i, l, m = --- ------ + ------ + ------
c
2 Lx Ly Lz
Eigenfrequencies with only one index different from zero give rise to axial modes,
that is, plane standing waves between two opposite walls.
If one index is zero, the mode is tangential.
If all indices are different from zero, the mode is oblique.
Theoretical resonance frequencies below 100 Hz for a room without furniture are
found in the following table.
2 | EIGENMODES OF A ROOM
Solved with COMSOL Multiphysics 5.2
All modes have local maxima in the corners of an empty room so speakers in the
corners excite all eigenfrequencies. This simulation predicts eigenmodes that strongly
resemble those of the corresponding empty room. The higher the frequency, the more
the placing of the furniture matters. For instance, some of the high-frequency
eigenmodes are located behind the couch.
In the strictest sense, the results of this simulation only apply to a room with perfectly
rigid walls and nonabsorbing furniture. The prediction that speakers placed in the
corners of the room excite many eigenmodes and give a fuller and more neutral sound,
however, holds for real-life rooms.
3 | EIGENMODES OF A ROOM
Solved with COMSOL Multiphysics 5.2
Figure 1: The sound pressure distribution for an eigenfrequency of 99.5 Hz. The real part
of the pressure is visualized as an isosurface plot, and the absolute value of the pressure as
a boundary plot. Note that this mode does not correspond to any of the analytical modes
listed above.
c 343
h max = --- = ----- = -----------------
6 6f 6 100
4 | EIGENMODES OF A ROOM
Solved with COMSOL Multiphysics 5.2
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 3D.
2 In the Select physics tree, select Acoustics>Pressure Acoustics>Pressure Acoustics,
Frequency Domain (acpr).
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Eigenfrequency.
6 Click Done.
GEOMETRY 1
The geometry in this model can be created within COMSOL Multiphysics. Here it is
imported for convenience.
Import 1 (imp1)
1 On the Home toolbar, click Import.
2 In the Settings window for Import, locate the Import section.
3 Click Browse.
4 Browse to the applications Application Library folder and double-click the file
eigenmodes_of_room.mphbin.
5 Click Import.
6 Click the Wireframe Rendering button on the Graphics toolbar.
5 | EIGENMODES OF A ROOM
Solved with COMSOL Multiphysics 5.2
MATERIALS
Material 1 (mat1)
1 In the Model Builder window, under Component 1 (comp1) right-click Materials and
choose Blank Material.
2 In the Settings window for Material, type Air in the Label text field.
3 Select Domain 1 only.
4 In the Settings window for Material, locate the Material Contents section.
5 In the table, enter the following settings:
STUDY 1
Step 1: Eigenfrequency
1 In the Model Builder window, expand the Study 1 node, then click Step 1:
Eigenfrequency.
2 In the Settings window for Eigenfrequency, locate the Study Settings section.
3 In the Search for eigenfrequencies around text field, type 90.
This setting will get you at least 6 solutions with eigenfrequencies in the vicinity of
90 Hz. For this model you typically get additional eigensolutions that the
eigenvalue solver finds.
RESULTS
6 | EIGENMODES OF A ROOM
Solved with COMSOL Multiphysics 5.2
Selection
On the Results toolbar, click Selection.
Data Sets
1 In the Settings window for Selection, locate the Geometric Entity Selection section.
2 From the Geometric entity level list, choose Boundary.
3 From the Selection list, choose All boundaries.
4 Select Boundaries 3 and 579 only.
The first plot group now shows the distribution of the absolute value of the pressure
for the lowest one of the eigenfrequencies, 74.9 Hz. This appears to be the (0,1,1)
mode.
7 | EIGENMODES OF A ROOM
Solved with COMSOL Multiphysics 5.2
1 In the Model Builder window, expand the Acoustic Pressure, Isosurfaces (acpr) node,
then click Isosurface 1.
2 In the Settings window for Isosurface, locate the Levels section.
3 In the Total levels text field, type 5.
4 On the Acoustic Pressure, Isosurfaces (acpr) toolbar, click Plot.
Modify the third default plot to show the isosurfaces and pressure distribution at 85
Hz, this is the (1,1,1) mode.
5 In the Model Builder window, click Acoustic Pressure, Isosurfaces (acpr).
6 In the Settings window for 3D Plot Group, locate the Data section.
7 From the Eigenfrequency list, choose 85.071.
8 Right-click Acoustic Pressure, Isosurfaces (acpr) and choose Surface.
9 In the Settings window for Surface, click Replace Expression in the upper-right corner
of the Expression section. From the menu, choose Component 1>Pressure Acoustics,
Frequency Domain>Pressure and sound pressure level>acpr.absp - Absolute pressure.
10 On the Acoustic Pressure, Isosurfaces (acpr) toolbar, click Plot.
8 | EIGENMODES OF A ROOM
Solved with COMSOL Multiphysics 5.2
11 In the Model Builder window, under Results>Acoustic Pressure, Isosurfaces (acpr) click
Isosurface 1.
12 In the Settings window for Isosurface, locate the Coloring and Style section.
13 Clear the Color legend check box.
9 | EIGENMODES OF A ROOM
Solved with COMSOL Multiphysics 5.2
This mode looks a little different from what you would find in an empty room. It is
focused behind the couch.
10 | EIGENMODES OF A ROOM
Solved with COMSOL Multiphysics 5.2
Electric Sensor
This example illustrates electric impedance tomography, a method used for the
imaging of the distribution of electrical permittivity in an object. The tomography is
performed by measuring currents and voltages at the surface of the object.
An application for this technique is medical diagnosis. Due to the different electrical
properties of various organs and parts of the body, it is possible to obtain information
on their position and movement in a non-invasive way.
The model shows how to determine from the outside the shape and the placement of
small objects with different material properties inside a box. Applying a potential
difference on the boundaries of the box creates a surface charge density that varies
depending on the permittivity distribution inside the box.
Model Definition
This model solves Gauss law with = 0.
( 0 r V ) =
The box contains air with r equal to 1 and the different objects are made of materials
with different values of the relative permittivity, r: 1, 2, and 3.
To get a voltage difference, a ground condition (V = 0) is set on the bottom while the
condition V = 1 is applied on the top of the box. On the side, the boundary condition
used is electric insulation: n D = 0.
1 | ELECTRIC SENSOR
Solved with COMSOL Multiphysics 5.2
Figure 1: Surface charge density (boundary), electric field (streamline density), and
electric potential (streamline color).
Inside the geometry the streamlines show how the electric field varies. The electric
field is lower in media with larger value of the permittivity.
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 3D.
2 | ELECTRIC SENSOR
Solved with COMSOL Multiphysics 5.2
GEOMETRY 1
Rectangle 1 (r1)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 In the Width text field, type 0.5.
4 In the Height text field, type 2.
5 Locate the Position section. In the xw text field, type -1.
6 In the yw text field, type 0.5.
7 Right-click Rectangle 1 (r1) and choose Build Selected.
Rectangle 2 (r2)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 In the Width text field, type 1.5.
4 In the Height text field, type 0.25.
5 Locate the Position section. In the xw text field, type -1.5.
6 In the yw text field, type 1.
7 Right-click Rectangle 2 (r2) and choose Build Selected.
Rectangle 3 (r3)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 | ELECTRIC SENSOR
Solved with COMSOL Multiphysics 5.2
Union 1 (uni1)
1 On the Geometry toolbar, click Booleans and Partitions and choose Union.
2 Click in the Graphics window and then press Ctrl+A to select all objects.
3 In the Settings window for Union, locate the Union section.
4 Clear the Keep interior boundaries check box.
5 Right-click Union 1 (uni1) and choose Build Selected.
6 Click the Zoom Extents button on the Graphics toolbar.
Ellipse 1 (e1)
1 On the Geometry toolbar, click Primitives and choose Ellipse.
2 In the Settings window for Ellipse, locate the Size and Shape section.
3 In the a-semiaxis text field, type 0.5.
4 Locate the Position section. In the xw text field, type 1.5.
5 In the yw text field, type 1.5.
6 Right-click Ellipse 1 (e1) and choose Build Selected.
7 Click the Zoom Extents button on the Graphics toolbar.
Ellipse 2 (e2)
1 On the Geometry toolbar, click Primitives and choose Ellipse.
2 In the Settings window for Ellipse, locate the Size and Shape section.
3 In the b-semiaxis text field, type 0.5.
4 Locate the Position section. In the xw text field, type 1.5.
5 In the yw text field, type 1.5.
6 Right-click Ellipse 2 (e2) and choose Build Selected.
Compose 1 (co1)
1 On the Geometry toolbar, click Booleans and Partitions and choose Compose.
2 Select the objects e1 and e2 only.
3 In the Settings window for Compose, locate the Compose section.
4 | ELECTRIC SENSOR
Solved with COMSOL Multiphysics 5.2
Extrude 1 (ext1)
1 On the Geometry toolbar, click Extrude.
2 In the Settings window for Extrude, locate the Distances from Plane section.
3 In the table, enter the following settings:
Distances (m)
0.8
Block 1 (blk1)
1 On 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 5.
5 | ELECTRIC SENSOR
Solved with COMSOL Multiphysics 5.2
ELECTROSTATICS (ES)
Ground 1
1 On the Physics toolbar, click Boundaries and choose Ground.
2 Select Boundary 3 only.
Electric Potential 1
1 On the Physics toolbar, click Boundaries and choose Electric Potential.
2 Select Boundary 4 only.
3 In the Settings window for Electric Potential, locate the Electric Potential section.
4 In the V0 text field, type 1.
6 | ELECTRIC SENSOR
Solved with COMSOL Multiphysics 5.2
MATERIALS
Material 1 (mat1)
1 In the Model Builder window, under Component 1 (comp1) right-click Materials and
choose Blank Material.
2 In the Settings window for Material, locate the Material Contents section.
3 In the table, enter the following settings:
Material 2 (mat2)
1 Right-click Materials and choose Blank Material.
2 Select Domain 2 only.
3 In the Settings window for Material, locate the Material Contents section.
4 In the table, enter the following settings:
Material 3 (mat3)
1 Right-click Materials and choose Blank Material.
2 Select Domain 3 only.
3 In the Settings window for Material, locate the Material Contents section.
4 In the table, enter the following settings:
MESH 1
1 In the Model Builder window, under Component 1 (comp1) click Mesh 1.
2 In the Settings window for Mesh, locate the Mesh Settings section.
3 From the Element size list, choose Fine.
7 | ELECTRIC SENSOR
Solved with COMSOL Multiphysics 5.2
STUDY 1
On the Home toolbar, click Compute.
RESULTS
Selection
On the Results toolbar, click Selection.
Data Sets
1 In the Settings window for Selection, locate the Geometric Entity Selection section.
2 From the Geometric entity level list, choose Boundary.
3 From the Selection list, choose All boundaries.
4 Select Boundaries 35 and 38 only.
5 Click the Transparency button on the Graphics toolbar.
Remove the default slice plot of the potential.
8 | ELECTRIC SENSOR
Solved with COMSOL Multiphysics 5.2
3D Plot Group 1
1 On the Results toolbar, click 3D Plot Group.
2 In the Model Builder window, right-click 3D Plot Group 1 and choose Surface.
3 In the Settings window for Surface, click Replace Expression in the upper-right corner
of the Expression section. From the menu, choose Component
1>Electrostatics>Electric>es.normD - Electric displacement field norm.
4 Locate the Expression section. In the Unit field, type pC/m^2.
5 Locate the Coloring and Style section. From the Color table list, choose Cyclic.
6 On the 3D Plot Group 1 toolbar, click Plot.
7 Click the Zoom Extents button on the Graphics toolbar.
8 Right-click 3D Plot Group 1 and choose Streamline.
9 In the Settings window for Streamline, locate the Streamline Positioning section.
10 From the Positioning list, choose Magnitude controlled.
11 Locate the Coloring and Style section. From the Line type list, choose Tube.
12 Right-click Results>3D Plot Group 1>Streamline 1 and choose Color Expression.
Compare the resulting plot with that in Figure 1.
9 | ELECTRIC SENSOR
Solved with COMSOL Multiphysics 5.2
10 | ELECTRIC SENSOR
Solved with COMSOL Multiphysics 5.2
Electrochemical Polishing
Introduction
This example illustrates the principle of electrochemical polishing. The simplified 2D
model geometry consists of two electrodes and an intermediate electrolyte domain.
The positive electrode has a protrusion, representing a surface defect. The purpose of
the application is to examine how this protrusion and the surrounding electrode
material are depleted over a period of time.
Model Definition
The potential drop over the electrodes is 30 V, and the electrolyte has a conductivity
of 10 S/m.
Electrode material 30 V
Electrolyte
Modeling the depletion of the positive electrode requires a moving boundary because
the geometry changes and the current density distribution with it. A simple model for
the depletion is based on the assumption that the depletion rate is proportional to the
normal current density at the electrode surface. The velocity, U, normal to the mesh
at the electrode surface then becomes
U = KJ n
1 | ELECTROCHEMICAL POLISHING
Solved with COMSOL Multiphysics 5.2
The part of the electrode and electrolyte that the model includes is about 3 mm wide
and the distance between the electrodes is 0.4 mm.
Results
After 10 s, the protrusion is somewhat smoothed out, and a significant portion of the
positive electrode has been depleted.
2 | ELECTROCHEMICAL POLISHING
Solved with COMSOL Multiphysics 5.2
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 2D.
2 In the Select physics tree, select Mathematics>Deformed Mesh>Deformed Geometry
(dg).
3 Click Add.
4 In the Select physics tree, select AC/DC>Electric Currents (ec).
5 Click Add.
6 Click Study.
7 In the Select study tree, select Preset Studies for Selected Physics Interfaces>Time
Dependent.
8 Click Done.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
3 In the table, enter the following settings:
GEOMETRY 1
1 In the Model Builder window, under Component 1 (comp1) click Geometry 1.
3 | ELECTROCHEMICAL POLISHING
Solved with COMSOL Multiphysics 5.2
Rectangle 1 (r1)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 In the Width text field, type 2.8.
4 In the Height text field, type 0.4.
5 Locate the Position section. In the x text field, type -1.4.
Circle 1 (c1)
1 Right-click Rectangle 1 (r1) and choose Build Selected.
2 On the Geometry toolbar, click Primitives and choose Circle.
3 In the Settings window for Circle, locate the Size and Shape section.
4 In the Radius text field, type 0.3.
5 Locate the Position section. In the y text field, type 0.6.
Difference 1 (dif1)
1 On the Geometry toolbar, click Booleans and Partitions and choose Difference.
2 Select the object r1 only to add it to the Objects to add list.
3 In the Settings window for Difference, locate the Difference section.
4 Find the Objects to subtract subsection. Select the Active toggle button.
5 Select the object c1 only.
6 Right-click Difference 1 (dif1) and choose Build Selected.
4 | ELECTROCHEMICAL POLISHING
Solved with COMSOL Multiphysics 5.2
Before turning to the Deformed Geometry interface settings, define variables for the
local displacement components.
DEFINITIONS
Variables 1
1 On the Home toolbar, click Variables and choose Local Variables.
2 In the Settings window for Variables, locate the Variables section.
3 In the table, enter the following settings:
Free Deformation 1
1 On the Physics toolbar, click Domains and choose Free Deformation.
2 Select Domain 1 only.
5 | ELECTROCHEMICAL POLISHING
Solved with COMSOL Multiphysics 5.2
Current Conservation 1
1 In the Model Builder window, expand the Electric Currents (ec) node, then click
Current Conservation 1.
2 In the Settings window for Current Conservation, locate the Conduction Current
section.
3 From the list, choose User defined. In the associated text field, type 10.
4 In the Model Builder window, click Electric Currents (ec).
Electric Potential 1
1 On the Physics toolbar, click Boundaries and choose Electric Potential.
2 Select Boundaries 3, 4, 6, and 7 only.
3 In the Settings window for Electric Potential, locate the Electric Potential section.
4 In the V0 text field, type 30.
Ground 1
1 On the Physics toolbar, click Boundaries and choose Ground.
6 | ELECTROCHEMICAL POLISHING
Solved with COMSOL Multiphysics 5.2
MESH 1
1 In the Model Builder window, under Component 1 (comp1) click Mesh 1.
2 In the Settings window for Mesh, locate the Mesh Settings section.
3 From the Element size list, choose Finer.
4 Click the Build All button.
5 Click the Zoom Extents button on the Graphics toolbar.
STUDY 1
7 | ELECTROCHEMICAL POLISHING
Solved with COMSOL Multiphysics 5.2
RESULTS
2D Plot Group 2
Next, plot the current distribution.
1 On the Home toolbar, click Add Plot Group and choose 2D Plot Group.
2 In the Model Builder window, right-click 2D Plot Group 2 and choose Surface.
3 In the Settings window for Surface, click Replace Expression in the upper-right corner
of the Expression section. From the menu, choose Component 1>Electric
Currents>Currents and charge>ec.normJ - Current density norm.
4 On the 2D Plot Group 2 toolbar, click Plot.
5 Click the Zoom Extents button on the Graphics toolbar.
The maximum current density appears to be of the order of 106 A/m2. To see the
magnitude of the depletion in the y direction more clearly, plot the y-component of
the mesh displacement.
8 | ELECTROCHEMICAL POLISHING
Solved with COMSOL Multiphysics 5.2
2D Plot Group 3
1 On the Home toolbar, click Add Plot Group and choose 2D Plot Group.
2 In the Model Builder window, right-click 2D Plot Group 3 and choose Surface.
3 In the Settings window for Surface, click Replace Expression in the upper-right corner
of the Expression section. From the menu, choose Component
1>Definitions>Variables>dy - y-displacement.
4 On the 2D Plot Group 3 toolbar, click Plot.
5 Click the Zoom Extents button on the Graphics toolbar.
The maximum value for the y-displacement is approximately 0.1 mm. Compare this
value with an approximate formula for the total depletion increment, d:
3
d = U t = K J n t = 10
11 m A-
------- 10 6 ---- 1 4
( 10 s ) = 10 m
As m
This shows that the approximate formula (which does not take effects from the curved
boundary into account) is in fact very accurate.
9 | ELECTROCHEMICAL POLISHING
Solved with COMSOL Multiphysics 5.2
10 | ELECTROCHEMICAL POLISHING
Solved with COMSOL Multiphysics 5.2
Model Definition
This example considers 0.6 m-by-1.0 m domain. For the boundary conditions:
1 | S T E A D Y - S T A T E 2 D H E A T TR A N S F E R W I T H C O N D U C T I O N
Solved with COMSOL Multiphysics 5.2
Results
The plot in Figure 1 shows the temperature field in the modeling domain.
The benchmark result for the target location (x = 0.6 m and y = 0.2 m) is a
temperature of 18.25 C. The COMSOL Multiphysics model, using a mapped mesh
with 9 15 quadratic elements, gives a temperature of 18.265 C.
Reference
1. A.D. Cameron, J.A. Casey, and G.B. Simpson, NAFEMS Benchmark Tests for
Thermal Analysis (Summary), NAFEMS, Glasgow, 1986.
2 | S T E A D Y - S T A T E 2 D H E A T TR A N S F E R W I T H C O N D U C T I O N
Solved with COMSOL Multiphysics 5.2
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 2D.
2 In the Select physics tree, select Heat Transfer>Heat Transfer in Solids (ht).
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Stationary.
6 Click Done.
GEOMETRY 1
Rectangle 1 (r1)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 In the Width text field, type 0.6.
4 Click the Build All Objects button.
H E A T TR A N S F E R I N S O L I D S ( H T )
Temperature 1
1 On the Physics toolbar, click Boundaries and choose Temperature.
2 Select Boundary 2 only.
3 In the Settings window for Temperature, locate the Temperature section.
4 In the T0 text field, type 100[degC].
Heat Flux 1
1 On the Physics toolbar, click Boundaries and choose Heat Flux.
2 Select Boundaries 3 and 4 only.
3 In the Settings window for Heat Flux, locate the Heat Flux section.
4 Click the Convective heat flux button.
5 In the h text field, type 750.
3 | S T E A D Y - S T A T E 2 D H E A T TR A N S F E R W I T H C O N D U C T I O N
Solved with COMSOL Multiphysics 5.2
MESH 1
Mapped 1
1 In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and
choose Mapped.
2 Right-click Mapped 1 and choose Build All.
STUDY 1
On the Home toolbar, click Compute.
4 | S T E A D Y - S T A T E 2 D H E A T TR A N S F E R W I T H C O N D U C T I O N
Solved with COMSOL Multiphysics 5.2
RESULTS
Temperature (ht)
1 Click the Zoom Extents button on the Graphics toolbar.
The first default plot group shows the temperature field; compare with Figure 1.
Data Sets
The benchmark value for the temperature at x = 0.6 m and y = 0.2 m is 18.25 degrees
C. To compare this value with that from the simulation, evaluate the temperature in
this position.
Cut Point 2D 1
On the Results toolbar, click Cut Point 2D.
Data Sets
1 In the Settings window for Cut Point 2D, locate the Point Data section.
2 In the x text field, type 0.6.
3 In the y text field, type 0.2.
Point Evaluation 1
On the Results toolbar, click Point Evaluation.
Derived Values
1 In the Settings window for Point Evaluation, locate the Data section.
2 From the Data set list, choose Cut Point 2D 1.
3 Locate the Expression section. From the Unit list, choose degC.
4 Click the Evaluate button.
TA BL E
1 Go to the Table window.
The result should be close to 18.265 degrees C.
5 | S T E A D Y - S T A T E 2 D H E A T TR A N S F E R W I T H C O N D U C T I O N
Solved with COMSOL Multiphysics 5.2
6 | S T E A D Y - S T A T E 2 D H E A T TR A N S F E R W I T H C O N D U C T I O N
Solved with COMSOL Multiphysics 5.2
Model Definition
This 1D model has a domain of length 0.1 m. The left end is kept at 1000 K, and at
the right end there is radiation to 300 K. The model uses the following material
properties:
1 | S T E A D Y - S T A T E 1 D H E A T TR A N S F E R W I T H R A D I A T I O N
Solved with COMSOL Multiphysics 5.2
Results
The following plot shows the temperature as a function of position:
The benchmark result for the right end is a temperature of 927.0 K. The COMSOL
Multiphysics model, using a default mesh with 15 elements, gives a temperature at the
end as 926.97 K, which is the exact benchmark value to four significant digits.
Reference
1. A.D. Cameron, J.A. Casey, and G.B. Simpson, NAFEMS Benchmark Tests for
Thermal Analysis (Summary), NAFEMS, Glasgow, 1986.
2 | S T E A D Y - S T A T E 1 D H E A T TR A N S F E R W I T H R A D I A T I O N
Solved with COMSOL Multiphysics 5.2
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 1D.
2 In the Select physics tree, select Heat Transfer>Heat Transfer in Solids (ht).
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Stationary.
6 Click Done.
GEOMETRY 1
Interval 1 (i1)
1 On the Geometry toolbar, click Interval.
2 In the Settings window for Interval, locate the Interval section.
3 In the Right endpoint text field, type 0.1.
4 Click the Build All Objects button.
H E A T TR A N S F E R I N S O L I D S ( H T )
Temperature 1
1 On the Physics toolbar, click Boundaries and choose Temperature.
2 Select Boundary 1 only.
3 In the Settings window for Temperature, locate the Temperature section.
4 In the T0 text field, type 1000.
Diffuse Surface 1
1 On the Physics toolbar, click Boundaries and choose Diffuse Surface.
2 Select Boundary 2 only.
3 In the Settings window for Diffuse Surface, locate the Surface Emissivity section.
4 From the list, choose User defined. In the associated text field, type 0.98.
5 Locate the Ambient section. In the Tamb text field, type 300.
3 | S T E A D Y - S T A T E 1 D H E A T TR A N S F E R W I T H R A D I A T I O N
Solved with COMSOL Multiphysics 5.2
Initial Values 1
1 In the Model Builder window, under Component 1 (comp1)>Heat Transfer in Solids (ht)
click Initial Values 1.
2 In the Settings window for Initial Values, locate the Initial Values section.
3 In the T text field, type 1000.
MESH 1
In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and choose
Build All.
STUDY 1
On the Home toolbar, click Compute.
RESULTS
Derived Values
The benchmark value for the temperature at the right end is 927.0 K. To compare the
value from the simulation, evaluate the temperature in that position.
Point Evaluation 1
On the Results toolbar, click Point Evaluation.
Derived Values
1 Select Boundary 2 only.
2 Click the Evaluate button.
TABLE
Go to the Table window.
4 | S T E A D Y - S T A T E 1 D H E A T TR A N S F E R W I T H R A D I A T I O N
Solved with COMSOL Multiphysics 5.2
Model Definition
This example considers the 0.3 m-by- 0.4 m domain. For the boundary conditions,
assume the following:
1 | A X I S Y M M E T R I C TR A N S I E N T H E A T TR A N S F E R
Solved with COMSOL Multiphysics 5.2
Results
The following revolved surface plot shows the temperature distribution inside the
cylinder after 190 seconds:
The benchmark result for the target location (r = 0.1 m and z = 0.3 m) is a
temperature of 186.5 C. The COMSOL Multiphysics model, using a default mesh
with about 720 elements, gives a temperature of roughly 186.4 C.
Reference
1. A.D. Cameron, J.A. Casey, and G.B. Simpson, NAFEMS Benchmark Tests for
Thermal Analysis (Summary), NAFEMS, Glasgow, 1986.
2 | A X I S Y M M E T R I C TR A N S I E N T H E A T TR A N S F E R
Solved with COMSOL Multiphysics 5.2
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 2D Axisymmetric.
2 In the Select physics tree, select Heat Transfer>Heat Transfer in Solids (ht).
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Time Dependent.
6 Click Done.
GEOMETRY 1
Rectangle 1 (r1)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 In the Width text field, type 0.3.
4 In the Height text field, type 0.4.
5 Click the Build All Objects button.
H E A T TR A N S F E R I N S O L I D S ( H T )
Temperature 1
1 On the Physics toolbar, click Boundaries and choose Temperature.
2 In the Settings window for Temperature, locate the Boundary Selection section.
3 From the Selection list, choose All boundaries.
4 Locate the Temperature section. In the T0 text field, type 1000[degC].
3 | A X I S Y M M E T R I C TR A N S I E N T H E A T TR A N S F E R
Solved with COMSOL Multiphysics 5.2
3 From the k list, choose User defined. In the associated text field, type 52.
4 Locate the Thermodynamics, Solid section. From the Cp list, choose User defined. In
the associated text field, type 460.
5 From the list, choose User defined. In the associated text field, type 7850.
Initial Values 1
1 In the Model Builder window, under Component 1 (comp1)>Heat Transfer in Solids (ht)
click Initial Values 1.
2 In the Settings window for Initial Values, locate the Initial Values section.
3 In the T text field, type 0[degC].
MESH 1
In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and choose
Build All.
STUDY 1
RESULTS
Temperature, 3D (ht)
To get the plot shown in Figure 1, just change the unit as follows:
1 In the Model Builder window, expand the Temperature, 3D (ht) node, then click
Surface 1.
2 In the Settings window for Surface, locate the Expression section.
3 From the Unit list, choose degC.
4 On the Temperature, 3D (ht) toolbar, click Plot.
5 Click the Zoom Extents button on the Graphics toolbar.
4 | A X I S Y M M E T R I C TR A N S I E N T H E A T TR A N S F E R
Solved with COMSOL Multiphysics 5.2
Data Sets
The benchmark value for the temperature at r = 0.1 m and z = 0.3 m is 186.5 C. To
compare the value from the simulation, evaluate the temperature in that position.
Cut Point 2D 1
On the Results toolbar, click Cut Point 2D.
Data Sets
1 In the Settings window for Cut Point 2D, locate the Point Data section.
2 In the r text field, type 0.1.
3 In the z text field, type 0.3.
Point Evaluation 1
On the Results toolbar, click Point Evaluation.
Derived Values
1 In the Settings window for Point Evaluation, locate the Data section.
2 From the Data set list, choose Cut Point 2D 1.
5 | A X I S Y M M E T R I C TR A N S I E N T H E A T TR A N S F E R
Solved with COMSOL Multiphysics 5.2
TABLE
Go to the Table window.
6 | A X I S Y M M E T R I C TR A N S I E N T H E A T TR A N S F E R
Solved with COMSOL Multiphysics 5.2
The KdV equation with boundary conditions and initial value is formulated as
u t + u xxx = 6uu x in = [ 8, 8 ]
u ( 8, t ) = u ( 8, t ), periodic
u ( x, 0 ) = 6 sech2 ( x )
The equation models the steepening and dispersion of wavefronts but does not
support a train of simple harmonic waves. Such trains comprise the wave crests
normally associated with the ocean: simply a momentary constructive interference of
contributing waves moving at different speeds. However, the equation does support
solitons, single humps that travel without changing shape or speed for unexpectedly
long distances.
A more recent development is the application of the KdV equation to another type of
waveslight waves. Today solitons have their primary practical application in optical
fibers. Specifically, a fibers linear dispersion properties level out a wave while the
nonlinear properties give a focusing effect. The result is a very stable, long-lived pulse
(Ref. 3). It is amazing that researchers have discovered a formula for such waves:
v
u = --------------------------------------------------------------------
2cosh --- v ( x vt f )
2 1
2
This equation says that the pulse speed is what determines the pulse amplitude and the
pulse width. The following simulation illustrates this effect. An initial pulse, which
does not conform to the formula, immediately breaks down into two pulses of
different amplitudes and speeds. The two new pulses follow the formula and thus can
travel forever. While the formula does not reveal how solitons interact, the simulation
shows that they can collide and reappear, seemingly unchanged, just as linear waves do,
another counterintuitive observation that is difficult to observe without predictions by
computing.
Model Definition
In the model, the term uux describes the focusing of a wave and uxxx refers to its
dispersion. The balancing of these two terms permits waves to travel with their shape
unchanged.
Because COMSOL Multiphysics does not evaluate third derivatives directly, you
rewrite the original equation above as a system of two variables to solve it:
u 1t + u 2x = 6u 1 u 1x
u 1xx = u 2
Using the General Form PDE interface, you need to define two dependent variables,
u1 and u2, and identify the da, , and F coefficients in the following equation:
u
da + = F
t
Only the first equation has a time derivative, and it is with respect to u1, so only
da(1,1) is 1; the other three components are zero.
The divergence is a space derivative with respect to x. This means that the
component from the first equation is u2, which you type as u2. The component
from the second equation is u1x, which you express using COMSOL Multiphysics
syntax as u1x.
The F term components are the right-hand side of the equations: F1 is 6u1u1x (type
6*u1*u1x), and F2 is u2 (type u2).
The initial condition for u1 uses a hyperbolic cosine function to provide an interesting
wave form to start with. For u2, you must provide the second space derivative of this
function to provide consistent initial conditions.
The boundary conditions are periodic boundary conditions: the solution at one end is
always identical to the one at the other end of the domain.
Results
The following plot shows how solitons collide and reappear with their shape intact.
References
1. A.R. Osborne and T.L. Burch, Internal Solitons in the Andaman Sea, Science,
vol. 208, no. 4443, pp. 451460, 1980.
2. R.B. Perry and G.R. Schimke, Large-Amplitude Internal Waves Observed Off the
Northwest Coast of Sumatra, J. Geophys. Res., vol. 70, no. 10, pp. 23192324,
1965.
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 1D.
2 In the Select physics tree, select Mathematics>PDE Interfaces>General Form PDE (g).
3 Click Add.
4 In the Number of dependent variables text field, type 2.
5 Click Study.
6 In the Select study tree, select Preset Studies>Time Dependent.
7 Click Done.
ROOT
1 In the Model Builder window, click the root node.
2 locate the Unit System section.
3 From the Unit system list, choose None.
Keeping track of units is not important in this model; by turning off unit support,
you avoid the need to specify dimensions for equation coefficients and coordinates
to get rid of unit warnings.
GEOMETRY 1
Interval 1 (i1)
1 On the Geometry toolbar, click Interval.
2 In the Settings window for Interval, locate the Interval section.
3 In the Left endpoint text field, type -8.
4 In the Right endpoint text field, type 8.
Periodic Condition 1
1 On the Physics toolbar, click Boundaries and choose Periodic Condition.
2 In the Settings window for Periodic Condition, locate the Boundary Selection section.
3 From the Selection list, choose All boundaries.
Initial Values 1
1 In the Model Builder window, under Component 1 (comp1)>General Form PDE (g) click
Initial Values 1.
2 In the Settings window for Initial Values, locate the Initial Values section.
3 In the u1 text field, type -6*sech(x)^2.
4 In the u2 text field, type
-24*sech(x)^2*tanh(x)^2+12*sech(x)^2*(1-tanh(x)^2).
MESH 1
Size
1 In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and
choose Edge.
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 0.1.
5 Click the Build All button.
STUDY 1
Solution 1 (sol1)
1 On the Study toolbar, click Show Default Solver.
2 In the Model Builder window, expand the Study 1>Solver Configurations node.
3 In the Model Builder window, expand the Solution 1 (sol1) node, then click
Time-Dependent Solver 1.
4 In the Settings window for Time-Dependent Solver, click to expand the Time
stepping section.
5 Locate the Time Stepping section. From the Method list, choose Generalized alpha.
The Generalized-alpha time stepper is well suited for wave problems. For an
accurate solution, use tighter tolerance settings.
6 Click to expand the Absolute tolerance section. Locate the Absolute Tolerance section.
In the Tolerance text field, type 3e-7.
7 Click to expand the Time stepping section. Locate the Time Stepping section. In the
Amplification for high frequency text field, type 0.98.
8 In the Model Builder window, expand the Study 1>Solver Configurations>Solution 1
(sol1)>Time-Dependent Solver 1 node, then click Fully Coupled 1.
9 In the Settings window for Fully Coupled, click to expand the Method and
termination section.
10 Locate the Method and Termination section. In the Tolerance factor text field, type
0.1.
RESULTS
1D Plot Group 1
1 In the Model Builder window, click 1D Plot Group 1.
2 In the Settings window for 1D Plot Group, locate the Data section.
3 From the Time selection list, choose From list.
4 In the Times list, select 0.25.
5 In the Model Builder window, expand the 1D Plot Group 1 node, then click Line Graph
1.
6 In the Settings window for Line Graph, locate the y-Axis Data section.
7 In the Expression text field, type -u1.
8 On the 1D Plot Group 1 toolbar, click Plot.
Data Sets
To visualize the solution, extrude results along the time.
Parametric Extrusion 1D 1
On the Results toolbar, click More Data Sets and choose Parametric Extrusion 1D.
2D Plot Group 2
1 On the Results toolbar, click 2D Plot Group.
2 In the Model Builder window, right-click 2D Plot Group 2 and choose Surface.
10 W laser
60 RPM
Figure 1: A silicon wafer is heated with a laser that moves back and forth. The wafer is
also being rotated about its axis.
Model Definition
A 2-inch silicon wafer, as shown in Figure 1, is heated for one minute by a 10 W laser
that moves radially inwards and outwards, while the wafer rotates on its stage.
Assuming good thermal isolation from the environment, the only source of heat loss
is from the top surface via radiation to the processing chamber walls, which are
assumed to be at a fixed temperature of 20 C.
1 | L A SE R H E AT I N G O F A S I L I C O N WA FE R
Solved with COMSOL Multiphysics 5.2
The laser beam is modeled as a heat source in the plane with Gaussian profile. To set
up the heating profile the model uses the built-in Gaussian Pulse functions, which
enforce that the integral under the curve equals unity. The focal point is moved by
using a triangular waveform to define its position along the x-axis over time. The wafer
is assigned a bulk rotational velocity in the governing heat transfer equation.
The emissivity of the surface of the wafer is approximately 0.8. At the operating
wavelength of the laser, it is assumed that absorptivity equals emissivity. The heat load
due to the laser is thus multiplied by the emissivity. Assuming also that the laser is
operating at a wavelength at which the wafer is opaque, no light is passing through the
wafer. Therefore, all of the laser heat is deposited at the surface.
The wafer is meshed using a triangular swept mesh. Swept meshing allows for only a
single thin element through the thickness, and still maintains reasonable element size
in the plane. A finer mesh would give slightly more accurate predictions of the peak
temperature, but predictions of average and minimum temperature would not be
greatly affected.
The heating profile does introduce some significant temperature variations, because
the laser deposits the same amount of heat over a larger total swept area when it is
focused at the outside of the wafer. An interesting modification to this example would
be to investigate alternative heating profiles for smoother heating.
2 | L AS E R H E A T I N G O F A S I L I C O N WA FE R
Solved with COMSOL Multiphysics 5.2
3 | L A SE R H E AT I N G O F A S I L I C O N WA FE R
Solved with COMSOL Multiphysics 5.2
Figure 4: Temperature variation across the wafer. The arrow plot describes the velocity of
the wafer.
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 3D.
2 In the Select physics tree, select Heat Transfer>Heat Transfer in Solids (ht).
3 Click Add.
4 | L AS E R H E A T I N G O F A S I L I C O N WA FE R
Solved with COMSOL Multiphysics 5.2
4 Click Study.
5 In the Select study tree, select Preset Studies>Time Dependent.
6 Click Done.
GLOBAL DEFINITIONS
Start by defining parameters for use in the geometry, functions, and physics settings.
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
3 In the table, enter the following settings:
GEOMETRY 1
Create a cylinder for the silicon wafer.
Cylinder 1 (cyl1)
1 On the Geometry toolbar, click Cylinder.
2 In the Settings window for Cylinder, locate the Size and Shape section.
3 In the Radius text field, type r_wafer.
4 In the Height text field, type thickness.
5 | L A SE R H E AT I N G O F A S I L I C O N WA FE R
Solved with COMSOL Multiphysics 5.2
DEFINITIONS
Define functions for use before setting up the physics.
6 | L AS E R H E A T I N G O F A S I L I C O N WA FE R
Solved with COMSOL Multiphysics 5.2
Waveform 1 (wv1)
1 On the Home toolbar, click Functions and choose Local>Waveform.
2 In the Settings window for Waveform, locate the Parameters section.
3 From the Type list, choose Triangle.
4 Clear the Smoothing check box.
5 In the Angular frequency text field, type 2*pi/period.
6 In the Phase text field, type pi/2.
7 In the Amplitude text field, type r_wafer.
7 | L A SE R H E AT I N G O F A S I L I C O N WA FE R
Solved with COMSOL Multiphysics 5.2
Analytic 1 (an1)
1 On the Home toolbar, click Functions and choose Local>Analytic.
2 In the Settings window for Analytic, type hf in the Function name text field.
3 Locate the Definition section. In the Expression text field, type
p_laser*gp1(x-wv1(t))*gp1(y).
8 | L AS E R H E A T I N G O F A S I L I C O N WA FE R
Solved with COMSOL Multiphysics 5.2
Average 1 (aveop1)
1 On the Definitions toolbar, click Component Couplings and choose Average.
2 Select Domain 1 only.
Maximum 1 (maxop1)
1 On the Definitions toolbar, click Component Couplings and choose Maximum.
2 Select Domain 1 only.
Minimum 1 (minop1)
1 On the Definitions toolbar, click Component Couplings and choose Minimum.
2 Select Domain 1 only.
H E A T TR A N S F E R I N S O L I D S ( H T )
Set up the physics. First, include the wafers rotational velocity in the governing heat
transfer equation.
9 | L A SE R H E AT I N G O F A S I L I C O N WA FE R
Solved with COMSOL Multiphysics 5.2
Translational Motion 1
1 On the Physics toolbar, click Attributes and choose Translational Motion.
2 In the Settings window for Translational Motion, locate the Translational Motion
section.
3 Specify the utrans vector as
-y*angular_v x
x*angular_v y
0 z
Next, add heat flux and surface-to-ambient radiation on the wafers top surface.
Heat Flux 1
1 On the Physics toolbar, click Boundaries and choose Heat Flux.
2 Select Boundary 4 only.
3 In the Settings window for Heat Flux, locate the Heat Flux section.
4 In the q0 text field, type emissivity*hf(x,y,t).
Diffuse Surface 1
1 On the Physics toolbar, click Boundaries and choose Diffuse Surface.
2 Select Boundary 4 only.
3 In the Settings window for Diffuse Surface, locate the Surface Emissivity section.
4 From the list, choose User defined. In the associated text field, type emissivity.
ADD MATERIAL
1 On 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>Silicon.
4 Click Add to Component in the window toolbar.
5 On the Home toolbar, click Add Material to close the Add Material window.
MESH 1
Use a fine triangular swept mesh.
Swept 1
1 In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and
choose Swept.
2 In the Settings window for Swept, click to expand the Sweep method section.
3 Locate the Sweep Method section. From the Face meshing method list, choose
Triangular (Generate prisms).
Distribution 1
1 Right-click Component 1 (comp1)>Mesh 1>Swept 1 and choose Distribution.
2 In the Settings window for Distribution, locate the Distribution section.
3 In the Number of elements text field, type 1.
Size
1 In the Model Builder window, under Component 1 (comp1)>Mesh 1 click Size.
2 In the Settings window for Size, locate the Element Size section.
3 From the Predefined list, choose Fine.
11 | L A SE R H E AT I N G O F A S I L I C O N WA FE R
Solved with COMSOL Multiphysics 5.2
STUDY 1
RESULTS
Temperature (ht)
The first default plot shows the temperature on the wafer surface. Add an arrow plot
for the velocity field describing the wafer rotation.
1 In the Model Builder window, under Results right-click Temperature (ht) and choose
Arrow Surface.
2 In the Settings window for Arrow Surface, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Component 1>Heat Transfer
in Solids>ht.ux,ht.uy,ht.uz - Velocity field.
3 Locate the Coloring and Style section. Select the Scale factor check box.
4 In the associated text field, type 0.036.
5 From the Color list, choose Green.
Compare the temperature variation with that shown in Figure 4.
1D Plot Group 3
1 On the Home toolbar, click Add Plot Group and choose 1D Plot Group.
2 In the Settings window for 1D Plot Group, click to expand the Legend section.
3 From the Position list, choose Lower right.
Global 1
On the 1D Plot Group 3 toolbar, click Global.
1D Plot Group 3
1 In the Settings window for Global, locate the y-Axis Data section.
13 | L A SE R H E AT I N G O F A S I L I C O N WA FE R
Solved with COMSOL Multiphysics 5.2
1D Plot Group 4
On the Home toolbar, click Add Plot Group and choose 1D Plot Group.
Global 1
On the 1D Plot Group 4 toolbar, click Global.
1D Plot Group 4
1 In the Settings window for Global, locate the y-Axis Data section.
2 In the table, enter the following settings:
Figure 1: A three-turn steel spring is fixed at one end, and has a load applied at the other.
The load is a variable which is solved for to achieve a total displacement.
Model Definition
Figure 1 shows the modeled three-turn steel spring. One end of the spring is fixed
rigidly, and the other end has a distributed load applied to it, acting in the axial
direction of the spring. Rather than an input to the model, this load is a variable being
solved for; it is implicitly specified via a global equation in such a way as to give a total
spring extension of 2 cm. The extension of the spring is computed by using an average
operator on the moving end of the spring. The average operator evaluates the average
z-displacement over the boundary at which the load is applied.
The global equation adds one additional degree of freedom to the model, the
unknown load. Not all available equations solvers are suited for such problems, but the
direct solver used as default for structural mechanics can handle it. Because the
structure has a uniform cross section, use a swept mesh.
Global equations do have certain restrictions upon their usage. The global equation
must be continuous and differentiable with respect to all of the unknowns, and it must
not over-constrain, nor under-constrain, the problem. Each global equation should
add one constraint and one degree of freedom to the model. Under these conditions,
the global equations can be used in a variety of ways beyond what is shown here.
Modeling Instructions
From the File menu, choose New.
NEW
1 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>Stationary.
6 Click Done.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
3 In the table, enter the following settings:
GEOMETRY 1
1 In the Model Builder window, under Component 1 (comp1) click Geometry 1.
2 In the Settings window for Geometry, locate the Units section.
3 In the Settings window for Geometry, locate the Units section.
4 From the Length unit list, choose dm.
Helix 1 (hel1)
1 On the Geometry toolbar, click Helix.
2 In the Settings window for Helix, locate the Rotation Angle section.
3 In the Rotation text field, type 180.
4 Click the Build All Objects button.
DEFINITIONS
Next, add an Average operator that you will later use to average the z-directional
displacement field on the end of the spring.
Average 1 (aveop1)
1 On the Definitions toolbar, click Component Couplings and choose Average.
Choose wireframe rendering to get a better view on some boundaries where you will
assign boundary conditions.
2 Click the Wireframe Rendering button on the Graphics toolbar.
3 In the Settings window for Average, locate the Source Selection section.
As an advanced feature, the Global Equations entry is not available by default in the
context menu. In the Model Builder windows toolbar, click the Show button and select
Advanced Physics Options in the menu.
Global Equations 1
1 On the Physics toolbar, click Global and choose Global Equations.
2 In the Settings window for Global Equations, locate the Global Equations section.
3 In the table, enter the following settings:
4 Locate the Units section. Find the Dependent variable quantity subsection. From the
list, choose Force load (N).
5 Find the Source term quantity subsection. From the list, choose Displacement field
(m).
Boundary Load 1
1 On the Physics toolbar, click Boundaries and choose Boundary Load.
2 Select Boundary 4 only.
3 In the Settings window for Boundary Load, locate the Force section.
4 From the Load type list, choose Total force.
5 Specify the Ftot vector as
0 x
0 y
Force z
Fixed Constraint 1
1 On the Physics toolbar, click Boundaries and choose Fixed Constraint.
MATERIALS
Assign material properties. Use Steel AISI 4340 for all domains.
ADD MATERIAL
1 On 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>Steel AISI 4340.
4 Click Add to Component in the window toolbar.
5 On the Home toolbar, click Add Material to close the Add Material window.
MESH 1
Use swept mesh to generate a uniform mesh over the spring domain. Start by
specifying the mesh on one end face of the spring.
Free Triangular 1
1 In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and
choose More Operations>Free Triangular.
Size
1 In the Model Builder window, under Component 1 (comp1)>Mesh 1 click Size.
2 In the Settings window for Size, locate the Element Size section.
3 From the Predefined list, choose Coarser.
Swept 1
In the Model Builder window, right-click Mesh 1 and choose Swept.
Distribution 1
1 In the Model Builder window, under Component 1 (comp1)>Mesh 1 right-click Swept
1 and choose Distribution.
2 In the Settings window for Distribution, locate the Distribution section.
3 In the Number of elements text field, type 200.
STUDY 1
On the Home toolbar, click Compute.
RESULTS
Stress (solid)
The default plot shows the von Mises stress on the surface of the spring. Compare the
plot with Figure 2.
Derived Values
Evaluate the force required to get the displacement specified in the global equations.
Global Evaluation 1
On the Results toolbar, click Global Evaluation.
Derived Values
1 In the Settings window for Global Evaluation, locate the Expression section.
2 In the Expression text field, type Force.
3 Click the Evaluate button.
Finish the result analysis by evaluating the average displacement of the end of the
spring.
Global Evaluation 2
On the Results toolbar, click Global Evaluation.
Derived Values
1 In the Settings window for Global Evaluation, locate the Expression section.
2 In the Expression text field, type aveop1(w).
3 Click the Evaluate button.
TABLE
Go to the Table window to see the results.
Lorenz Attractor
Introduction
The Lorenz system is a system of ordinary differential equations (the Lorenz
equations) first studied by Edward N. Lorenz. For certain parameter values and initial
conditions, the system of ODEs has chaotic solutions. The solution is then a so-called
strange attractor called the Lorenz attractor, discovered by Lorenz in 1962.
Model Definition
The Lorenz equations were developed as a simplified mathematical model for
atmospheric convection. They are a system of three coupled ODEs with three states
(degrees of freedom): u, v, and w.
du
dt = a(v u)
dv
= u(c w) v (1)
dt
dw = uv bw
dt
The parameters a, b, and c are generally positive scalar numbers. Not all solutions are
chaotic, but Lorenz found that the values 10, 8/3, and 28, respectively, give a Lorenz
system with a chaotic behaviorthe Lorenz attractor.
TABLE 1: PARAMETER VALUES FOR A LORENZ ATTRACTOR.
PARAMETER VALUE
a 10
b 8/3
c 28
1 | LORENZ ATTRACTOR
Solved with COMSOL Multiphysics 5.2
Figure 1: The chaotic behavior of the state variables in the Lorenz system.
With the chosen set of parameter values, the Lorentz system behaves as a Lorenz
attractor, and the following point trajectories plot of the phase space shows the typical
butterfly or figure eight pattern from such a Lorenz attractor.
2 | LORENZ ATTRACTOR
Solved with COMSOL Multiphysics 5.2
Figure 2: The typical pattern for a Lorentz attractor visualized using a Point Trajectory
plot of the phase space.
Using the Global ODEs and DAEs interface, it is straightforward to enter the ODEs
that define the Lorentz system in Equation 1.
For a fast solution to a set of coupled ODEs, the explicit Dormand-Prince
time-stepping method is efficient. By adjusting the relative tolerance, you can
control the accuracy of the solution.
In addition to plotting the states versus time, a Point Trajectories plot in the phase
space for the states show the typical butterfly or figure eight pattern.
Reference
1. http://en.wikipedia.org/wiki/Lorenz_system
3 | LORENZ ATTRACTOR
Solved with COMSOL Multiphysics 5.2
Model Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 3D.
2 In the Select physics tree, select Mathematics>ODE and DAE Interfaces>Global ODEs and
DAEs (ge).
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Time Dependent.
6 Click Done.
The ODEs here are dimensionless, so do not use any unit system.
ROOT
1 In the Model Builder window, click the root node.
2 locate the Unit System section.
3 From the Unit system list, choose None.
The parameters a, b, and c are the system parameters for the Lorentz system of ODEs
The default values of 10, 8/3, and 28, respectively, are the values that Lorenz used.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
4 | LORENZ ATTRACTOR
Solved with COMSOL Multiphysics 5.2
Using a Global ODEs and DAEs interface to enter the three ODEs that define a
Lorenz system.
Global Equations 1
1 In the Model Builder window, under Component 1 (comp1)>Global ODEs and DAEs (ge)
click Global Equations 1.
2 In the Settings window for Global Equations, locate the Global Equations section.
3 In the table, enter the following settings:
For an accurate solution, use a smaller relative tolerance and the explicit
Dormand-Prince 5 time-stepping method.
STUDY 1
Solution 1 (sol1)
On the Study toolbar, click Show Default Solver.
5 | LORENZ ATTRACTOR
Solved with COMSOL Multiphysics 5.2
Solution 1 (sol1)
1 In the Model Builder window, expand the Study 1>Solver Configurations>Solution 1
(sol1) node, then click Time-Dependent Solver 1.
2 In the Settings window for Time-Dependent Solver, click to expand the Time
stepping section.
3 Locate the Time Stepping section. From the Method list, choose Runge-Kutta.
4 From the Runge-Kutta method list, choose Dormand-Prince 5.
5 Right-click Study 1>Solver Configurations>Solution 1 (sol1)>Time-Dependent Solver 1
and choose Compute.
Use a Point Trajectories plot to visualize the solution to the Lorenz system as point
trajectories.
RESULTS
3D Plot Group 2
On the Home toolbar, click Add Plot Group and choose 3D Plot Group.
Point Trajectories 1
On the 3D Plot Group 2 toolbar, click More Plots and choose Point Trajectories.
3D Plot Group 2
1 In the Settings window for Point Trajectories, locate the Trajectory Data section.
2 In the x-expression text field, type u.
3 In the y-expression text field, type v.
4 In the z-expression text field, type w.
5 Locate the Coloring and Style section. Find the Line style subsection. From the Type
list, choose Tube.
6 Select the Radius scale factor check box.
7 In the associated text field, type 0.1.
8 Right-click Point Trajectories 1 and choose Color Expression.
9 In the Settings window for Color Expression, locate the Coloring and Style section.
10 From the Color table list, choose Thermal.
6 | LORENZ ATTRACTOR
Solved with COMSOL Multiphysics 5.2
Animation 1
On the Results toolbar, click Animation and choose Play.
Export
1 In the Model Builder window, right-click Animation 1 and choose Generate Frame.
2 In the Settings window for Animation, locate the Scene section.
3 From the Subject list, choose 3D Plot Group 2.
4 Locate the Frames section. In the Number of frames text field, type 200.
5 Right-click Animation 1 and choose Play.
7 | LORENZ ATTRACTOR
Solved with COMSOL Multiphysics 5.2
8 | LORENZ ATTRACTOR
Solved with COMSOL Multiphysics 5.2
Stiffness Analysis of a
Communication Masts Diagonal
Mounting
Introduction
Communication masts usually have a framework with a bolted triangular lattice design
as illustrated in Figure 1. The diagonals of the framework are assembled from several
parts and welded together.
When operating under a given wind load at a specific location, the antennas total
rotation angle should stay below a certain limit to ensure uninterrupted
communications. For the type of mast used in this example, the engineers have
determined that its torsional stiffness is too low, and this effect is due to the geometry
of the diagonal mountings. The goal is to increase the stiffness of such a diagonal
mounting by first analyzing a parameterized geometry followed by an update of the
geometry and a new analysis.
1 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
Mount thickness
Plate thickness
Plate Tube
Mount
Model Definition
The model geometry includes only a short section of the diagonal tubing together
with the other parts of the mounting as illustrated in Figure 1. Although a symmetry
exists in both the geometry and load for this problem, this example models the entire
assembly for illustrative purposes.
After obtaining the stiffness of the diagonal mounting, assume that the geometry has
been updated to improve the stiffness. Originally 10 mm, the plate thickness and
mount thickness (see Figure 1) have been changed to 12 mm and 15 mm, respectively.
MATERIAL PROPERTIES
Assume that the material is a structural steel. This is the default material with a Youngs
modulus of 2.01011 N/m2 and a Poissons ratio of 0.33.
2 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
BOUNDARY CONDITIONS
Figure 2 shows the boundaries with an applied load and constrained displacements.
Assume that the diagonal is loaded in tension by a force, F = 30 kN, which is
transferred through the bolt to the mounting.
Fixed displacement
Applied load
Neglect contact conditions between the bolt and the mounting hole, and also neglect
the constraint imposed on the mount by the bolt. Assume that the bolt fills out the
entire hole volume. The load is distributed on the appropriate halves of the hole
surfaces according to
y 2
p = --------------------------------- --- 1 ----------
F 3
2 ( 2r mh b mh ) 2 r mh
where rmh and bmh are the holes radius and the thickness, respectively.
3 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
F
S = ------
dz
where dz is the average axial displacement at the midplane of the holes, and F is the
applied load.
Compare this formula for the stiffness to an ideal stiffness, which would result if the
diagonal tube were welded to the framework and placed under the same load.
Calculate the ideal stiffness with the equation
2 2
E ( R tb r tb )
S id = ------------------------------------
L
where rtb and Rtb are the tubes inner and outer radii, and L is the total length
measured in the axial direction up to the mid-plane of the mount holes. For the
material under study, the Youngs modulus, E, equals 200 GPa.
The stiffness ratio, SR = S/Sid is 0.41 for the case when the plate thickness and the
mount thickness are 10 mm. With the updated geometry (plate thickness set to 12 mm
and the mount thickness set to 15 mm), the stiffness ratio increases to 0.53.
Figure 3: Deformed shape and boundary plot of the axial displacement for the mounting
assembly with an end-plate thickness of 12 mm and mount thickness of 15 mm.
4 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
Modeling Instructions
From the File menu, choose New.
NEW
1 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>Stationary.
6 Click Done.
GEOMETRY 1
The model geometry is available as a parameterized geometry sequence in a separate
MPH-file.
5 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
DEFINITIONS
Now define integration couplings that you will later use in variables.
Integration 1 (intop1)
1 On the Definitions toolbar, click Component Couplings and choose Integration.
2 In the Settings window for Integration, type tube_r in the Operator name text field.
3 Locate the Source Selection section. From the Geometric entity level list, choose
Point.
6 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
Integration 2 (intop2)
1 On the Definitions toolbar, click Component Couplings and choose Integration.
2 In the Settings window for Integration, type tube_R in the Operator name text field.
3 Locate the Source Selection section. From the Geometric entity level list, choose
Point.
7 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
Integration 3 (intop3)
1 On the Definitions toolbar, click Component Couplings and choose Integration.
2 In the Settings window for Integration, type mount_i in the Operator name text
field.
3 Locate the Source Selection section. From the Geometric entity level list, choose
Point.
8 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
Integration 4 (intop4)
1 On the Definitions toolbar, click Component Couplings and choose Integration.
2 In the Settings window for Integration, type mount_o in the Operator name text
field.
3 Locate the Source Selection section. From the Geometric entity level list, choose
Point.
9 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
Integration 5 (intop5)
1 On the Definitions toolbar, click Component Couplings and choose Integration.
2 In the Settings window for Integration, type mount_m in the Operator name text
field.
3 Locate the Source Selection section. From the Geometric entity level list, choose
Point.
10 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
4 Select Points 9, 13, 18, 22, 55, 59, 64, and 68 only.
Now, define some global variables using the previously defined integration couplings.
Note how the same operator can be used to retrieve different data.
Variables 1
1 On the Definitions toolbar, click Local Variables.
2 In the Settings window for Variables, locate the Variables section.
3 In the table, enter the following settings:
11 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
ADD MATERIAL
1 On 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 Component in the window toolbar.
MATERIALS
12 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
1 On the Home toolbar, click Add Material to close the Add Material window.
Fixed Constraint 1
1 On the Physics toolbar, click Boundaries and choose Fixed Constraint.
2 Select Boundaries 8, 9, 33, and 42 only.
Boundary Load 1
1 On the Physics toolbar, click Boundaries and choose Boundary Load.
13 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
0 x
fy_mh y
fz_mh z
MESH 1
This section illustrates how you can mesh different parts of the model individually to
get a suitable mesh.
Free Tetrahedral 1
1 In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and
choose 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 From the Selection list, choose Mount.
Size 1
1 Right-click Component 1 (comp1)>Mesh 1>Free Tetrahedral 1 and choose Size.
14 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
2 In the Settings window for Size, locate the Element Size section.
3 From the Predefined list, choose Fine.
Free Tetrahedral 1
Right-click Free Tetrahedral 1 and choose Build Selected.
Free Tetrahedral 2
1 Right-click Mesh 1 and choose 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 From the Selection list, choose End plate.
Size 1
1 Right-click Component 1 (comp1)>Mesh 1>Free Tetrahedral 2 and choose Size.
2 In the Settings window for Size, locate the Element Size section.
3 From the Predefined list, choose Finer.
Free Tetrahedral 2
Right-click Free Tetrahedral 2 and choose Build Selected.
Swept 1
1 Right-click Mesh 1 and choose Swept.
2 In the Settings window for Swept, click to expand the Source faces section.
3 Locate the Source Faces section. Select the Active toggle button.
4 Select Boundary 4 only.
5 Click to expand the Destination faces section. Locate the Destination Faces section.
Select the Active toggle button.
6 Select Boundary 3 only.
Size 1
1 Right-click Component 1 (comp1)>Mesh 1>Swept 1 and choose Size.
2 In the Settings window for Size, locate the Element Size section.
3 From the Predefined list, choose Fine.
Swept 1
1 Right-click Swept 1 and choose Build Selected.
15 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
2 Click the Wireframe Rendering button on the Graphics toolbar to restore the default
state.
STUDY 1
On the Home toolbar, click Compute.
RESULTS
Stress (solid)
Now, plot the z displacement and compare the stiffness ratio for the current model
geometry dimensions with the ideal one.
1 In the Model Builder window, expand the Stress (solid) node, then click Surface 1.
2 In the Settings window for Surface, click Replace Expression in the upper-right corner
of the Expression section. From the menu, choose Component 1>Solid
Mechanics>Displacement>Displacement field (Material)>w - Displacement field, Z
component.
3 Locate the Expression section. From the Unit list, choose m.
4 On the Stress (solid) toolbar, click Plot.
5 Click the Zoom Extents button on the Graphics toolbar.
16 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
Global Evaluation 1
On the Results toolbar, click Global Evaluation.
Derived Values
1 In the Settings window for Global Evaluation, click Replace Expression in the
upper-right corner of the Expression section. From the menu, choose Component
1>Definitions>Variables>SR - Stiffness ratio.
2 Click the Evaluate button.
TA BL E
Go to the Table window.
The stiffness ratio obtained is 0.41, which is less than the desired value.
Proceed to add a parametric sweep feature that varies the mount thickness and plate
thickness.
STUDY 1
Parametric Sweep
1 On the Study toolbar, click Parametric Sweep.
2 In the Settings window for Parametric Sweep, locate the Study Settings section.
3 Click Add.
4 In the table, enter the following settings:
5 Click Add.
6 In the table, enter the following settings:
7 Locate the Output While Solving section. Select the Plot check box.
8 On the Study toolbar, click Compute.
RESULTS
Stress (solid)
To display the results from the parametric sweep, change the data set.
17 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
Finally, compare the updated stiffness value for the updated model geometry
dimensions with the ideal one.
Global Evaluation 2
On the Results toolbar, click Global Evaluation.
Derived Values
1 In the Settings window for Global Evaluation, locate the Data section.
2 From the Data set list, choose Study 1/Parametric Solutions 1 (sol2).
3 Click Replace Expression in the upper-right corner of the Expression section. From
the menu, choose Component 1>Definitions>Variables>SR - Stiffness ratio.
4 Click the Evaluate button.
TABLE
Go to the Table window.
18 | S T I F F N E S S A N A L Y S I S O F A C O M M U N I C A T I O N M A S T S D I A G O N A L M O U N T I N G
Solved with COMSOL Multiphysics 5.2
Sensitivity Analysis of a
Communication Mast Detail
Introduction
The example Stiffness Analysis of a Communication Masts Diagonal Mounting in the
COMSOL Multiphysics Application Libraries shows how you can modify a 3D CAD
model to improve its performance. In that case, the applied changes were based solely
on the analysts experience with similar structures. A senior design engineer can
sometimes reach acceptable performance after analyzing only a handful of designs,
while an unexperienced analyst may have to spend a lot of time on failed attempts.
Usually, you can indeed improve a design by trial and error, but it is difficult to ensure
that the price you payin this example, added weight and material costsis as low as
possible. With sensitivity analysis, you can find the most cost-efficient direction for a
small modification and estimate the effect it has before attempting an updated design.
Model Definition
The original model simulates the deformation of a part of a communication mast
(shown in Figure 1) under loads in the linear regime. The ratio of the parts effective
stiffness to the stiffness of an equal length of straight pipe is evaluated as a measure of
its performance. Using sensitivity analysis together with a Deformed Geometry
interface, you can predict what effect changing the dimensions of the end plate and the
mount plates has on the parts relative stiffness.
Mount thickness
Plate thickness
Plate Tube
Mount
From the designers point of view, the material thickness of the end plate, tpl, and of
the mount plates, tmt, are the most relevant parameters because they are easy to change
both in the CAD system and on the production line. These quantities are, however,
not directly comparable to each other because a unit change of tpl incurs a different
costadded weight and material usecompared to a unit change in tmt.
For a fair analysis, it is therefore more convenient to parameterize the model in terms
of the masses mpl and mmt added to the end plate and mount, respectively. The
relation between added mass, m, and thickness change, t, is given by
m = At
where A is the area affected by the thickness change (m2) and is the density of the
material (kg/m3).
As output from a sensitivity analysis using the stiffness ratio, SR, as objective function
and the differential masses mpl and mmt as sensitivity variables, you get the partial
derivatives
S R S R
Q pl = Q mt =
m pl m mt
For a modified geometry corresponding to small values of mpl and mmt you can
therefore expect to see a change in the stiffness ratio equal to
SR = Qplmpl + Qmtmmt. Note that this relation holds only for a small incremental
change from the current configuration because the stiffness ratio is clearly a nonlinear
function of the thicknesses.
Now suppose that you want to select the best possible design update for a given added
mass m = mpl + mmt with the added condition that both mpl and mmt are
nonnegative. It is not too difficult to realize that the best option is to take mpl = m,
mmt = 0 if Qpl > Qmt, and mpl = 0, mmt = m otherwise.
The optimal stiffness for a given total mass of the structure can be sought by relaxing
the nonnegativity condition for the updates and instead restricting the maximum
change in mpl and mmt during one iteration. With the total mass as only constraint,
you find the optimum design at a point where Qpl = Qmt. This follows strictly from the
Karush-Kuhn-Tucker conditions but also from the simple fact that at such a point, the
increased stiffness from adding mass to the plate is exactly canceled by the decrease in
stiffness from removing the same mass from the mount.
When doing sensitivity analysis, these boundary conditions are quite simple: on fixed
surfaces, set the mesh displacement to zero; on surfaces that may be modified, specify
the displacement in terms of the sensitivity variables. In this particular case, where the
material thickness of the end plate and the mount can change, it is enough to set the
normal displacement of these surfaces equal to the thickness change calculated from
the corresponding added mass. For the latter calculation, assume the total undeformed
length of the part to be fixed and define mpl as the net mass added when tpl increases.
Another potential source of errors must be checked more carefully, though. Changing
the material thickness of the mount also changes the area where the loading is applied.
In the Solid Mechanics interface, you specify the load as a given force per area. If you
keep this number fixed when the thickness of the part changes, the total applied load
also changes; when evaluating the stiffness ratio of the composite part you must
account for this effect.
Alternatively, you can keep the total force fixed and make sure that the applied force
per unit area is calculated using a hole area that follows the parametrization of the
geometry. It turns out that in the original model, the applied load is indeed calculated
based on a hole area that is evaluated using integration coupling operators sensitive to
deformation of the geometry.
Note that these conclusions only hold for the current instance of the design. An
experienced analyst quickly realizes that the compliance of the plate is due to bending
action, while the mount is in almost pure tension. A plates resistance to bending grows
as its thickness cubed, while resistance to tension is proportional to the cross-sectional
area. Therefore, as the thickness of the plate increases, its contribution to the
compliance of the composite part decreases rapidly.
If you increase the thickness of the end plate too much, the compliance of the mount
takes over as dominant factor in the overall behavior. Using sensitivity analysis, you can
easily detect when this happens, because it leads to Qmt > Qpl. As noted above, an
optimum design for a given total mass is found when Qpl = Qmt.
Because the sensitivity analysis was performed using the forward method, the
derivatives of the solution with respect to the parameters mpl and mmt have also
been stored. You can access this data when processing the results by using the syntax
sens(expr,var). For example, by plotting the expression sens(w,dm_mt), you can
directly examine the local effect of a unit increase in the mount mass; see Figure 2.
Note that, interestingly, increasing the material thickness in the mount reduces the
bending of the end plate. The reason is probably that, as the mount plates are getting
thicker, they transfer the load closer to the edge of the end plate.
Figure 2: According to the linear approximation, increasing the thickness of the end plate
by 5 mm would reduce its bending and make the mount plates nearly parallel.
Modeling Instructions
From the File menu, choose Open.
Browse to the applications Application Library folder and double-click the file
mast_diagonal_mounting.mph.
ADD PHYSICS
1 On the Home toolbar, click Add Physics to open the Add Physics window.
2 Go to the Add Physics window.
3 In the Add physics tree, select Mathematics>Deformed Mesh>Deformed Geometry (dg).
ADD STUDY
1 On 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 Preset Studies>Stationary.
4 Click Add Study in the window toolbar.
5 On the Home toolbar, click Add Study to close the Add Study window.
GLOBAL DEFINITIONS
Modify the parameters for the plate thickness and mount thickness to correspond to
the updated configuration of the original model.
Parameters
1 In the Model Builder window, expand the Global Definitions node, then click
Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
3 In the table, enter the following settings:
Next, define the masses added to the plate and mount that you will use later as
global control variables.
4 In the table, enter the following settings:
DEFINITIONS
Create a selection for the domains where the mesh will be allowed to deform.
Union 1
1 On the Definitions toolbar, click Union.
2 In the Settings window for Union, locate the Input Entities section.
Add model couplings for integrating over the flat surfaces of the plate and mount.
Integration 6 (intop6)
1 On the Definitions toolbar, click Component Couplings and choose Integration.
2 In the Settings window for Integration, type dA_mt in the Operator name text field.
3 Locate the Source Selection section. From the Geometric entity level list, choose
Boundary.
4 Select Boundaries 15 and 56 only.
6 In the Create Selection dialog box, type Outer mount faces in the Selection name
text field.
7 Click OK.
8 Right-click Integration 6 (intop6) and choose Rename.
9 In the Rename Integration dialog box, type Outer mount faces in the New label
text field.
10 Click OK.
Integration 7 (intop7)
1 On the Definitions toolbar, click Component Couplings and choose Integration.
2 In the Settings window for Integration, type dA_pl in the Operator name text field.
3 Locate the Source Selection section. From the Geometric entity level list, choose
Boundary.
4 Select Boundary 4 only.
Next, define variables for the displacements as functions of the added masses.
Variables 2
1 On the Definitions toolbar, click Local Variables.
2 In the Settings window for Variables, locate the Variables section.
3 In the table, enter the following settings:
The mass per unit thickness for the plate refers to the area outside the surface where
the plate connects to the mount; thus, it gives the net added mass when the
thickness of the plate increases.
4 Right-click Variables 2 and choose Rename.
5 In the Rename Variables dialog box, type Sensitivity Variables in the New label
text field.
6 Click OK.
Free Deformation 1
1 On the Physics toolbar, click Domains and choose Free Deformation.
2 In the Settings window for Free Deformation, locate the Domain Selection section.
DEFINITIONS
The virtual boundary displacements must be described in a boundary system which
does not rotate with the deformation.
STUDY 2
Now, set up the study. In particular, you need to add a Sensitivity node. But first, you
must enable advanced study options.
1 In the Model Builder windows toolbar, click the Show button and select Advanced
Study Options in the menu.
Sensitivity
1 In the Model Builder window, right-click Study 2 and choose Sensitivity.
By using the forward method, you will have access to the derivatives of the solution
with respect to the sensitivity variables dm_pl and dm_mt.
2 In the Settings window for Sensitivity, locate the Sensitivity Method section.
3 From the Gradient method list, choose Forward.
The stiffness ratio computed in the original model serves as the objective function.
4 Click Replace Expression in the upper-right corner of the Objective function section.
From the menu, choose Component 1 (comp1)>Definitions>Variables>comp1.SR -
Stiffness ratio.
5 Locate the Control Variables and Parameters section. Click Add.
6 Click Add.
7 In the table, enter the following settings:
RESULTS
Derived Values
Begin by evaluating the sensitivities of the stiffness ratio with respect to the two types
of small additions.
Global Evaluation 3
On the Results toolbar, click Global Evaluation.
Derived Values
1 In the Settings window for Global Evaluation, locate the Data section.
2 From the Data set list, choose Study 2/Solution 5 (sol5).
3 Locate the Expression section. In the Expression text field, type fsens(dm_mt).
4 Click the Evaluate button.
5 Right-click Global Evaluation 3 and choose Duplicate.
6 In the Settings window for Global Evaluation, locate the Expression section.
7 In the Expression text field, type fsens(dm_pl).
8 Right-click Results>Derived Values>Global Evaluation 4 and choose Evaluate>Table 3
- Global Evaluation 3 (fsens(dm_mt)).
3D Plot Group 4
1 On the Results toolbar, click 3D Plot Group.
2 In the Settings window for 3D Plot Group, locate the Data section.
3 From the Data set list, choose Study 2/Solution 5 (sol5).
4 Right-click 3D Plot Group 4 and choose Surface.
5 In the Settings window for Surface, locate the Expression section.
6 In the Expression text field, type sens(w,dm_mt).
7 Locate the Coloring and Style section. From the Color table list, choose Thermal.
8 On the 3D Plot Group 4 toolbar, click Plot.
9 Right-click Results>3D Plot Group 4>Surface 1 and choose Deformation.
10 In the Settings window for Deformation, locate the Expression section.
11 In the X component text field, type u+5[mm]*mA_pl*sens(u,dm_pl).
12 In the Y component text field, type v+5[mm]*mA_pl*sens(v,dm_pl).
MicromixerBatch Version
Introduction
The purpose of this example is to demonstrate how to access the batch functionality in
COMSOL from the COMSOL Desktop and use it on your computer. The model also
demonstrates how you can measure the speedup of COMSOL on your computer. The
speedup is defined as the quotient between the total runtime using only one core of
the machine and the runtime using all cores of the machine.
Modeling Instructions
APPLICATION LIBRARY
1 On the Home toolbar, click Application Libraries.
2 In the Application Library tree, select COMSOL Multiphysics>Fluid
Dynamics>micromixer.
3 Click Open Application.
STUDY 1
1 In the Model Builder windows toolbar, click the Show button and select Advanced
Study Options in the menu.
With this setting active, Batch is available from the Study node's context menu.
Batch
1 In the Model Builder window, right-click Study 1 and choose Batch.
1 | M I C R O M I X E R B A T C H VE R S I O N
Solved with COMSOL Multiphysics 5.2
2 In the Settings window for Batch, locate the Batch Settings section.
In the Study Settings section of the Settings window for Batch, you specify where
to store the model for the batch job:
Enter a suitable filename in the Filename text field, and specify a directory by clicking
Browse and then making a choice in the Batch Directory dialog box or by typing in
the directory path directly in the Directory text field.
3 On the Home toolbar, click Compute.
When the process has finished, you are automatically transferred to the External
Process node for the batch job you just ran.
External Process 1
1 In the External Process settings window, locate the General section.
In the General section, click Open to open the file containing the model generated
by the batch job associated with this external process in a new COMSOL session.
In the Process Status section, the log shows the total solution time. COMSOL
automatically takes advantage of all cores; to measure the speedup, set the number
of cores to 1 and run another batch job.
Batch 1
1 In the Model Builder window, click Study 1>Job Configurations>Batch 1.
2 In the Settings window for Batch, locate the General section.
3 From the Defined by study step list, choose User defined.
4 Select the Number of cores check box.
Verify that the setting in the associated text field is 1.
Next, change the filename to create a new External Process node for the run:
5 Locate the Files section. In the associated text field, enter a name of your choice.
6 Click the Run button.
When the process has finished, compare the total time in the log for the new external
process with the previous value. The speedup is equal to the previous value divided
by the new value. The speedup is dependent on the mesh size. To improve the
numbers, try refining the mesh.
2 | M I C R O M I X E R B A T C H VE R S I O N
Solved with COMSOL Multiphysics 5.2
MicromixerCluster Version
Introduction
The purpose of this example is to demonstrate how to access the cluster computing
functionality in COMSOL from the COMSOL Desktop and use it to submit a batch
job to a cluster through a job scheduler. The model also demonstrates how you can
measure the speedup of COMSOL on your computer. The speedup is defined as the
quotient between the total runtime using only one physical node and one core of the
cluster and the runtime using several physical nodes and all cores of each physical node
of the cluster.
For detailed information about the model, see Micromixer. For information about
how to set up a COMSOL for running on a cluster, see the COMSOL Multiphysics
Installation Guide.
Modeling Instructions
APPLICATION LIBRARY
1 On the Home toolbar, click Application Libraries.
2 In the Application Library tree, select COMSOL Multiphysics>Fluid
Dynamics>micromixer.
3 Click Open Application.
1 | M I C R O M I X E R C L U S T E R VE R S I O N
Solved with COMSOL Multiphysics 5.2
STUDY 1
1 In the Model Builder windows toolbar, click the Show button and select Advanced
Study Options in the menu.
With this setting active, Cluster Computing is available from the Study node's
context menu.
Cluster Computing
1 In the Model Builder window, right-click Study 1 and choose Cluster Computing.
2 In the Settings window for Cluster Computing, locate the Batch Settings section.
Choose from one of the following settings the type of job scheduler to use:
General: Use the General scheduler if you intend to submit a job to a job scheduler
that you have configured COMSOL to run on.
HPCS 2008: Use the HPCS 2008 scheduler if you intend to submit a job to a
Windows HPC Server 2008 using the Windows HPC Cluster Manager.
WCCS 2003: Use the WCCS 2003 scheduler if you intend to submit a job to a
Windows Compute Cluster Server 2003.
3 From the Scheduler type list, choose Not distributed.
Not Distributed: Use this setting when you have configured COMSOL to run on
job scheduler but only intend to run on a single node of the cluster.
Make sure you configure the batch directories and COMSOL installation directories
correctly. It is good practice to save these values as default once you have good
settings.
4 Click the Save as Default button.
Only MUMPS and SPOOLES are distributed so you need to enable the direct
solver to get distributed speedup.
Solution 1 (sol1)
1 In the Model Builder window, expand the Study 1>Solver Configurations>Solution
1(sol1)>Stationary Solver 1 node.
2 Right-click Direct and choose Enable.
3 In the Model Builder window, expand the Study 1>Solver Configurations>Solution
1(sol1)>Stationary Solver 2 node.
4 Right-click Direct and choose Enable.
5 On the Home toolbar, click Compute.
2 | M I C R O M I X E R C L U S T E R VE R S I O N
Solved with COMSOL Multiphysics 5.2
Batch 1
In the General section, click Open to open the file containing the model generated
by the batch job associated with this external process in a new COMSOL session.
In the Process Status section, the log shows the total solution time. COMSOL
automatically takes advantage of all cores; to measure the speedup, set the number
of cores to 1 and run a new job.
1 In the Model Builder window, click Batch 1.
2 In the Settings window for Batch, locate the General section.
3 From the Defined by study step list, choose User defined.
4 Select the Number of cores check box.
Verify that the setting in the associated text field is 1.
Next, change the filename to create a new External Process node for the run:
5 Locate the Files section. In the Filename text field, enter a name of your choice.
Cluster Computing 1
If you are not using the cluster type Not distributed, make sure to set the Number of
nodes to 1.
1 In the Model Builder window, under Study 1>Job Configurations right-click Cluster
Computing 1 and choose Run.
When the process has finished, compare the total time in the log for the new external
process with the previous value. The speedup is equal to the previous value divided
by the new value. The speedup depends on the mesh size. To improve the numbers,
try refining the mesh.
3 | M I C R O M I X E R C L U S T E R VE R S I O N
Solved with COMSOL Multiphysics 5.2
4 | M I C R O M I X E R C L U S T E R VE R S I O N
Solved with COMSOL Multiphysics 5.2
Pacemaker Electrode
Introduction
This example illustrates the use of COMSOL Multiphysics for modeling of ionic
current distribution problems in electrolytes, in this case in human tissue. The problem
is exemplified on a pacemaker electrode, but it can be applied in electrochemical cells
like fuel cells, batteries, corrosion protection, or any other process where ionic
conduction takes place in the absence of concentration gradients.
The modeled device is a pacemaker electrode that is placed inside the heart and helps
the patients heart to keep a normal rhythm. The device is referred to as an electrode,
but it actually consists of two electrodes: a cathode and an anode.
Figure 1 shows a schematic drawing of two pair of electrodes placed inside the heart.
The electrodes are supplied with current from the pulse generator unit, which is also
implanted in the patient.
Pulse generator
Pacing leads
Left atrium
Left ventricle
Right atrium
Right ventricle
Figure 1: Schematic drawing of the heart with two pairs of pacemaker electrodes.
This example deals with the current and potential distribution around one pair of
electrodes.
Model Definition
The model domain consists of the blood and tissue surrounding the electrode pair. The
actual electrodes and the electrode support are boundaries to the modeled domain.
Figure 2 shows the electrode in a darker shade, while the surrounding modeling
1 | PACEMAKER ELECTRODE
Solved with COMSOL Multiphysics 5.2
Outer boundaries of
the domain
Insulated surfaces of
the device
The working electrode consists of a a hemisphere placed on the tip of the supporting
cylindrical structure. The counter electrode is placed in the waist of this structure.
All other surfaces of the supporting structure are insulated. The outer boundaries are
placed far enough from the electrode to give a small impact on the current and
potential distribution.
In COMSOL Multiphysics, use the Electric Currents interface for the analysis of the
electrode. This physics interface is useful for modeling conductive materials where a
current flows due to an applied electric field.
DOMAIN EQUATIONS
The current in the domain is controlled by the continuity equation, which follows
from Maxwells equations:
( V ) = 0
where is the conductivity of the human tissue. This equation uses the following
relations between the electric potential and the fields.
E = V
J = E
2 | PACEMAKER ELECTRODE
Solved with COMSOL Multiphysics 5.2
BOUNDARY CONDITIONS
Ground potential boundary conditions are applied on the thinner waist of the
electrode. The tip of the electrode has a fixed potential of 1 V. All other boundaries are
electrically insulated.
nJ = 0
Figure 3: The plot shows the electrostatic potential distributed on the surface of the
electrode. The total current density is shown as streamlines.
As expected, the current density is highest at the small hemisphere, which is the one
that causes the excitation of the heart. The current density is fairly uniform on the
working electrode. The counter electrode is larger and there are also larger variations
in current density on its surface. Mainly, the current is lower with increasing distance
from the working electrode. The model shows that the anchoring arms of the device
have little influence on the current density distribution.
3 | PACEMAKER ELECTRODE
Solved with COMSOL Multiphysics 5.2
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 3D.
2 In the Select physics tree, select AC/DC>Electric Currents (ec).
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Stationary.
6 Click Done.
GEOMETRY 1
Although you can readily build the pacemaker geometry from geometric primitives
using the CAD tools in COMSOL Multiphysics, it is supplied as a COMSOL
Multiphysics geometry file for convenience.
Import 1 (imp1)
1 On the Home toolbar, click Import.
2 In the Settings window for Import, locate the Import section.
3 Click Browse.
4 Browse to the applications Application Library folder and double-click the file
pacemaker_electrode.mphbin.
4 | PACEMAKER ELECTRODE
Solved with COMSOL Multiphysics 5.2
5 Click Import.
Next, define the volume surrounding the electrode. The simulation only takes place in
this volume, where the boundaries of the electrode influence the result.
Cylinder 1 (cyl1)
1 On the Geometry toolbar, click Cylinder.
2 In the Settings window for Cylinder, locate the Size and Shape section.
3 In the Radius text field, type 0.01.
4 In the Height text field, type 0.04.
5 Locate the Position section. In the z text field, type -0.02.
6 Right-click Component 1 (comp1)>Geometry 1>Cylinder 1 (cyl1) and choose Build
Selected.
7 Click the Go to Default 3D View button on the Graphics toolbar.
Difference 1 (dif1)
1 On the Geometry toolbar, click Booleans and Partitions and choose Difference.
2 Select the object cyl1 only.
3 In the Settings window for Difference, locate the Difference section.
4 Find the Objects to subtract subsection. Select the Active toggle button.
5 Select the object imp1 only.
5 | PACEMAKER ELECTRODE
Solved with COMSOL Multiphysics 5.2
MATERIALS
A convenient way to find out which material parameters you need to specify is to add
a material. COMSOL Multiphysics then indicates any missing parameters for the
physics interfaces you have added to the model.
Material 1 (mat1)
1 In the Model Builder window, under Component 1 (comp1) right-click Materials and
choose Blank Material.
By default, the first material you add applies to all domains, so you do not need to
modify the geometric scope.
The electrode is inserted into the human heart, so you must specify the conductivity
for the heart tissue.
2 In the Settings window for Material, locate the Material Contents section.
6 | PACEMAKER ELECTRODE
Solved with COMSOL Multiphysics 5.2
Ground 1
1 On the Physics toolbar, click Boundaries and choose Ground.
2 Select Boundaries 29, 30, 58, and 63 only.
The easiest way to do this is by entering these numbers in the dialog box that opens
if you click the Paste Selection button in the Boundaries Selection section.
Optionally, you can create a named selection for these boundaries as follows:
3 In the Settings window for Ground, locate the Boundary Selection section.
4 Click Create Selection.
5 In the Create Selection dialog box, type Counter Electrode in the Selection name
text field.
6 Click OK.
Electric Potential 1
1 On the Physics toolbar, click Boundaries and choose Electric Potential.
2 Select Boundaries 31, 32, 59, and 60 only.
3 In the Settings window for Electric Potential, locate the Electric Potential section.
4 In the V0 text field, type 1.
5 Locate the Boundary Selection section. Click Create Selection.
6 In the Create Selection dialog box, type Spherical Electrode in the Selection name
text field.
7 Click OK.
7 | PACEMAKER ELECTRODE
Solved with COMSOL Multiphysics 5.2
MESH 1
1 In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and
choose Build All.
STUDY 1
Use the default settings for the stationary solver, which gives the conjugate gradients
iterative solver with algebraic multigrid as the preconditioner.
DEFINITIONS
The default plot shows the slices of the electrical potential. To reproduce the plot
shown in Figure 3, start by resetting the transparency state and instead hide the outer
boundaries.
View 1
1 On the View 1 toolbar, click Hide Geometric Entities.
2 In the Settings window for Hide Geometric Entities, locate the Geometric Entity
Selection section.
3 From the Geometric entity level list, choose Boundary.
4 Select Boundaries 14, 45, and 74 only.
8 | PACEMAKER ELECTRODE
Solved with COMSOL Multiphysics 5.2
RESULTS
3D Plot Group 2
1 On the Home toolbar, click Add Plot Group and choose 3D Plot Group.
2 In the Settings window for 3D Plot Group, locate the Plot Settings section.
3 Clear the Plot data set edges check box.
4 Right-click Results>3D Plot Group 2 and choose Surface.
5 On the 3D Plot Group 2 toolbar, click Plot.
Combine the surface plot of the potential with streamlines visualizing the total
current density.
6 In the Model Builder window, right-click 3D Plot Group 2 and choose Streamline.
7 In the Settings window for Streamline, locate the Selection section.
8 Select the Active toggle button.
9 From the Selection list, choose All boundaries.
10 Locate the Streamline Positioning section. From the Positioning list, choose Start
point controlled.
11 Locate the Coloring and Style section. From the Line type list, choose Tube.
9 | PACEMAKER ELECTRODE
Solved with COMSOL Multiphysics 5.2
12 In the Tube radius expression text field, type ec.normJ. This is the variable for the
current density norm.
To get suitably thick streamlines you need to adjust the scale factor.
10 | PACEMAKER ELECTRODE
Solved with COMSOL Multiphysics 5.2
Model Definition
The model geometry appears in Figure 1. At the upper inlet, a gas stream with high
oxygen content enters the reactor at a velocity of 10 mm/s, while a gas with a lower
oxygen level enters from the left. The oxygen concentration is measured at a
measurement point, and the inlet velocity of the less concentrated stream is altered by
the PID control algorithm to achieve the desired concentration at that point.
Upper inlet
Measurement point
Controlled inlet
Outlet
The model uses the Laminar Flow interface to describe the fluid flow and the
Transport of Diluted Species interface for the mass balance. The corresponding
equations read (assuming incompressible flow and absence of reactions)
u T
[ ( u + ( u ) ) ] + u u + p = 0
t
u = 0
----c-
+ ( D c ) = u c
t
BOUNDARY CONSTRAINT
BOUNDARY CONSTRAINT
Outlet n (Dc) = 0
Walls Nn=0
Here c is the concentration; cin,top and cin,inlet are the inlet concentrations (mol/m3)
for the upper and controlled inlets, respectively; D is the applied diffusivity (m2/s);
and N is the molar flux (mol/(m2s)).
The model uses the following boundary conditions for the fluid flow:
BOUNDARY CONSTRAINT
Here u is the velocity vector (m/s), vin,top is the inlet velocity at the top inlet, and uin
is the PID controlled velocity. At the outlet, set the pressure to 0. No Slip boundary
conditions describe all walls except the inlet sections where slip conditions apply,
allowing for a smooth transition to a laminar velocity profile.
t
u in = k P ( c c set ) + k I ( c c set ) dt + k D ----- ( c c set )
t
(1)
0
PARAMETER VALUE
In practice, the derivative constant, kD, is set to 0 in most cases as this parameter can
be difficult to determine. Moreover, the derivative term may increase the fluctuations
in the system because it amplifies noise in the error c cset.
Figure 2: Oxygen concentration and velocity streamlines after 0.1 s (top) and 1.5 s
(bottom).
Figure 3 shows the inlet velocity and concentration in the measurement point as a
function of time for two different values for the kP parameter. The solid line represents
the results for a kP value of 0.5 m4/(mols) while the dashed line corresponds to kP
equal to 0.1 m4/(mols). The results evaluated for the smaller kP value oscillate more
before stabilizing. Thus, it is clear that for this case the higher kP value yields a more
stable process control.
Figure 3: PID-controlled inlet velocity (top) and concentration in the measurement point
(bottom) as a function of time for kP = 0.5 m4/(mols) (blue) and kP = 0.1 m4/(mols)
(green).
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 2D.
2 In the Select physics tree, select Fluid Flow>Single-Phase Flow>Laminar Flow (spf).
3 Click Add.
4 In the Select physics tree, select Chemical Species Transport>Transport of Diluted
Species (tds).
5 Click Add.
6 In the Select physics tree, select Mathematics>ODE and DAE Interfaces>Global ODEs and
DAEs (ge).
7 Click Add.
8 Click Study.
9 In the Select study tree, select Preset Studies for Selected Physics Interfaces>Time
Dependent.
10 Click Done.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
GEOMETRY 1
Create the geometry. To simplify this step, insert a prepared geometry sequence.
MATERIALS
Material 1 (mat1)
1 In the Model Builder window, under Component 1 (comp1) right-click Materials and
choose Blank Material.
2 Select Domain 1 only.
3 In the Settings window for Material, locate the Material Contents section.
4 In the table, enter the following settings:
Inlet 1
1 On the Physics toolbar, click Boundaries and choose Inlet.
2 Select Boundary 1 only.
3 In the Settings window for Inlet, locate the Velocity section.
4 In the U0 text field, type u_in_ctrl*(u_in_ctrl>0).
Inlet 2
1 On the Physics toolbar, click Boundaries and choose Inlet.
2 Select Boundary 7 only.
3 In the Settings window for Inlet, locate the Velocity section.
4 In the U0 text field, type v_in_top.
Outlet 1
1 On the Physics toolbar, click Boundaries and choose Outlet.
2 Select Boundary 13 only.
Wall 2
1 On the Physics toolbar, click Boundaries and choose Wall.
2 Select Boundaries 2, 3, 6, and 8 only.
3 In the Settings window for Wall, locate the Boundary Condition section.
4 From the Boundary condition list, choose Slip.
TR A N S P O R T O F D I L U T E D S P E C I E S ( T D S )
Transport Properties 1
1 In the Model Builder window, under Component 1 (comp1)>Transport of Diluted
Species (tds) click Transport Properties 1.
2 In the Settings window for Transport Properties, locate the Diffusion section.
3 In the Dc text field, type D.
4 Locate the Model Inputs section. From the u list, choose Velocity field (spf).
Initial Values 1
1 In the Model Builder window, under Component 1 (comp1)>Transport of Diluted
Species (tds) click Initial Values 1.
2 In the Settings window for Initial Values, locate the Initial Values section.
3 In the c text field, type c00.
Inflow 1
1 On the Physics toolbar, click Boundaries and choose Inflow.
2 Select Boundary 1 only.
3 In the Settings window for Inflow, locate the Concentration section.
4 In the c0,c text field, type c_in_inlet.
Inflow 2
1 On the Physics toolbar, click Boundaries and choose Inflow.
2 Select Boundary 7 only.
3 In the Settings window for Inflow, locate the Concentration section.
4 In the c0,c text field, type c_in_top.
Outflow 1
1 On the Physics toolbar, click Boundaries and choose Outflow.
2 Select Boundary 13 only.
DEFINITIONS
Next, add a probe to sample the concentration and its time derivative at the point x =
0, y = -0.002.
9 Locate the Expression section. In the Expression text field, type ct.
Variables 1
1 On the Definitions toolbar, click Local Variables.
2 In the Settings window for Variables, locate the Variables section.
3 In the table, enter the following settings:
The nojac operator ensures that the above expression gives no Jacobian
contribution. In practice, this means that the control velocity will always be
evaluated based on the previous time step. This is necessary to avoid evaluation of
an implicit time derivative in the inlet condition, which is not supported in the time
dependent solver.
Moreover, 'I' refers to the time integral in Equation 1, which you define next.
Global Equations 1
1 In the Model Builder window, expand the Component 1 (comp1)>Global ODEs and
DAEs (ge) node, then click Global Equations 1.
2 In the Settings window for Global Equations, locate the Global Equations section.
3 In the table, enter the following settings:
MESH 1
1 In the Model Builder window, under Component 1 (comp1) click Mesh 1.
2 In the Settings window for Mesh, locate the Mesh Settings section.
3 From the Element size list, choose Finer.
4 Click the Build All button.
STUDY 1
Use a parametric sweep to solve for two different values of the proportional parameter,
k_P.
Parametric Sweep
1 On the Study toolbar, click Parametric Sweep.
2 In the Settings window for Parametric Sweep, locate the Study Settings section.
3 Click Add.
4 In the table, enter the following settings:
Solution 1 (sol1)
1 On the Study toolbar, click Show Default Solver.
2 In the Model Builder window, expand the Solution 1 (sol1) node, then click
Time-Dependent Solver 1.
3 In the Settings window for Time-Dependent Solver, click to expand the Time
stepping section.
4 Locate the Time Stepping section. From the Method list, choose Generalized alpha.
5 From the Steps taken by solver list, choose Intermediate.
This forces the solver to take at least one step in each of the time intervals you
specified.
6 Click to expand the Advanced section. Locate the Time Stepping section. Find the
Algebraic variable settings subsection. From the Error estimation list, choose Exclude
algebraic.
7 On the Study toolbar, click Compute.
TABLE
Go to the Table window.
RESULTS
Velocity (spf)
The presence of the derivative term leads to a warning message from the solver. As
already mentioned in the introduction, this term is difficult to determine and also
sensitive to noise, so it is often set to 0.
Concentration (tds)
Add a streamline plot of the velocity to the default surface plot that shows the
concentration at the end of the simulated time span (Figure 2). Study the solution at
t = 0.05 s and t = 2 s.
1 In the Model Builder window, under Results right-click Concentration (tds) and
choose Streamline.
2 In the Settings window for Streamline, locate the Streamline Positioning section.
3 From the Positioning list, choose Magnitude controlled.
4 In the Density text field, type 10.
5 On the Concentration (tds) toolbar, click Plot.
6 In the Model Builder window, click Concentration (tds).
7 In the Settings window for 2D Plot Group, locate the Data section.
8 From the Time (s) list, choose 0.05.
9 On the Concentration (tds) toolbar, click Plot.
10 Click the Zoom Extents button on the Graphics toolbar.
11 From the Time (s) list, choose 3.
12 On the Concentration (tds) toolbar, click Plot.
1D Plot Group 4
Plot the PID-controlled inlet velocity (Figure 3).
7 Click to expand the Legends section. Find the Include subsection. Clear the
Description check box.
8 On the 1D Plot Group 4 toolbar, click Plot.
1D Plot Group 6
1 In the Model Builder window, right-click 1D Plot Group 4 and choose Duplicate.
2 In the Settings window for 1D Plot Group, click to expand the Title section.
3 From the Title type list, choose Manual.
4 In the Title text area, type Concentration, measurement point.
5 Locate the Plot Settings section. In the y-axis label text field, type c<sub>mp</sub>
(mol/m<sup>3</sup>).
6 In the Model Builder window, expand the 1D Plot Group 6 node, then click Global 1.
7 In the Settings window for Global, click Replace Expression in the upper-right corner
of the y-axis data section. From the menu, choose Component 1>Definitions>c_mp -
Probe variable c_mp.
8 On the 1D Plot Group 6 toolbar, click Plot.
The resulting plot should look like that in the lower panel of Figure 3.
Model Definition
Create a tetrahedral mesh for the geometry of an engine piston as shown in the
following figure.
As you can see the geometry contains small details such as fillets and chamfers. To
better resolve these details with the mesh you will work with the following mesh
parameters:
1 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
You will also learn how to use the tools for assessing the mesh quality.
Modeling Instructions
NEW
1 From the File menu, choose New.
2 In the New window, click the Blank Model button.
3 On the Home toolbar, click Add Component and choose 3D.
GEOMETRY 1
Import 1
1 On the Home toolbar, click Import.
2 In the Settings window for Import, locate the Import section.
3 Click the Browse button.
4 In your COMSOL installation directory navigate to the folder applications/
COMSOL_Multiphysics/Meshing_Tutorials/ and double-click the file
piston_quarter.mphbin.
5 Click Import.
2 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
The Messages window indicates that there are roughly 27,000 tetrahedral elements
in this mesh.
Assume that the current mesh does not resolve details such as fillets and chamfers
sufficiently for your simulation needs and a finer parameter setting is required. This
would be the case for a stress analysis of the part.
2 In the Settings window for Mesh, locate the Mesh Settings section.
3 From the Element size list, choose Finer.
3 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
This mesh consists of approximately 358,000 elements. Many of the finer details of
the geometry are adequately resolved, but there is a significant increase in the total
number of elements compared to the Normal mesh setting.
In the following you will test how to tune mesh parameters to refine the mesh only
on selected boundaries.
MESH STATISTICS
Continue with examining the quality of the mesh.
4 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
The Statistics window contains details about the mesh, including the number and
type of elements, and a histogram of element quality.
The element quality has a value between 0 and 1, where 1 describes a perfectly
symmetric element and 0 describes a degenerated, or completely flat, element. For
3D meshes in general a minimum quality of about 0.1 means a satisfactory mesh.
5 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
However, this depends on the type of geometry and physics application. Note also
that the quality number is calculated based on the linear elements.
Meshing with predefined parameter sets usually results in a mesh with quite good
quality. According to the information under the section Domain element statistics,
the present mesh has an average quality of 0.72 with a minimum quality of 0.12.
The histogram reveals the element quality distribution. In this case, the elements
with low quality, represented by the tail of the distribution plot, represent a very
small fraction of the mesh.
Before adjusting individual mesh parameters start by restoring the mesh with the
Normal size settings.
2 Right-click Component 1 (comp1)>Mesh 1 and choose Settings.
3 In the Mesh settings window, locate the Mesh Settings section.
4 From the Element size list, choose Normal.
5 Click the Build All button.
MESHING SEQUENCE
1 Right-click Component 1 (comp1)>Mesh 1 and choose Edit Physics-Induced Sequence.
You can now access and modify the default meshing sequence that appears under
the Mesh 1 node.
The first Size feature node in the meshing sequence is a global attribute node, since
it influences all subsequent operation nodes in the meshing sequence. This first Size
node cannot be deleted from the sequence.
Instead of editing parameters of the global Size node add a Size node to the Free
Tetrahedral 1 mesh operation.
2 In the Model Builder window, under Component 1 (comp1)>Mesh 1 right-click Free
Tetrahedral 1 and choose Size.
The Size 1 node is a local attribute node because it only applies to its parent mesh
node.
RESOLUTION OF CURVATURE
1 In the Settings window for Size, locate the Geometric Entity Selection section.
2 From the Geometric entity level list, choose Boundary.
6 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
By selecting only one of the fillets you can save time generating the mesh while
testing parameter values. You will be able to change the selection of the Size 1 node
to all boundaries after you have found the right set of parameters.
4 In the Settings window for Size, locate the Element Size section.
5 Click the Custom button.
6 Locate the Element Size Parameters section. Select the Curvature factor check box.
7 In the associated text field, type 0.2.
The Curvature factor parameter determines the size of boundary elements compared
to the curvature of the geometric boundary. The curvature radius multiplied by the
curvature factor gives the maximum allowed element size along the boundary. A
lower value gives a finer mesh along curved boundaries.
8 Click the Build All button.
Zoom in on the selected boundary for a closer look at the mesh.
Boundary 39
7 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
It seems that reducing the resolution of curvature had almost no effect on the number
of mesh elements on the fillet. The reason is that another mesh parameter limits the
minimum element size allowed in the mesh.
This time the selected boundary has a much finer mesh. Adjust the mesh again by
increasing the resolution of curvature.
6 In the Settings window for Size, locate the Element Size Parameters section.
7 In the Curvature factor text field, type 0.45.
8 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
Now assume that you also want a better resolution of narrow regions with no
curvature such as chamfers.
Boundary 8
Narrow
region
2 In the Settings window for Size, locate the Element Size Parameters section.
3 Select the Resolution of narrow regions check box.
4 In the associated text field, type 2.
The Resolution of narrow regions mesh parameter controls the number of element
layers that are created in narrow regions (approximately). If the value of this
parameter is less than one, the mesh generator might create elements that are
anisotropic in size in narrow regions.
9 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
Assume that you are happy with the parameter settings for curved and narrow regions.
Now apply these for all boundaries of the geometry.
10 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
5 Click the Go to Default 3D View button on the Graphics toolbar to get the view in
the figure below.
The fine details of the geometry are resolved satisfactorily with this mesh of
approximately 315,000 tetrahedral elements.
Continue with checking the mesh quality.
11 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
Compared to the mesh with the Finer predefined mesh parameter set, the average
quality is slightly less and the minimum quality is also lower. This is expected because
the boundaries are finely meshed and the elements are growing toward the inner parts
of the geometry according to the Normal parameter set specified in the global Size
node. Allowing even higher element growth will reduce the number of elements
further and will result in even lower element quality.
12 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
The mesh now consists of approximately 185,000 elements while keeping the fine
mesh on curved and narrow boundaries.
13 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
As expected the increase of the growth rate parameter results in even lower quality.
The histogram reveals that the distribution has a thicker tail, with the low quality
elements making up a larger than before fraction of the total element number.
A mesh plot can help with localizing the worst quality elements.
MESH PLOT
1 On the Mesh toolbar, click Plot.
The Mesh 1 plot is added to the 3D Plot Group 1 under the Results section of the
model Builder window. The default mesh plot that appears in the Graphics window
contains the surface elements colored according to quality.
2 In the Model Builder window, under Results>3D Plot Group 1 click Mesh 1.
3 In the Settings window for Mesh, click to expand the Element Filter section.
14 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
You can now see 0.5% of the tetrahedral elements with the worst quality. These are
mostly located in the regions where the elements are growing from the surfaces toward
the inside of the geometry.
15 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
16 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.2
Q ua dr upo le L en s
Introduction
Just like optical lenses focus light, electric and magnetic lenses can focus beams of
charged particles. Systems of magnetic quadrupole lenses find a common use in
focusing both ion and particle beams in accelerators at nuclear and particle physics
centers such as CERN, SLAC, and ISIS. This COMSOL Multiphysics model shows
the path of B5+ ions going through three consecutive magnetic quadrupole lenses. The
model is set up in a cross section of the geometry.
Model Definition
The quadrupole consists of an assembly of four permanent magnets, as seen in Figure 1
below, where the magnets work together to give a good approximation of a
quadrupole field. To strengthen the field and keep it contained within the system, the
magnets are set in an iron cylinder.
Figure 1: Cross-sectional view of one of the magnetic quadrupoles used in the lens.
1 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
The ions are sent through a system of three consecutive quadrupole assemblies. The
middle one is twice as long as the other ones, and is rotated by 90 degrees around the
central axis. This means the polarity of its magnets is reversed. Figure 2 gives a full view
of the magnetic quadrupole lens.
Drift (1 m)
Q1 (1 m) Q3 (1 m)
Q2 (2 m)
Figure 2: Cutout of the quadrupole lens. The second quadrupole (Q2) has its polarities
reversed compared to Q1 and Q3. After traveling through the lens, the ions are left to drift
1 m.
An accelerator feeds the system with ions traveling with the velocity 0.01 c along the
central axis. To study the focusing effect of the quadrupoles, track a number of ions
starting out from a distance of 3 cm from the central axis, evenly distributed along the
circumference of a circle in the transverse plane. They are all assumed to have a zero
initial transverse velocity. Each quadrupole focuses the ion beam along one of the
transverse axes and defocuses it along the other one. The net effect after traveling
through the system of the three quadrupoles and the drift length is focusing in all
directions. As the ions exit the system, they are all contained within a 1 cm radius in
the transverse plane.
The model is set up in a 2D cross section of any of the two identical quadrupoles Q1
and Q3. Neglecting fringe fields, the transverse magnetic field at a given point in a
transverse plane in Q2 automatically has the same magnitude as the corresponding in
Q1 and Q3, but point in the opposite direction. It is therefore sufficient to model the
fields in one of the quadrupoles.
DOMAIN EQUATIONS
The magnetic field is described using the Magnetostatics equation, solving for the z
component of the magnetic potential A (Wb/m):
1 e
( 0 ( A z M ) ) v ( A z ) = J z
2 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
-----------
1
- A z v ( A z ) = J z
e
0 r
BOUNDARY CONDITIONS
The magnetic field is approximately parallel to the exterior boundary of the iron
cylinder. To enforce this, use the magnetic insulation boundary condition, stating
that Az = 0.
3 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
Figure 3: The magnetic field density and flow lines in the center of one of the quadrupole
magnets.
Each ion passing through the assembly experiences a Maxwell force equal to
F = q v B, where v (m/s) is the ions velocity. Next, assume that the z component
of the velocity is constant and much larger than the x and y (transverse) components.
Thus consider only the force contributions from the z component of the velocity. To
find the transverse position as a function of time, you need to solve Newtons second
law for each ion, q v B = m a, where m is the ion mass (kg), and a denotes its
acceleration (m/s2). If the computed magnetic flux density in Q1 equals B', and the
length of quadrupole i is Li (m), the flux density that the ion experiences is given by
4 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
L1
B' if t < ------
vz
L1 L1 + L2
B' if ------ < t < --------------------
vz vz
B =
L1 + L2 L1 + L2 + L3
B' if -------------------- < t < ---------------------------------
v z vz
L1 + L2 + L3
0 if t > ---------------------------------
vz
where t (s) is the time of flight. This dependency of the magnetic flux density on the
time of flight is fed to the particle-tracing algorithm as a logical expression. Figure 4
below shows how the ions travel in the transverse plane.
Figure 4: As the ions enter Q1, they start out evenly distributed around the larger circle,
3 cm from the z-axis. Q1 focuses along the x-axis and defocuses along the y-axis. The force
on each ion is approximately proportional to its distance from the z-axis, so as the ions enter
Q2, those that are far out on the x-axis rapidly turn around and move toward the center.
Q3 stabilizes the motion and gets all ions on the right track. Finally the ions are left to drift
toward a waist situated a little bit more than 1 m beyond Q3.
5 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 2D.
2 In the Select physics tree, select AC/DC>Magnetic Fields (mf).
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Stationary.
6 Click Done.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
6 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
Here, c_const, mp_const and e_const are predefined constants for, respectively,
the speed of light, the mass of the proton and the elementary charge.
GEOMETRY 1
Rectangle 1 (r1)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size section.
3 In the Width text field, type 0.177.
4 In the Height text field, type 0.07.
5 Locate the Position section. In the x text field, type 0.
6 In the y text field, type -0.035.
7 Right-click Component 1 (comp1)>Geometry 1>Rectangle 1 (r1) and choose Build
Selected.
Rotate 1 (rot1)
1 On the Geometry toolbar, click Transforms and choose Rotate.
2 Select the object r1 only.
3 In the Settings window for Rotate, locate the Rotation Angle section.
4 In the Rotation text field, type 45.
7 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
Circle 1 (c1)
1 On the Geometry toolbar, click Primitives and choose Circle.
2 In the Settings window for Circle, locate the Size and Shape section.
3 In the Radius text field, type 0.2.
4 Locate the Position section. In the x text field, type 0.2.
5 In the y text field, type 0.2.
6 Right-click Component 1 (comp1)>Geometry 1>Circle 1 (c1) and choose Build
Selected.
7 Click the Zoom Extents button on the Graphics toolbar.
Intersection 1 (int1)
1 On the Geometry toolbar, click Booleans and Partitions and choose Intersection.
2 Select the objects c1 and rot1 only.
3 Right-click Component 1 (comp1)>Geometry 1>Intersection 1 (int1) and choose Build
Selected.
Rotate 2 (rot2)
1 On the Geometry toolbar, click Transforms and choose Rotate.
2 Select the object int1 only.
3 In the Settings window for Rotate, locate the Rotation Angle section.
4 In the Rotation text field, type 90, 180, 270.
5 Locate the Input section. Select the Keep input objects check box.
6 Right-click Component 1 (comp1)>Geometry 1>Rotate 2 (rot2) and choose Build
Selected.
8 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
Circle 2 (c2)
1 On the Geometry toolbar, click Primitives and choose Circle.
2 In the Settings window for Circle, locate the Size and Shape section.
3 In the Radius text field, type 0.2.
4 Right-click Component 1 (comp1)>Geometry 1>Circle 2 (c2) and choose Build
Selected.
5 Click the Zoom Extents button on the Graphics toolbar.
Circle 3 (c3)
1 On the Geometry toolbar, click Primitives and choose Circle.
2 In the Settings window for Circle, locate the Size and Shape section.
3 In the Radius text field, type 0.12.
4 Right-click Component 1 (comp1)>Geometry 1>Circle 3 (c3) and choose Build
Selected.
9 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
Create a composite object subtracting the magnets from the union of the two circles.
This complex operation can be done in one step by using the Compose geometry
operation and specifying the formula.
Compose 1 (co1)
1 On the Geometry toolbar, click Booleans and Partitions and choose Compose.
2 Click in the Graphics window and then press Ctrl+A to select all objects.
3 In the Settings window for Compose, locate the Compose section.
4 In the Set formula text field, type c2+c3-(int1+rot2(1)+rot2(2)+rot2(3)).
5 Right-click Component 1 (comp1)>Geometry 1>Compose 1 (co1) and choose Build
Selected.
Circle 4 (c4)
1 On the Geometry toolbar, click Primitives and choose Circle.
2 In the Settings window for Circle, locate the Size and Shape section.
3 In the Radius text field, type 0.2.
4 Right-click Component 1 (comp1)>Geometry 1>Circle 4 (c4) and choose Build
Selected.
10 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
ADD MATERIAL
1 On 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>Iron.
4 Click Add to Component in the window toolbar.
5 On the Home toolbar, click Add Material to close the Add Material window.
MATERIALS
Iron (mat1)
1 In the Model Builder window, under Component 1 (comp1)>Materials click Iron
(mat1).
2 Select Domain 2 only.
11 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
Ampre's Law 2
1 On the Physics toolbar, click Domains and choose Ampre's Law.
2 Select Domain 6 only.
3 In the Settings window for Ampre's Law, locate the Magnetic Field section.
4 From the Constitutive relation list, choose Magnetization.
5 Specify the M vector as
-MQ/sqrt(2) x
-MQ/sqrt(2) y
0 z
6 Locate the Conduction Current section. From the list, choose User defined. Locate
the Electric Field section. From the r list, choose User defined.
Ampre's Law 3
1 On the Physics toolbar, click Domains and choose Ampre's Law.
2 Select Domain 3 only.
3 In the Settings window for Ampre's Law, locate the Magnetic Field section.
4 From the Constitutive relation list, choose Magnetization.
5 Specify the M vector as
-MQ/sqrt(2) x
MQ/sqrt(2) y
0 z
6 Locate the Conduction Current section. From the list, choose User defined. Locate
the Electric Field section. From the r list, choose User defined.
Ampre's Law 4
1 On the Physics toolbar, click Domains and choose Ampre's Law.
2 Select Domain 1 only.
3 In the Settings window for Ampre's Law, locate the Magnetic Field section.
4 From the Constitutive relation list, choose Magnetization.
5 Specify the M vector as
MQ/sqrt(2) x
12 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
MQ/sqrt(2) y
0 z
6 Locate the Conduction Current section. From the list, choose User defined. Locate
the Electric Field section. From the r list, choose User defined.
Ampre's Law 5
1 On the Physics toolbar, click Domains and choose Ampre's Law.
2 Select Domain 5 only.
3 In the Settings window for Ampre's Law, locate the Magnetic Field section.
4 From the Constitutive relation list, choose Magnetization.
5 Specify the M vector as
MQ/sqrt(2) x
-MQ/sqrt(2) y
0 z
6 Locate the Conduction Current section. From the list, choose User defined. Locate
the Electric Field section. From the r list, choose User defined.
Ampre's Law 6
1 On the Physics toolbar, click Domains and choose Ampre's Law.
2 Select Domain 4 only.
3 In the Settings window for Ampre's Law, locate the Magnetic Field section.
4 From the r list, choose User defined. Locate the Conduction Current section. From
the list, choose User defined. Locate the Electric Field section. From the r list,
choose User defined.
MESH 1
1 In the Model Builder window, under Component 1 (comp1) click Mesh 1.
2 In the Settings window for Mesh, locate the Mesh Settings section.
3 From the Element size list, choose Extra fine.
13 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
STUDY 1
On the Home toolbar, click Compute.
RESULTS
1 In the Model Builder window, expand the Magnetic Flux Density Norm (mf) node, then
click Surface 1.
2 In the Settings window for Surface, click Replace Expression in the upper-right corner
of the Expression section. From the menu, choose Component 1>Magnetic
Fields>Magnetic>mf.normH - Magnetic field norm.
3 On the Magnetic Flux Density Norm (mf) toolbar, click Plot.
4 In the Model Builder window, right-click Magnetic Flux Density Norm (mf) and choose
Contour.
5 In the Settings window for Contour, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Component 1>Magnetic
14 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
To see how the ions travel through the system of quadrupoles, do the following:
2D Plot Group 2
1 On the Home toolbar, click Add Plot Group and choose 2D Plot Group.
2 In the Settings window for 2D Plot Group, type Ions Trajectories in the Label
text field.
Ions Trajectories
1 Right-click Results>Ions Trajectories and choose Surface.
2 In the Settings window for Surface, click Replace Expression in the upper-right corner
of the Expression section. From the menu, choose Component 1>Magnetic
Fields>Magnetic>mf.normH - Magnetic field norm.
3 Locate the Coloring and Style section. From the Color table list, choose Thermal.
4 On the Ions Trajectories toolbar, click More Plots and choose Particle Tracing with
Mass.
Enter the expressions for the Lorentz force acting on the particles.
The position of the particle along the z-axis can be computed using the particle time
variable partt.
5 In the Settings window for Particle Tracing with Mass, locate the Equation of Motion
section.
6 In the Fx text field, type -q*vz*mf.By*(1-2*(partt>L1/
vz)+2*(partt>(L1+L2)/vz)-(partt>(L1+L2+L3)/vz)).
8 Click to expand the Mass and velocity section. Locate the Mass and Velocity section.
In the Mass text field, type m.
9 Locate the Particle Positioning section. In the x text field, type
0.03*cos(range(0,0.05*pi,2*pi)).
15 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
14 Locate the Coloring and Style section. From the Color table list, choose Cyclic.
15 In the Model Builder window, under Results>Ions Trajectories click Particle Tracing
with Mass 1.
16 In the Settings window for Particle Tracing with Mass, click to expand the Release
section.
17 Click to expand the Coloring and style section. Click to expand the Quality section.
Find the ODE solver settings subsection. In the Relative tolerance text field, type
1e-6.
18 Click to expand the Advanced section. Find the Termination subsection. Select the
Maximum number of steps check box.
19 In the associated text field, type 1e5.
20 Find the Instantaneous flow field subsection. Select the End time check box.
21 In the associated text field, type 5/3e6.
22 On the Ions Trajectories toolbar, click Plot.
23 In the Model Builder window, right-click Ions Trajectories and choose Contour.
24 In the Settings window for Contour, locate the Expression section.
25 In the Expression text field, type sqrt(x^2+y^2).
26 Locate the Levels section. From the Entry method list, choose Levels.
27 In the Levels text field, type 0.01 0.03.
28 Locate the Coloring and Style section. From the Coloring list, choose Uniform.
29 From the Color list, choose Custom.
30 Clear the Color legend check box.
31 On the Ions Trajectories toolbar, click Plot.
16 | QUADRUPOLE LENS
Solved with COMSOL Multiphysics 5.2
Submodeling of a Shaft
Introduction
Submodeling can be used when it is not possible to resolve all details of a complex
geometry in a global model.
You can cope with this type of problems with a technique known as submodeling. First
you solve the complete model with a mesh which is sufficient to capture the stiffness
of the structure. In a second analysis you create a local model (submodel) of the region
around the stress concentration with a fine mesh, and solve it using the displacements
from the global model as boundary conditions.
The global model is accurate enough to give correct displacements on the boundary
to the submodel.
The improvements introduced in the submodel are so small that they do not
introduce significant changes in stiffness on the global level. Given this, it could still
be possible to introduce a nonlinear material locally in the submodel.
Model Definition
The geometry consists of a shaft with a sudden change in diameter. At the location of
the diameter change, there is a fillet with a small radius. In the fillet, stress
concentrations will appear. There is also a central hole through the shaft. The
geometry and mesh are shown in Figure 1.
The shaft is fixed at the thick end. On the thin end, a tensile force of 300 N and a shear
force of 100 N are applied.
1 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
As submodel, a region around the fillet at side giving the highest stress is chosen. The
cuts where the boundary conditions are applied on the submodel should preferably be
placed at locations where the stress field is fairly smooth.
The geometry and mesh of the submodel are shown in Figure 2. As can be seen, the
fillet has a very good mesh resolution since the purpose is to obtain results with high
accuracy there.
2 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
Results
The general stress distribution is shown in Figure 3. Since the load is unsymmetrical
(there is both an axial and a bending component), the highest stress occurs at the side
with positive Z coordinate.
The cut through the model in Figure 4 displays that the stresses are not well resolved.
There are significant jumps between the neighboring elements.
In the corresponding figures from the submodel, Figure 5 and Figure 6, the stress field
is smooth and well resolved.
The computed peak stress for the global model is about 9% different compared to that
in the submodel, which is expected given the coarse mesh in the global model.
3 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
4 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
5 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
As a verification, it is a good habit to always check the stress state at the cuts where the
submodel has displacements prescribed by the results in the global model. Such a
comparison is shown in Figure 7. The results have an almost perfect match, which
strongly indicates that the submodel has been set up correctly.
Figure 7: Stress distribution over one of the cuts. Global model (left) and submodel (right)
are compared.
In this example, there are no volume forces. If there were, such forces must be applied
also on the submodel.
6 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
Modeling Instructions
From the File menu, choose New.
NEW
1 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>Stationary.
6 Click Done.
COMPONENT 1 (COMP1)
1 In the Model Builder window, click Component 1 (comp1).
2 In the Settings window for Component, type Full model in the Label text field.
GEOMETRY 1
1 In the Model Builder window, under Full model (comp1) click Geometry 1.
2 In the Settings window for Geometry, locate the Units section.
3 From the Length unit list, choose mm.
Import 1 (imp1)
1 On the Home toolbar, click Import.
2 In the Settings window for Import, locate the Import section.
3 Click Browse.
4 Browse to the applications Application Library folder and double-click the file
shaft_submodeling.mphbin.
5 Click Import.
7 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
MATERIALS
On the Home toolbar, click Windows and choose Add Material.
ADD MATERIAL
1 Go to the Add Material window.
2 In the tree, select Built-In>Structural steel.
3 Click Add to Global Materials.
The material is now defined as global material so that both the full model and the
submodel can use the same material definition, defined at one location only in the
model tree.
MATERIALS
In the Model Builder window, under Full model (comp1) right-click Materials and choose
Material Link.
Fixed Constraint 1
1 On the Physics toolbar, click Boundaries and choose Fixed Constraint.
2 Select Boundary 27 only.
Boundary Load 1
1 On the Physics toolbar, click Boundaries and choose Boundary Load.
2 Select Boundary 1 only.
3 In the Settings window for Boundary Load, locate the Force section.
4 From the Load type list, choose Total force.
5 Specify the Ftot vector as
-300 x
0 y
-100 z
MESH 1
1 In the Model Builder window, under Full model (comp1) click Mesh 1.
2 In the Settings window for Mesh, locate the Mesh Settings section.
3 From the Element size list, choose Coarse.
4 Click the Build All button.
8 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
STUDY 1
1 In the Model Builder window, click Study 1.
2 In the Settings window for Study, type Full model in the Label text field.
3 On the Home toolbar, click Compute.
RESULTS
Stress (solid)
1 In the Settings window for 3D Plot Group, type Stress - Full model in the Label
text field.
2 Click to expand the Color legend section. Locate the Color Legend section. Select the
Show maximum and minimum values check box.
Cut Plane 1
On the Results toolbar, click Cut Plane.
Data Sets
1 In the Settings window for Cut Plane, locate the Plane Data section.
2 From the Plane list, choose XZ-planes.
2D Plot Group 2
1 On the Results toolbar, click 2D Plot Group.
2 In the Settings window for 2D Plot Group, type Cut Plane Stress -Full model
in the Label text field.
3 Click to expand the Color legend section. Locate the Color Legend section. Select the
Show maximum and minimum values check box.
9 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
Axis
1 In the Model Builder window, expand the Results>Views>View 2D 2 node, then click
Axis.
2 In the Settings window for Axis, locate the Axis section.
3 In the x minimum text field, type 25.8.
4 In the x maximum text field, type 34.2.
5 In the y minimum text field, type 1.5.
6 In the y maximum text field, type 7.5.
7 Click the Update button.
ROOT
1 In the Model Builder window, click the root node.
2 On the Home toolbar, click Add Component and choose 3D.
COMPONENT 2 (COMP2)
1 In the Model Builder window, click Component 2 (comp2).
2 In the Settings window for Component, type Submodel in the Label text field.
GEOMETRY 2
1 In the Model Builder window, under Submodel (comp2) click Geometry 2.
2 In the Settings window for Geometry, locate the Units section.
3 From the Length unit list, choose mm.
Import 1 (imp1)
1 On the Home toolbar, click Import.
2 In the Settings window for Import, locate the Import section.
10 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
3 Click Browse.
4 Browse to the applications Application Library folder and double-click the file
shaft_submodeling.mphbin.
5 Click Import.
Cylinder 1 (cyl1)
1 On the Geometry toolbar, click Cylinder.
2 In the Settings window for Cylinder, locate the Size and Shape section.
3 In the Radius text field, type 7.
4 In the Height text field, type 8.
5 Locate the Position section. In the x text field, type 26.
6 Locate the Axis section. From the Axis type list, choose x-axis.
Block 1 (blk1)
1 On 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 10.
4 In the Depth text field, type 14.
5 In the Height text field, type 10.
6 Locate the Position section. In the x text field, type 26.
7 In the y text field, type -7.
Intersection 1 (int1)
1 On the Geometry toolbar, click Booleans and Partitions and choose Intersection.
2 Click in the Graphics window and then press Ctrl+A to select all objects.
3 Click the Build All Objects button.
MATERIALS
In the Model Builder window, under Submodel (comp2) right-click Materials and choose
Material Link.
11 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
SUBMODEL (COMP2)
On the Home toolbar, click Windows and choose Add Physics.
ADD PHYSICS
1 Go to the Add Physics window.
2 In the Add physics tree, select Structural Mechanics>Solid Mechanics (solid).
3 Find the Physics interfaces in study subsection. In the table, enter the following
settings:
Studies Solve
Full model
DEFINITIONS
In the Model Builder window, under Full model (comp1) click Definitions.
Prescribed Displacement 1
1 On the Physics toolbar, click Boundaries and choose Prescribed Displacement.
2 Select Boundaries 1, 2, 5, 7, and 8 only.
3 In the Settings window for Prescribed Displacement, locate the Prescribed
Displacement section.
4 Select the Prescribed in x direction check box.
12 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
MESH 2
In the Model Builder window, expand the Full model (comp1)>Definitions node.
Mapped 1
1 Right-click Submodel (comp2)>Mesh 2 and choose More Operations>Mapped.
2 Select Boundary 2 only.
Distribution 1
1 Right-click Submodel (comp2)>Mesh 2>Mapped 1 and choose Distribution.
2 Select Edge 3 only.
3 In the Settings window for Distribution, locate the Distribution section.
4 From the Distribution properties list, choose Predefined distribution type.
5 In the Number of elements text field, type 6.
6 In the Element ratio text field, type 3.
7 Select the Reverse direction check box.
Distribution 2
1 Right-click Mapped 1 and choose Distribution.
2 Select Edge 1 only.
3 In the Settings window for Distribution, locate the Distribution section.
4 From the Distribution properties list, choose Predefined distribution type.
5 In the Number of elements text field, type 6.
6 In the Element ratio text field, type 3.
7 Select the Reverse direction check box.
Distribution 3
1 Right-click Mapped 1 and choose Distribution.
13 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
Distribution 4
1 Right-click Mapped 1 and choose Distribution.
2 Select Edge 10 only.
3 In the Settings window for Distribution, locate the Distribution section.
4 From the Distribution properties list, choose Predefined distribution type.
5 In the Number of elements text field, type 10.
6 In the Element ratio text field, type 2.
Distribution 5
1 Right-click Mapped 1 and choose Distribution.
2 Select Edge 13 only.
3 In the Settings window for Distribution, locate the Distribution section.
4 From the Distribution properties list, choose Predefined distribution type.
5 In the Number of elements text field, type 6.
6 In the Element ratio text field, type 3.
Swept 1
1 In the Model Builder window, right-click Mesh 2 and choose Swept.
2 In the Settings window for Swept, click to expand the Destination faces section.
3 Select Boundary 2 only.
4 Locate the Destination Faces section. Click Clear Selection.
5 Select Boundary 5 only.
6 Click to expand the Source faces section. Select Boundary 2 only.
Distribution 1
1 In the Model Builder window, right-click Swept 1 and choose Distribution.
2 In the Settings window for Distribution, locate the Distribution section.
3 In the Number of elements text field, type 24.
4 Click the Build All button.
5 In the Model Builder window, right-click Mesh 2 and choose Build All.
6 Click the Zoom Extents button on the Graphics toolbar.
14 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
ROOT
On the Home toolbar, click Windows and choose Add Study.
ADD STUDY
1 Go to the Add Study window.
2 Find the Studies subsection. In the Select study tree, select Preset Studies>Stationary.
3 Find the Physics interfaces in study subsection. In the table, enter the following
settings:
Physics Solve
Solid Mechanics (solid)
STUDY 2
1 In the Model Builder window, click Study 2.
2 In the Settings window for Study, type Submodel in the Label text field.
SUBMODEL
Step 1: Stationary
1 In the Model Builder window, under Submodel click Step 1: Stationary.
2 In the Settings window for Stationary, click to expand the Values of dependent
variables section.
3 Locate the Values of Dependent Variables section. Find the Values of variables not
solved for subsection. From the Settings list, choose User controlled.
4 From the Method list, choose Solution.
5 From the Study list, choose Full model, Stationary.
6 On the Home toolbar, click Compute.
RESULTS
Stress (solid2)
1 In the Settings window for 3D Plot Group, type Stress - Submodel in the Label
text field.
2 Locate the Color Legend section. Select the Show maximum and minimum values check
box.
15 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
Stress - Submodel
1 In the Model Builder window, expand the Results>Stress - Submodel node, then click
Surface 1.
2 In the Settings window for Surface, click to expand the Quality section.
3 From the Resolution list, choose No refinement.
4 From the Smoothing list, choose None.
5 On the Stress - Submodel toolbar, click Plot.
6 Click the Zoom Extents button on the Graphics toolbar.
Cut Plane 2
On the Results toolbar, click Cut Plane.
Data Sets
1 In the Settings window for Cut Plane, locate the Plane Data section.
2 From the Plane list, choose XZ-planes.
3 Locate the Data section. From the Data set list, choose Submodel/Solution 2 (3) (sol2).
2D Plot Group 4
1 On the Results toolbar, click 2D Plot Group.
2 In the Settings window for 2D Plot Group, type Cut Plane Stress - Submodel
in the Label text field.
3 Locate the Color Legend section. Select the Show maximum and minimum values check
box.
4 Locate the Data section. From the Data set list, choose Cut Plane 2.
Now verify that the differences in stress between the full model and the submodel are
small where the displacements are mapped.
16 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
Cut Plane 3
On the Results toolbar, click Cut Plane.
Data Sets
1 In the Settings window for Cut Plane, locate the Plane Data section.
2 In the X-coordinate text field, type 26.
2D Plot Group 5
1 On the Results toolbar, click 2D Plot Group.
2 In the Settings window for 2D Plot Group, type Stress comparison in the Label
text field.
3 Locate the Data section. From the Data set list, choose None.
Stress comparison
1 Right-click Stress comparison and choose Surface.
2 In the Settings window for Surface, locate the Data section.
3 From the Data set list, choose Cut Plane 3.
4 Locate the Expression section. In the Expression text field, type solid.mises.
5 Locate the Quality section. From the Resolution list, choose No refinement.
6 From the Smoothing list, choose None.
7 On the Stress comparison toolbar, click Plot.
Data Sets
In the Model Builder window, under Results click Data Sets.
Surface 1
On the Results toolbar, click More Data Sets and choose Surface.
Data Sets
1 In the Settings window for Surface, locate the Data section.
2 From the Data set list, choose Submodel/Solution 2 (3) (sol2).
3 Select Boundary 1 only.
4 Locate the Parameterization section. From the x- and y-axes list, choose YZ-plane.
Stress comparison
1 In the Model Builder window, under Results right-click Stress comparison and choose
Surface.
2 In the Settings window for Surface, locate the Data section.
17 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
FULL MODEL
Step 1: Stationary
1 In the Model Builder window, under Full model click Step 1: Stationary.
2 In the Settings window for Stationary, locate the Physics and Variables Selection
section.
3 In the table, enter the following settings:
18 | SUBMODELING OF A SHAFT
Solved with COMSOL Multiphysics 5.2
Model Definition
The steel tank shown below has two pipe connections. One is grounded and the other
connects to a dead current source. This model calculates the current density in the tank
shell along with the potential distribution across the surface.
0V
400 V
EQUATIONS
The fundamental equation to solve is the current conduction, or charge conservation,
equation.
( V ) = 0 (1)
Here, is the electrical conductivity (S/m) and V is the electric potential (V).
The material is a 1 mm thick steel sheet with a conductivity of 4.032106 S/m. You
are working with a surface in 3D so there is no thickness in the model. To account for
the charge conservation in Equation 1 you must multiply the current flux expression
with the shell thickness d:
( dV ) = 0 (2)
1 | S H E L L D I F F U S I O N I N A TA N K
Solved with COMSOL Multiphysics 5.2
Results
Figure 1 shows the potential distribution across the surface.
Figure 2 adds the current field as an arrow plot, showing clearly how the current
collects toward the grounded connection.
2 | S H E L L D I F F U S I O N I N A TA N K
Solved with COMSOL Multiphysics 5.2
3 | S H E L L D I F F U S I O N I N A TA N K
Solved with COMSOL Multiphysics 5.2
The plot of the magnitude of the local current density in Figure 3 is interesting because
you can use it to calculate the resistive heating in the material as an extension to the
model.
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 3D.
2 In the Select physics tree, select Mathematics>PDE Interfaces>Lower
Dimensions>Coefficient Form Boundary PDE (cb).
3 Click Add.
4 In the Dependent variables table, enter the following settings:
5 Click Study.
6 In the Select study tree, select Preset Studies>Stationary.
7 Click Done.
4 | S H E L L D I F F U S I O N I N A TA N K
Solved with COMSOL Multiphysics 5.2
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
3 In the table, enter the following settings:
GEOMETRY 1
Create the geometry. To simplify this step, insert a prepared geometry sequence.
5 | S H E L L D I F F U S I O N I N A TA N K
Solved with COMSOL Multiphysics 5.2
Go on to set the values of the potential at the pipe connections by adding Dirichlet
boundary conditions.
MESH 1
1 In the Model Builder window, under Component 1 (comp1) click Mesh 1.
2 In the Settings window for Mesh, locate the Mesh Settings section.
3 From the Element size list, choose Finer.
4 Click the Build All button.
6 | S H E L L D I F F U S I O N I N A TA N K
Solved with COMSOL Multiphysics 5.2
STUDY 1
On the Home toolbar, click Compute.
RESULTS
3D Plot Group 1
The default plot shows the potential distribution.
2 In the Model Builder window, expand the Results>3D Plot Group 1 node.
3 Right-click 3D Plot Group 1 and choose Arrow Surface.
4 In the Settings window for Arrow Surface, locate the Expression section.
5 In the x component text field, type -sigma*VTx.
6 In the y component text field, type -sigma*VTy.
7 In the z component text field, type -sigma*VTz.
8 Select the Description check box.
9 In the associated text field, type Current field (-sigma*VTx, -sigma*VTy,
-sigma*VTz).
10 Locate the Coloring and Style section. From the Arrow length list, choose Normalized.
11 On the 3D Plot Group 1 toolbar, click Plot.
The plot in the Graphics window should now look like that in Figure 2.
To visualize the magnitude of the local current density, follow the steps given below.
3D Plot Group 2
1 On the Home toolbar, click Add Plot Group and choose 3D Plot Group.
2 In the Settings window for 3D Plot Group, click to expand the Title section.
3 From the Title type list, choose Manual.
4 In the Title text area, type Current density (A/m<sup>2</sup>).
5 Right-click 3D Plot Group 2 and choose Surface.
6 In the Settings window for Surface, locate the Expression section.
7 In the Expression text field, type sigma*sqrt(VTx^2+VTy^2+VTz^2).
7 | S H E L L D I F F U S I O N I N A TA N K
Solved with COMSOL Multiphysics 5.2
8 | S H E L L D I F F U S I O N I N A TA N K
Solved with COMSOL Multiphysics 5.2
Model Definition
The cantilever beam has a thickness of 0.1 m, width of 4 m and is 4 m on its long edge
and 2 m on its short edge. Two cases are considered. In the first one a gravity load,
mg, acts in the negative y direction with an acceleration of 9.81 m/s2. The left end
boundary is fully fixed (no displacements). In the second case gravity load is not
present and instead a uniformly distributed horizontal load, F, of 10 MN/m acts along
the right end. At the left end there is no displacement in the x direction. Also at a
midpoint location the left end is fixed in the y direction; see Figure 1.
mg
MATERIAL MODEL
The model uses the following material properties:
1 | TA P E R E D C A N T I L E V E R W I T H TW O L O A D C A S E S
Solved with COMSOL Multiphysics 5.2
For the load case, the horizontal (x direction) normal stress is evaluated. The
benchmark target value of 61.3 MPa at the point (0, 2) is in good agreement with the
results. Using the default mesh size, the COMSOL Multiphysics solution gives a value
of 61.4 MPa; see Figure 3.
2 | TA P E R E D C A N T I L E V E R W I T H TW O L O A D C A S E S
Solved with COMSOL Multiphysics 5.2
Use the Solid Mechanics interface to perform a stress analysis. The finite element
model uses the default second-order triangular Lagrange elements. To show
convergence toward the benchmark value, create a finer mesh.
Use the Load Group and Constraint Group features to collect conditions that are
enabled in different studies. Define a group in Global Definitions and assign its content
directly from the load or constraint itself. You define load cases in the Study Extensions
of a Study Type and enable active load and constraint groups; see Figure 4, where lg
3 | TA P E R E D C A N T I L E V E R W I T H TW O L O A D C A S E S
Solved with COMSOL Multiphysics 5.2
Reference
1. D. Hitchings, A. Kamoulakos, and G.A.O. Davies, Linear Statics Benchmarks Vol.
1, NAFEMS, Glasgow, 1987.
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 2D.
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>Stationary.
6 Click Done.
GEOMETRY 1
4 | TA P E R E D C A N T I L E V E R W I T H TW O L O A D C A S E S
Solved with COMSOL Multiphysics 5.2
2 In the Settings window for Bzier Polygon, locate the Polygon Segments section.
3 Find the Added segments subsection. Click Add Linear.
4 Find the Control points subsection. In row 2, set x to 4.
5 In row 2, set y to 1.
6 Find the Added segments subsection. Click Add Linear.
7 Find the Control points subsection. In row 2, set y to 3.
8 Find the Added segments subsection. Click Add Linear.
9 Find the Control points subsection. In row 2, set x to 0.
10 In row 2, set y to 4.
11 Find the Added segments subsection. Click Add Linear.
12 Find the Control points subsection. Click Close Curve.
Point 1 (pt1)
1 On the Geometry toolbar, click Primitives and choose Point.
2 In the Settings window for Point, locate the Point section.
3 In the y text field, type 2.
MATERIALS
Material 1 (mat1)
1 In the Model Builder window, under Component 1 (comp1) right-click Materials and
choose Blank Material.
2 In the Settings window for Material, locate the Material Contents section.
3 In the table, enter the following settings:
5 | TA P E R E D C A N T I L E V E R W I T H TW O L O A D C A S E S
Solved with COMSOL Multiphysics 5.2
GLOBAL DEFINITIONS
1 In the Model Builder window, right-click Global Definitions and choose Load Group.
2 In the Settings window for Load Group, type lgGravity in the Parameter name text
field.
3 Right-click Global Definitions>Load Group 1 (lg1) and choose Rename.
4 In the Rename Load Group dialog box, type Load Group Gravity in the New label
text field.
5 Click OK.
6 In the Model Builder window, right-click Global Definitions and choose Load Group.
7 In the Settings window for Load Group, type lgForce in the Parameter name text
field.
8 Right-click Global Definitions>Load Group 2 (lg2) and choose Rename.
9 In the Rename Load Group dialog box, type Load Group Force in the New label text
field.
10 Click OK.
11 In the Model Builder window, right-click Global Definitions and choose Constraint
Group.
12 In the Settings window for Constraint Group, type cgGravity in the Parameter
name text field.
13 Right-click Global Definitions>Constraint Group 1 (cg1) and choose Rename.
14 In the Rename Constraint Group dialog box, type Constraint Group Gravity in
the New label text field.
15 Click OK.
16 In the Model Builder window, right-click Global Definitions and choose Constraint
Group.
17 In the Settings window for Constraint Group, type cgForce in the Parameter name
text field.
18 Right-click Global Definitions>Constraint Group 2 (cg2) and choose Rename.
19 In the Rename Constraint Group dialog box, type Constraint Group Force in the
New label text field.
20 Click OK.
6 | TA P E R E D C A N T I L E V E R W I T H TW O L O A D C A S E S
Solved with COMSOL Multiphysics 5.2
Fixed Constraint 1
1 On the Physics toolbar, click Boundaries and choose Fixed Constraint.
2 Select Boundaries 1 and 3 only.
3 On the Physics toolbar, click Constraint Group and choose Constraint Group Gravity.
Body Load 1
1 On the Physics toolbar, click Domains and choose Body Load.
2 Select Domain 1 only.
3 In the Settings window for Body Load, locate the Force section.
4 Specify the FV vector as
0 x
-g_const*solid.rho y
5 On the Physics toolbar, click Load Group and choose Load Group Gravity.
Roller 1
1 On the Physics toolbar, click Boundaries and choose Roller.
2 Select Boundaries 1 and 3 only.
3 On the Physics toolbar, click Constraint Group and choose Constraint Group Force.
Boundary Load 1
1 On the Physics toolbar, click Boundaries and choose Boundary Load.
2 Select Boundary 5 only.
3 In the Settings window for Boundary Load, locate the Force section.
4 From the Load type list, choose Load defined as force per unit length.
5 Specify the FL vector as
10[MN/m] x
0 y
6 On the Physics toolbar, click Load Group and choose Load Group Force.
7 | TA P E R E D C A N T I L E V E R W I T H TW O L O A D C A S E S
Solved with COMSOL Multiphysics 5.2
Fixed Constraint 2
1 On the Physics toolbar, click Points and choose Fixed Constraint.
2 Select Point 2 only.
MESH 1
In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and choose
Build All.
STUDY 1
Step 1: Stationary
1 In the Model Builder window, expand the Study 1 node, then click Step 1: Stationary.
2 In the Settings window for Stationary, click to expand the Study extensions section.
3 Locate the Study Extensions section. Select the Define load cases check box.
4 Click Add.
5 In the table, enter the following settings:
6 Click Add.
7 In the table, enter the following settings:
The study extension for the load cases should look similar to Figure 4.
8 On the Home toolbar, click Compute.
RESULTS
Stress (solid)
1 In the Model Builder window, under Results right-click Stress (solid) and choose
Rename.
2 In the Rename 2D Plot Group dialog box, type Normal stress in the New label text
field.
3 Click OK.
8 | TA P E R E D C A N T I L E V E R W I T H TW O L O A D C A S E S
Solved with COMSOL Multiphysics 5.2
Normal stress
1 In the Model Builder window, expand the Results>Normal stress node, then click
Surface 1.
2 In the Settings window for Surface, click Replace Expression in the upper-right corner
of the Expression section. From the menu, choose Component 1>Solid
Mechanics>Stress (Gauss points)>Stress tensor, Gauss-point evaluation
(Spatial)>solid.sGpx - Stress tensor, Gauss-point evaluation, x component.
3 On the Normal stress toolbar, click Plot.
2D Plot Group 2
1 On the Home toolbar, click Add Plot Group and choose 2D Plot Group.
2 In the Model Builder window, right-click 2D Plot Group 2 and choose Rename.
3 In the Rename 2D Plot Group dialog box, type Shear stress in the New label text
field.
4 Click OK.
5 In the Settings window for 2D Plot Group, locate the Data section.
6 From the Load case list, choose Gravity.
Shear stress
1 Right-click Shear stress and choose Surface.
2 In the Settings window for Surface, click Replace Expression in the upper-right corner
of the Expression section. From the menu, choose Component 1>Solid
Mechanics>Stress (Gauss points)>Stress tensor, Gauss-point evaluation
(Spatial)>solid.sGpxy - Stress tensor, Gauss-point evaluation, xy component.
3 Right-click Results>Shear stress>Surface 1 and choose Deformation.
Point Evaluation 1
On the Results toolbar, click Point Evaluation.
Derived Values
1 In the Model Builder window, right-click Point Evaluation 1 and choose Rename.
2 In the Rename Point Evaluation dialog box, type Point Evaluation - normal
stress in the New label text field.
3 Click OK.
4 Select Point 2 only.
5 In the Settings window for Point Evaluation, click Replace Expression in the
upper-right corner of the Expression section. From the menu, choose Component
9 | TA P E R E D C A N T I L E V E R W I T H TW O L O A D C A S E S
Solved with COMSOL Multiphysics 5.2
Point Evaluation 2
On the Results toolbar, click Point Evaluation.
Derived Values
1 In the Model Builder window, right-click Point Evaluation 2 and choose Rename.
2 In the Rename Point Evaluation dialog box, type Point Evaluation - shear
stress in the New label text field.
3 Click OK.
4 Select Point 2 only.
5 In the Settings window for Point Evaluation, click Replace Expression in the
upper-right corner of the Expression section. From the menu, choose Component
1>Solid Mechanics>Stress (Gauss points)>Stress tensor, Gauss-point evaluation
(Spatial)>solid.sGpxy - Stress tensor, Gauss-point evaluation, xy component.
6 Click the Evaluate button.
TABLE
Go to the Table window to see the results.
10 | T A P E R E D C A N T I L E V E R W I T H TW O L O A D C A S E S
Solved with COMSOL Multiphysics 5.2
Model Definition
Figure 1 shows the actuators parts and dimensions as well as its position on top of a
substrate surface.
Upper surface
Substrate
240 m
Hot arms
3 m
2 m
MATERIAL DATA
This model uses the material properties listed in Table 1 for the Joule Heating Model
equations. The assumption of constant material properties means that the coupling
between physics phenomena is one way only: the electric current through the actuator
heats up the material, but the current itself is not affected by the temperature rise. By
choosing the linearized resistivity option for the electrical conductivity (available in the
Joule Heating Model nodes settings window) and providing the associated material
properties you can turn this into a two-way coupling.
TABLE 1: MATERIAL DATA
BOUNDARY CONDITIONS
An electric potential is applied between the bases of the hot arms anchors. The cold
arm anchor and all other surfaces are electrically insulated.
Ground
Applied voltage
The temperature of the base of the three anchors and the three dimples is fixed to that
of the substrates constant temperature. Because the structure is sandwiched, all other
boundaries interact thermally with the surroundings by conduction through thin layers
of air.
The heat transfer coefficient is given by the thermal conductivity of air divided by the
distance to the surrounding surfaces for the system. This exercise uses different heat
transfer coefficients for the actuators upper and other surfaces.
Fixed temperature
Fixed temperature
Fixed temperature
Results
Figure 4 shows the temperature distribution on the actuators surface. The line graph
in Figure 5 provides more detailed information about the temperature along a single
edge facing the substrate plane.
Figure 5: Temperature along the actuators longest edge facing the substrate.
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 3D.
2 In the Select physics tree, select Heat Transfer>Electromagnetic Heating>Joule Heating.
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies for Selected Physics Interfaces>Stationary.
6 Click Done.
COMPONENT 1 (COMP1)
1 In the Model Builder window, right-click Component 1 (comp1) and choose Rename.
2 In the Rename Component dialog box, type Thermal Actuator in the New label text
field.
3 Click OK.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
GEOMETRY 1
Import 1 (imp1)
1 On the Home toolbar, click Import.
2 In the Settings window for Import, locate the Import section.
3 Click Browse.
4 Browse to the applications Application Library folder and double-click the file
thermal_actuator.mphbin.
DEFINITIONS
Explicit 1
1 On the Definitions toolbar, click Explicit.
2 In the Model Builder window, right-click Explicit 1 and choose Rename.
3 In the Rename Explicit dialog box, type Substrate Contact in the New label text
field.
4 Click OK.
5 In the Settings window for Explicit, locate the Input Entities section.
6 From the Geometric entity level list, choose Boundary.
7 Select Boundaries 10, 30, 50, 70, 76, and 82 only.
MATERIALS
Material 1 (mat1)
1 In the Model Builder window, under Thermal Actuator (comp1) right-click Materials
and choose Blank Material.
By default, the first material you define applies to all domains.
2 In the Settings window for Material, locate the Material Contents section.
3 In the table, enter the following settings:
Ground 1
1 On the Physics toolbar, click Boundaries and choose Ground.
2 Select Boundary 10 only.
Electric Potential 1
1 On the Physics toolbar, click Boundaries and choose Electric Potential.
2 Select Boundary 30 only.
3 In the Settings window for Electric Potential, locate the Electric Potential section.
4 In the V0 text field, type DV.
H E A T TR A N S F E R I N S O L I D S ( H T )
In the Model Builder window, under Thermal Actuator (comp1) click Heat Transfer in
Solids (ht).
Heat Flux 1
1 On the Physics toolbar, click Boundaries and choose Heat Flux.
This boundary condition applies to all boundaries except the top-surface boundary
and those in contact with the substrate. A Temperature condition on the
substrate_contact boundaries will override this Heat Flux condition so you do
not explicitly need to exclude those boundaries. In contrast, because the Heat Flux
boundary condition is additive, you must explicitly exclude the top-surface
boundary from the selection. Implement this selection as follows:
2 In the Settings window for Heat Flux, locate the Boundary Selection section.
3 From the Selection list, choose All boundaries.
4 In the Graphics window, click on the top surface and then right-click to remove it
from the selection.
5 Locate the Heat Flux section. Click the Convective heat flux button.
6 In the h text field, type htc_s.
Heat Flux 2
1 On the Physics toolbar, click Boundaries and choose Heat Flux.
2 Select Boundary 4 only.
3 In the Settings window for Heat Flux, locate the Heat Flux section.
4 Click the Convective heat flux button.
5 In the h text field, type htc_us.
Temperature 1
1 On the Physics toolbar, click Boundaries and choose Temperature.
2 In the Settings window for Temperature, locate the Boundary Selection section.
3 From the Selection list, choose Substrate Contact.
MESH 1
1 In the Model Builder window, under Thermal Actuator (comp1) click Mesh 1.
2 In the Settings window for Mesh, locate the Mesh Settings section.
3 From the Element size list, choose Fine.
Free Triangular 1
1 Right-click Thermal Actuator (comp1)>Mesh 1 and choose More Operations>Free
Triangular.
2 In the Settings window for Free Triangular, locate the Boundary Selection section.
Swept 1
1 In the Model Builder window, right-click Mesh 1 and choose Swept.
2 Right-click Mesh 1 and choose Build All.
STUDY 1
On the Home toolbar, click Compute.
RESULTS
Temperature (ht)
The second default plot group shows the temperature distribution on the surface (see
Figure 4).
1D Plot Group 4
On the Home toolbar, click Add Plot Group and choose 1D Plot Group.
Line Graph 1
On the 1D Plot Group 4 toolbar, click Line Graph.
1D Plot Group 4
1 Select Edge 52 only.
2 In the Settings window for Line Graph, click Replace Expression in the upper-right
corner of the y-axis data section. From the menu, choose Thermal Actuator>Heat
Transfer in Solids>Temperature>T - Temperature.
3 Click Replace Expression in the upper-right corner of the x-axis data section. From
the menu, choose Geometry>Coordinate>x - x-coordinate.
4 Locate the x-Axis Data section. From the Unit list, choose m.
5 On the 1D Plot Group 4 toolbar, click Plot.
Modeling Instructions
APPLICATION LIBRARY
1 On the Home toolbar, click Application Libraries.
2 In the Application Library tree, select COMSOL
Multiphysics>Multiphysics>thermal_actuator_jh.
3 Click Open Application.
1 | J O U L E H E A T I N G O F A M I C R O A C T U A T O R D I S T R I B U T E D P A R A M E T E R VE R S I O N
Solved with COMSOL Multiphysics 5.2
STUDY 1
1 In the Model Builder windows toolbar, click the Show button and select Advanced
Study Options in the menu.
With this setting active, Cluster Computing is available from the Study node's
context menu.
Parametric Sweep
1 On the Study toolbar, click Parametric Sweep.
2 In the Settings window for Parametric Sweep, locate the Study Settings section.
3 Click Add.
4 In the table, enter the following settings:
Cluster Computing
1 In the Model Builder window, right-click Study 1 and choose Cluster Computing.
2 In the Settings window for Cluster Computing, locate the Batch Settings section.
Set the number of nodes to the number of nodes you want to use. If you are testing
Cluster Computing, set the number of nodes to 2 or less to make sure everything
works.
3 Click to expand the Cluster settings section. Locate the Cluster Settings section.
Select the Distribute parametric sweep check box.
Choose from one of the following settings the type of job scheduler to use:
General: Use the General scheduler if you intend to submit a job to a job scheduler
that you have configured COMSOL to run on.
HPCS 2008: Use the HPCS 2008 scheduler if you intend to submit a job to a
Windows HPC Server 2008 using the Windows HPC Cluster Manager.
WCCS 2003: Use the WCCS 2003 scheduler if you intend to submit a job to a
Windows Compute Cluster Server 2003.
2 | J O U L E H E A T I N G O F A M I C R O A C T U A T O R D I S T R I B U T E D P A R A M E T E R VE R S I O N
Solved with COMSOL Multiphysics 5.2
4 Locate the Batch Settings section. From the Scheduler type list, choose Not
distributed.
Not Distributed: Use this setting when you have configured COMSOL to run on
job scheduler but only intend to run on a single node of the cluster.
Make sure you configure the batch directories and COMSOL installation directories
correctly. It is good practice to save these values as default once you have good
settings.
5 Click the Save as Default button.
Batch 1
1 On the Study toolbar, click Compute.
In the General section, click Open to open the file containing the model generated
by the batch job associated with this external process in a new COMSOL session.
In the Process Status section, the log shows the total solution time. COMSOL
automatically takes advantage of all cores; to measure the speedup, set the number
of cores to 1 and run a new job.
2 In the Model Builder window, click Batch 1.
3 In the Settings window for Batch, locate the General section.
4 From the Defined by study step list, choose User defined.
5 Select the Number of cores check box.
6 Locate the Files section. In the Filename text field, enter a name of your choice.
Next, change the filename to create a new External Process node for the run:
7 In the Filename text field, enter a name of your choice.
Cluster Computing 1
If you are not using the cluster type Not distributed, make sure to set the Number of
nodes to 1.
Batch 1
1 In the Model Builder window, under Study 1>Job Configurations right-click Cluster
Computing 1 and choose Run.
When the process has finished, compare the total time in the log for the new external
process with the previous value. The speedup is equal to the previous value divided
by the new value. The speedup depends on the mesh size. To improve the numbers,
try refining the mesh.
3 | J O U L E H E A T I N G O F A M I C R O A C T U A T O R D I S T R I B U T E D P A R A M E T E R VE R S I O N
Solved with COMSOL Multiphysics 5.2
4 | J O U L E H E A T I N G O F A M I C R O A C T U A T O R D I S T R I B U T E D P A R A M E T E R VE R S I O N
Solved with COMSOL Multiphysics 5.2
The material properties of polysilicon are temperature dependent, which means that
the involved physics phenomena are fully coupled. The electric current through the
hot arms increases the temperature in the actuator, which in turn causes thermal
expansion and changes the electrical conductivity of the material.
The actuators operation thus involves three coupled physics phenomena: electric
current conduction, heat conduction with heat generation, and structural stresses and
strains due to thermal expansion.
In this example the thermal expansion is included manually using the Equation View.
Furthermore, only linear strains are considered, which is a valid approximation
provided deformations are small. Using the Structural Mechanics Module or the
MEMS Module one can directly include the thermal equation in the physics and also
take into account possible large deformations; see the model Thermal Microactuator
in the Structural Mechanics Module Application Libraries or the MEMS Module
Application Libraries.
Model Definition
Figure 1 shows the actuators parts and dimensions as well as its position on top of a
substrate surface.
Upper surface
Substrate
240 m
Hot arms
3 m
2 m
Ground
Applied voltage
The temperature of the base of the three anchors and the three dimples is fixed to that
of the substrates constant temperature. Because the structure is sandwiched, all other
boundaries interact thermally with the surroundings by conduction through thin layers
of air.
The heat transfer coefficient is given by the thermal conductivity of air divided by the
distance to the surrounding surfaces for the system. This exercise uses different heat
transfer coefficients for the actuators upper and other surfaces.
Fixed temperature
Fixed temperature
Fixed temperature
All three arms are mechanically fixed at the base of the three anchors. The dimples can
move freely in the plane of the substrate (the xy-plane in the figure) but do not move
in the direction perpendicular to the substrate (the z direction).
Fixed
Fixed
Roller
Results
Figure 5 shows the surface temperature distribution for the actuator design with
two arms. It also illustrates the displacement field through a deformation plot.
For the two-arms design, the computed displacement at the tip of the actuator is about
3.3 m.
Figure 6 shows the surface temperature distribution for the actuator design with 3
arms only.
For the two-arms design, the computed displacement at the tip of the actuator is about
1.1 m.
th = ( T T 0 )
Where is the material thermal expansion coefficient, T the strain temperature and T0
the strain reference temperature.
Enable the equation view by clicking the Show button ( ) and select Equation View.
You can then access the equation view by expanding each node of the model tree.
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 3D.
2 In the Select physics tree, select Heat Transfer>Electromagnetic Heating>Joule Heating.
3 Click Add.
4 In the Select physics tree, select Structural Mechanics>Solid Mechanics (solid).
5 Click Add.
6 Click Study.
7 In the Select study tree, select Preset Studies for Selected Physics Interfaces>Stationary.
8 Click Done.
COMPONENT 1 (COMP1)
1 In the Model Builder window, right-click Component 1 (comp1) and choose Rename.
2 In the Rename Component dialog box, type Thermal Actuator in the New label text
field.
3 Click OK.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
GEOMETRY 1
1 In the Model Builder window, under Thermal Actuator (comp1) click Geometry 1.
2 In the Settings window for Geometry, locate the Units section.
3 From the Length unit list, choose m.
If 1 (if1)
1 On the Geometry toolbar, click Programming and choose If + End If.
2 In the Settings window for If, locate the If section.
3 In the Condition text field, type (noa==3).
Rectangle 1 (r1)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 In the Width text field, type L3.
4 In the Height text field, type dw.
5 Locate the Position section. In the xw text field, type L-L3.
Rectangle 2-9
Continue to generate 8 rectangles with the following settings:
Union 1 (uni1)
1 On the Geometry toolbar, click Booleans and Partitions and choose Union.
2 Click in the Graphics window and then press Ctrl+A to select all objects.
3 In the Settings window for Union, locate the Union section.
4 Clear the Keep interior boundaries check box.
Fillet 1 (fil1)
1 On the Geometry toolbar, click Fillet.
2 On the object uni1, select Points 1, 2, 49, 1114, 16, 17, 1923, and 28 only.
3 In the Settings window for Fillet, locate the Radius section.
4 In the Radius text field, type d/3.
Extrude 1 (ext1)
1 On the Geometry toolbar, click Extrude.
2 In the Settings window for Extrude, locate the Distances from Plane section.
3 In the table, enter the following settings:
Distances (m)
2
Rectangle 1 (r1)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 In the Width text field, type wb-2*d.
4 In the Height text field, type 2.5*(wb-2*d).
5 Locate the Position section. In the xw text field, type d.
6 In the yw text field, type (dw+d+2*gap)+(dw+gap+d)-2.5*(wb-2*d)-d.
Rectangle 2 (r2)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 In the Width text field, type wb-2*d.
4 In the Height text field, type 2.5*(wb-2*d).
5 Locate the Position section. In the xw text field, type L-L2-wb+d.
6 In the yw text field, type d.
Rectangle 3 (r3)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 In the Width text field, type wb-2*d.
4 In the Height text field, type 2.5*(wb-2*d).
5 Locate the Position section. In the xw text field, type L-L3-L4-wb+d.
6 In the yw text field, type d.
Fillet 1 (fil1)
1 On the Geometry toolbar, click Fillet.
2 Click the Zoom Extents button on the Graphics toolbar.
3 On the object r2, select Points 14 only.
Circle 1 (c1)
1 On the Geometry toolbar, click Primitives and choose Circle.
2 In the Settings window for Circle, locate the Size and Shape section.
3 In the Radius text field, type d/2.
4 Locate the Position section. In the xw text field, type L-L3/4.
5 In the yw text field, type dw/2.
Circle 2 (c2)
1 On the Geometry toolbar, click Primitives and choose Circle.
2 In the Settings window for Circle, locate the Size and Shape section.
3 In the Radius text field, type d/2.
4 Locate the Position section. In the xw text field, type L-L3/2.
5 In the yw text field, type dw/2.
Circle 3 (c3)
1 On the Geometry toolbar, click Primitives and choose Circle.
2 In the Settings window for Circle, locate the Size and Shape section.
3 In the Radius text field, type d/2.
4 Locate the Position section. In the xw text field, type L-3*L3/4.
5 In the yw text field, type dw/2.
Extrude 2 (ext2)
1 On the Geometry toolbar, click Extrude.
2 In the Settings window for Extrude, locate the Distances from Plane section.
3 In the table, enter the following settings:
Distances (m)
2
Union 1 (uni1)
1 On the Geometry toolbar, click Booleans and Partitions and choose Union.
2 Click the Select Box button on the Graphics toolbar.
3 Select the objects ext2 and ext1 only.
4 In the Settings window for Union, locate the Union section.
5 Clear the Keep interior boundaries check box.
3 In the Settings window for Explicit Selection, locate the Entities to Select section.
4 From the Geometric entity level list, choose Boundary.
5 On the object uni1, select Boundary 10 only.
6 Locate the Resulting Selection section. Click New.
7 Clear the Keep selection check box.
8 In the New Cumulative Selection dialog box, type Ground in the Name text field.
9 Click OK.
End If 1 (endif1)
In the Model Builder window, under Thermal Actuator (comp1)>Geometry 1 right-click
End If 1 (endif1) and choose Build Selected.
GLOBAL DEFINITIONS
Parameters
1 In the Model Builder window, under Global Definitions click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
3 In the table, enter the following settings:
GEOMETRY 1
If 2 (if2)
1 On the Geometry toolbar, click Programming and choose If + End If.
2 In the Settings window for If, locate the If section.
3 In the Condition text field, type (noa==2).
Plane Geometry
1 In the Model Builder window, expand the Thermal Actuator (comp1)>Geometry 1>
Work Plane 3 (wp3)>Plane Geometry node.
2 Right-click Rectangle 6 (r6), Rectangle 7(r7), Rectangle 8 (r8) and choose Disable.
Extrude 3 (ext3)
1 In the Model Builder window, under Thermal Actuator (comp1)>Geometry 1
right-click Extrude 1 (ext1) and choose Duplicate.
2 In the Settings window for Extrude, locate the General section.
3 From the Work plane list, choose Work Plane 3 (wp3).
4 Find the Input objects subsection. Select the Active toggle button.
5 Select the object wp3 only.
Rectangle 1 (r1)
In the Model Builder window, expand the Thermal Actuator (comp1)>Geometry 1> Work
Plane 4 (wp4)>Plane Geometry node.
Extrude 2 (ext2)
Right-click Rectangle 1 (r1) and choose Disable.
Extrude 4 (ext4)
1 In the Model Builder window, under Thermal Actuator (comp1)>Geometry 1
right-click Extrude 2 (ext2) and choose Duplicate.
2 In the Settings window for Extrude, locate the General section.
3 From the Work plane list, choose Work Plane 4 (wp4).
4 Find the Input objects subsection. Select the Active toggle button.
5 Select the object wp4 only.
Union 1 (uni1)
Right-click Thermal Actuator (comp1)>Geometry 1> Extrude 4 (ext4) and choose Build
Selected.
Union 2 (uni2)
1 In the Model Builder window, under Thermal Actuator (comp1)>Geometry 1
right-click Union 1 (uni1) and choose Duplicate.
2 In the Settings window for Union, locate the Union section.
3 Find the Input objects subsection. Select the Active toggle button.
4 Select the objects ext3 and ext4 only.
DEFINITIONS
Union 1
1 On the Definitions toolbar, click Union.
2 In the Settings window for Union, locate the Geometric Entity Level section.
ADD MATERIAL
1 On 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>Polysilicon.
4 Click Add to Component in the window toolbar.
5 On the Home toolbar, click Add Material to close the Add Material window.
Electric Potential 1
1 On the Physics toolbar, click Boundaries and choose Electric Potential.
2 In the Settings window for Electric Potential, locate the Boundary Selection section.
3 From the Selection list, choose Applied Voltage.
4 Locate the Electric Potential section. In the V0 text field, type DV.
Ground 1
1 On the Physics toolbar, click Boundaries and choose Ground.
2 In the Settings window for Ground, locate the Boundary Selection section.
3 From the Selection list, choose Ground.
H E A T TR A N S F E R I N S O L I D S ( H T )
In the Model Builder window, under Thermal Actuator (comp1) click Heat Transfer in
Solids (ht).
Heat Flux 1
1 On the Physics toolbar, click Boundaries and choose Heat Flux.
2 In the Settings window for Heat Flux, locate the Boundary Selection section.
Heat Flux 2
1 On the Physics toolbar, click Boundaries and choose Heat Flux.
2 In the Settings window for Heat Flux, locate the Boundary Selection section.
3 From the Selection list, choose Upper Surface.
4 Locate the Heat Flux section. Click the Convective heat flux button.
5 In the h text field, type htc_us.
Temperature 1
1 On the Physics toolbar, click Boundaries and choose Temperature.
2 In the Settings window for Temperature, locate the Boundary Selection section.
3 From the Selection list, choose Surface Contact.
Fixed Constraint 1
1 On 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 Surface Contact.
Roller 1
1 On the Physics toolbar, click Boundaries and choose Roller.
2 In the Settings window for Roller, locate the Boundary Selection section.
3 From the Selection list, choose Dimples.
4 In the Model Builder windows toolbar, click the Show button and select Equation
View in the menu.
STUDY 1
On the Home toolbar, click Compute.
RESULTS
Point Evaluation 1
On the Results toolbar, click Point Evaluation.
Derived Values
1 In the Settings window for Point Evaluation, locate the Selection section.
2 From the Selection list, choose Tip.
3 Locate the Expression section. In the Expression text field, type solid.disp.
4 Click the Evaluate button.
TA BL E
Go to the Table window.
RESULTS
Volume Maximum 1
On the Results toolbar, click More Derived Values and choose Maximum>Volume
Maximum.
Derived Values
1 In the Settings window for Volume Maximum, locate the Selection section.
2 From the Selection list, choose All domains.
3 Locate the Expression section. In the Expression text field, type T.
4 Click the Evaluate button.
TABLE
1 Go to the Table window.
RESULTS
Temperature (ht)
1 In the Model Builder window, expand the Temperature (ht) node.
2 Right-click Surface 1 and choose Deformation.
3 In the Settings window for Deformation, locate the Scale section.
4 Select the Scale factor check box.
5 In the associated text field, type 5.
6 On the Temperature (ht) toolbar, click Plot.
GLOBAL DEFINITIONS
Parameters
Continue by computing the solution for the three arms actuator geometry case.
STUDY 1
On the Home toolbar, click Compute.
RESULTS
Derived Values
In the Model Builder window, under Results>Derived Values right-click Point Evaluation
1 and choose Evaluate.
TA BL E
Go to the Table window.
RESULTS
Derived Values
In the Model Builder window, under Results>Derived Values right-click Volume Maximum
1 and choose Evaluate.
TA BL E
Go to the Table window.
Thin-Film Resistance
When modeling transport by diffusion or conduction in thin layers, large differences
in dimensions of the different domains are common. If the model has a sandwich
structure, you can replace the thinnest layers with a thin-layer approximation, provided
that the difference in thickness is large.
Model Definition
This study explains the principle of the thin-layer approximation in direct current
conduction problems. A comparison of a structure with three domains to a simplified
model that replaces the domain in the middle with a thin-layer approximation shows
the benefit of this approach (see Figure 1).
z Constant
potential
Inlet current
Figure 1: Exact domain description (left) and approximation (right). The current flows
from the base plate to the circular plate on the upper surface of the device.
Equation 1 below describes the current balance in all three domains in the real
sandwich structure:
( V ) = 0 (1)
In this equation, represents the conductivity and V the electric potential. In this case,
there is a substantial difference in conductivity between the thin and thicker layers of
the structure. The boundary conditions include a current inlet in the base plate of the
device and a constant potential at the upper circular boundary (see Figure 1). All other
boundaries are insulated.
The simplified model is based on the assumption that the components of the current
density vector in the x and y directions are small and that the dominating transport
1 | THIN-FILM RESISTANCE
Solved with COMSOL Multiphysics 5.2
through the thin structure is obtained in the z direction. For the middle layer, this
implies that you can approximate Equation 1 by the one-dimensional equation
2
d V
----------
2
- = 0 (2)
dz
It is possible to solve this equation analytically if the potential is given at the lower and
upper surfaces of the middle layer:
V = 0 = V1 (3)
V = 1 = V2 (4)
V = az + b
where a and b are integration constants. If you arbitrarily place z = 0 at the lower
boundary of the middle layer, you get the constants a and b from the boundary
conditions in Equation 3 and Equation 4:
V1 = b
V 2 = a + b
This gives:
b = V1
V2 V1
a = --------------------
V2 V1
V = -------------------- z + V 1 (5)
dV
J z = -------- (6)
dz
2 | THIN-FILM RESISTANCE
Solved with COMSOL Multiphysics 5.2
V2 V1
J z = -------------------- (7)
In the thin-film approximation the potential is discontinuous at the film boundary. Use
the Contact Impedance node on interior boundaries to model a thin layer of resistive
material.
It is also possible to derive the expression for the current density in Equation 7 by
approximating the gradient using the potential difference over the thin layer. This
example includes the previous tedious derivation to show that this is exactly what you
obtain from the solution of Equation 2.
The approximation presented in this example is not limited to direct current problems:
You can also use it for modeling of diffusion, heat conduction, flow through porous
media using Darcys law, and other types of physics that the divergence of a gradient
flux describes.
3 | THIN-FILM RESISTANCE
Solved with COMSOL Multiphysics 5.2
Figure 2: Potential distribution in the modeled device. The value of the potential loss over
the device at a current of 0.3 A is almost identical in the two models: the full model (left)
and thin-film approximation (right).
Figure 3 shows a cross-section plot of the potential through the structures center for
the full model and for the approximation. The plots show the excellent agreement
obtained between the two models.
Figure 3: Potential distribution along the z direction in the middle of the device. Solution
for the full model (left) and for the thin-film approximation (right).
Modeling Instructions
From the File menu, choose New.
4 | THIN-FILM RESISTANCE
Solved with COMSOL Multiphysics 5.2
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 3D.
2 In the Select physics tree, select AC/DC>Electric Currents (ec).
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Stationary.
6 Click Done.
GEOMETRY 1
Circle 1 (c1)
1 On the Geometry toolbar, click Primitives and choose Circle.
2 In the Settings window for Circle, locate the Size and Shape section.
3 In the Radius text field, type 0.6.
4 Locate the Position section. In the yw text field, type 1.
5 On the Geometry toolbar, click Build All.
Square 1 (sq1)
1 On the Geometry toolbar, click Primitives and choose Square.
2 Click Build All.
3 Click the Zoom Extents button on the Graphics toolbar.
Intersection 1 (int1)
1 On the Geometry toolbar, click Booleans and Partitions and choose Intersection.
2 Click in the Graphics window, press Ctrl+A to highlight both objects, and then
right-click to confirm the selection.
3 On the Geometry toolbar, click Build All.
5 | THIN-FILM RESISTANCE
Solved with COMSOL Multiphysics 5.2
Square 2 (sq2)
1 On the Geometry toolbar, click Primitives and choose Square.
2 Click Build All.
3 Click the Zoom Extents button on the Graphics toolbar.
The 2D geometry should now look as in the figure below.
Extrude 1 (ext1)
1 On the Geometry toolbar, click Extrude.
2 Select the object wp1.sq2 only.
3 In the Settings window for Extrude, locate the Distances from Plane section.
4 In the table, enter the following settings:
Distances (m)
-0.1
Block 1 (blk1)
1 On the Geometry toolbar, click Block.
2 In the Settings window for Block, locate the Size and Shape section.
3 In the Height text field, type 0.1.
6 | THIN-FILM RESISTANCE
Solved with COMSOL Multiphysics 5.2
Current Conservation 1
1 In the Model Builder window, expand the Component 1 (comp1)>Electric Currents (ec)
node, then click Current Conservation 1.
2 In the Settings window for Current Conservation, locate the Conduction Current
section.
3 From the list, choose User defined. In the associated text field, type 1.
7 | THIN-FILM RESISTANCE
Solved with COMSOL Multiphysics 5.2
Ground 1
1 On the Physics toolbar, click Boundaries and choose Ground.
2 Select Boundary 8 only.
Contact Impedance 1
1 On the Physics toolbar, click Boundaries and choose Contact Impedance.
2 Click the Wireframe Rendering button on the Graphics toolbar.
3 Select Boundary 6 only.
4 Click the Wireframe Rendering button on the Graphics toolbar to restore the
rendering setting.
5 In the Settings window for Contact Impedance, locate the Contact Impedance
section.
6 In the ds text field, type 0.02.
7 From the list, choose User defined. Keep the default value.
8 From the r list, choose User defined. Again, the default value applies.
STUDY 1
1 In the Model Builder window, click Study 1.
2 In the Settings window for Study, locate the Study Settings section.
3 Clear the Generate default plots check box since you will add the desired plots
manually.
4 On the Home toolbar, click Compute.
The following steps show you how to reproduce the surface plot of the potential (right
panel of Figure 2).
RESULTS
3D Plot Group 1
1 On the Home toolbar, click Add Plot Group and choose 3D Plot Group.
2 In the Model Builder window, right-click 3D Plot Group 1 and choose Surface.
3 In the Settings window for Surface, locate the Coloring and Style section.
4 Clear the Color legend check box.
5 On the 3D Plot Group 1 toolbar, click Plot.
8 | THIN-FILM RESISTANCE
Solved with COMSOL Multiphysics 5.2
Follow the steps below to visualize the potential distribution along the z direction in
the middle of the device (the right panel of Figure 3).
Cut Line 3D 1
On the Results toolbar, click Cut Line 3D.
Data Sets
1 In the Settings window for Cut Line 3D, locate the Line Data section.
2 In row Point 1, set x to 0.5.
3 In row Point 2, set x to 0.5.
4 In row Point 1, set y to 0.5.
5 In row Point 2, set y to 0.5.
6 In row Point 1, set z to -0.1.
7 In row Point 2, set z to 0.1.
1D Plot Group 2
1 On the Results toolbar, click 1D Plot Group.
2 In the Settings window for 1D Plot Group, click to expand the Axis section.
3 Select the Manual axis limits check box.
4 In the x minimum text field, type -0.1.
5 In the x maximum text field, type 0.1.
6 In the y minimum text field, type 0.2.
7 In the y maximum text field, type 1.
Line Graph 1
On the 1D Plot Group 2 toolbar, click Line Graph.
1D Plot Group 2
1 In the Settings window for Line Graph, locate the Data section.
2 From the Data set list, choose Cut Line 3D 1.
3 Click Replace Expression in the upper-right corner of the x-axis data section. From
the menu, choose Geometry>Coordinate>z - z-coordinate.
4 On the 1D Plot Group 2 toolbar, click Plot.
9 | THIN-FILM RESISTANCE
Solved with COMSOL Multiphysics 5.2
GEOMETRY 1
Move 1 (mov1)
1 On the Geometry toolbar, click Transforms and choose Move.
2 Select the object blk1 only.
3 In the Settings window for Move, locate the Displacement section.
4 In the z text field, type -0.02.
Block 2 (blk2)
1 On the Geometry toolbar, click Block.
2 In the Settings window for Block, locate the Size and Shape section.
3 In the Height text field, type 0.02.
4 Locate the Position section. In the z text field, type -0.02.
Current Conservation 2
1 On the Physics toolbar, click Domains and choose Current Conservation.
2 Select Domain 2 only.
3 In the Settings window for Current Conservation, locate the Conduction Current
section.
4 From the list, choose User defined. In the associated text field, type 0.01.
Contact Impedance 1
In the Model Builder window, under Component 1 (comp1)>Electric Currents (ec)
right-click Contact Impedance 1 and choose Disable.
STUDY 1
On the Home toolbar, click Compute.
RESULTS
3D Plot Group 1
This plot shows the potential distribution (the left panel of Figure 2).
10 | THIN-FILM RESISTANCE
Solved with COMSOL Multiphysics 5.2
1D Plot Group 2
This plot reproduces the left panel of Figure 3.
Now, follow these steps to reset the model to use the thin-film approximation.
GEOMETRY 1
Block 2 (blk2)
1 In the Model Builder window, under Component 1 (comp1)>Geometry 1 right-click
Move 1 (mov1) and choose Disable.
2 Right-click Block 2 (blk2) and choose Disable.
Current Conservation 2
1 In the Model Builder window, under Component 1 (comp1)>Electric Currents (ec)
right-click Contact Impedance 1 and choose Enable.
2 Right-click Current Conservation 2 and choose Disable.
STUDY 1
On the Home toolbar, click Compute.
11 | THIN-FILM RESISTANCE
Solved with COMSOL Multiphysics 5.2
12 | THIN-FILM RESISTANCE
Solved with COMSOL Multiphysics 5.2
The model is parametrized, so it is easy to change for example the velocity of the load
pulses, or the spacing between them. This is used for showing that for some load
configurations, resonant vibrations will appear in the beam.
f ( x vt ) (1)
This is the type of load being used in this example. You can however to use completely
arbitrary functions of space and time too.
When the load is moving during the analysis, it will in general only cover some
elements partially. This is not a problem, since the load is numerically integrated. The
element size should however be chosen such that several elements are covered by the
load.
Model Definition
GEOMETRY
Many aspects of the modeling can be parametrized. The table below shows the values
used in the analysis.
1 | B E A M W I T H A TR A V E L I N G L O A D
Solved with COMSOL Multiphysics 5.2
The load travels along the top. The loading is controlled by the parameters listed in
Table 2
TABLE 2: LOAD PARAMETERS
As can be seen in the table, four different combinations of loads are analyzed:
1 A single load pulse traveling with a speed which is slow compared to the natural
frequency of the beam.
2 A single loads pulse traveling with a speed which matches the natural frequency of
the beam.
3 A pulse train traveling with a speed which matches the natural frequency of the
beam. The distance between the individual load pulses is two span widths.
2 | B E A M W I T H A TR A V E L I N G L O A D
Solved with COMSOL Multiphysics 5.2
4 A pulse train traveling with a speed which matches the natural frequency of the
beam. The distance between the individual load pulses is one span width.
Results
The lowest eigenfrequency of the beam can be computed analytically, and is
independent of the number of spans. It is actually the same as for a simply supported
beam with the length of a single span. The expression is
EI
f 0 = --- --------------
- (2)
2 AL 4
s
which with the given parameters can be evaluated to 4.49 Hz. It can thus be expected
that a load which travels one span Ls during half the period T0 of the lowest natural
frequency f0 should be able to excite a resonant vibration. This critical velocity is then
approximately
Ls
v c = --------------- = 2Lf 0 89 .7 m/s (3)
T0
------
2
The effect of changing the velocity of the load, and the spacing between the loads are
shown in Figure 1. The graphs show how the vertical displacement at the midpoint of
the first span vary as function of the position of the first load pulse. The horizontal axis
can also be seen as time, scaled with load velocity.
At a low load speed (20 m/s), the solution resembles a stationary solution. As the
load moves away from the first span, the deflection there decreases.
When the load speed is such (89.7 m/s) that the load travels two spans in the time
T0 of one period, then the load can actually excite resonances. This can be seen
when using a very long load spacing (160 m, essentially giving a single load), as well
as when using a spacing of two spans (20 m). The reason is that the load will always
act on a downwards motion of the beam, thus giving a positive power input.
Even if the loads travel with the critical speed, they can counteract each other. This
is the case in the last analysis, where the spacing between the loads matches the
length of one span (10 m). In this case, every other load will act against the velocity,
and thus limit the response.
3 | B E A M W I T H A TR A V E L I N G L O A D
Solved with COMSOL Multiphysics 5.2
Figure 1: Displacement history at the midpoint of the first span, as function of the location
of the first load pulse
4 | B E A M W I T H A TR A V E L I N G L O A D
Solved with COMSOL Multiphysics 5.2
Figure 2: Displaced shape when loads are traveling to the right with a speed and spacing
giving an amplification of the response.
Modeling Instructions
From the File menu, choose New.
NEW
1 In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 2D.
2 In the Select physics tree, select Structural Mechanics>Solid Mechanics (solid).
5 | B E A M W I T H A TR A V E L I N G L O A D
Solved with COMSOL Multiphysics 5.2
3 Click Add.
4 Click Study.
5 In the Select study tree, select Preset Studies>Time Dependent.
6 Click Done.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
3 Click Load from File.
4 Browse to the applications Application Library folder and double-click the file
traveling_load_parameters.txt.
GEOMETRY 1
Rectangle 1 (r1)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size and Shape section.
3 In the Width text field, type SpanWidth.
4 In the Height text field, type BeamHeight.
Point 1 (pt1)
1 On the Geometry toolbar, click Primitives and choose Point.
2 In the Settings window for Point, locate the Point section.
3 In the y text field, type BeamHeight/2.
Point 2 (pt2)
1 In the Model Builder window, right-click Point 1 (pt1) and choose Duplicate.
2 In the Settings window for Point, locate the Point section.
3 In the x text field, type SpanWidth.
4 Click the Build All Objects button.
Union 1 (uni1)
On the Geometry toolbar, click Booleans and Partitions and choose Union.
Array 1 (arr1)
1 In the Model Builder window, right-click Union 1 (uni1) and choose Build Selected.
6 | B E A M W I T H A TR A V E L I N G L O A D
Solved with COMSOL Multiphysics 5.2
DEFINITIONS
Box 1
1 On the Definitions toolbar, click Box.
2 In the Settings window for Box, type Box: Points on centerline in the Label
text field.
3 Locate the Geometric Entity Level section. From the Level list, choose Point.
4 Locate the Box Limits section. In the y minimum text field, type BeamHeight/3.
5 In the y maximum text field, type 2*BeamHeight/3.
6 Locate the Output Entities section. From the Include entity if list, choose Entity inside
box.
Box 2
1 On the Definitions toolbar, click Box.
2 In the Settings window for Box, type Box: Boundaries above 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 y minimum text field, type 2*BeamHeight/2.
5 Locate the Output Entities section. From the Include entity if list, choose Entity inside
box.
MATERIALS
On the Home toolbar, click Windows and choose Add Material.
ADD MATERIAL
1 Go to the Add Material window.
2 In the tree, select Built-In>Concrete.
3 Click Add to Component in the window toolbar.
7 | B E A M W I T H A TR A V E L I N G L O A D
Solved with COMSOL Multiphysics 5.2
4 On the Home toolbar, click Add Material to close the Add Material window.
Damping 1
1 On the Physics toolbar, click Attributes and choose Damping.
2 In the Settings window for Damping, locate the Damping Settings section.
3 In the dK text field, type 0.002.
Fixed Constraint 1
1 On the Physics toolbar, click Points and choose Fixed Constraint.
2 In the Settings window for Fixed Constraint, locate the Point Selection section.
3 From the Selection list, choose Box: Points on centerline.
DEFINITIONS
Rectangle 1 (rect1)
1 On the Home toolbar, click Functions and choose Global>Rectangle.
2 In the Settings window for Rectangle, locate the Parameters section.
3 In the Lower limit text field, type -0.5*PulseWidth.
4 In the Upper limit text field, type 0.5*PulseWidth.
5 Click to expand the Smoothing section. In the Size of transition zone text field, type
0.1*PulseWidth.
In order to make the load pulse periodic, call it through an analytical function, which
has the option of being periodic.
Analytic 1 (an1)
1 On the Home toolbar, click Functions and choose Global>Analytic.
8 | B E A M W I T H A TR A V E L I N G L O A D
Solved with COMSOL Multiphysics 5.2
2 In the Settings window for Analytic, type Pulse in the Function name text field.
3 Locate the Definition section. In the Expression text field, type rect1(x).
4 Locate the Units section. In the Arguments text field, type m.
5 In the Function text field, type 1.
6 Click to expand the Periodic extension section. Locate the Periodic Extension section.
Select the Make periodic check box.
7 In the Upper limit text field, type PulseSpacing.
8 Right-click Analytic 1 (an1) and choose Variables.
Create a variable for filtering the load, so that it is periodic only behind the first pulse.
Variables 1
1 In the Settings window for Variables, locate the Variables section.
2 In the table, enter the following settings:
Add the load definition to the whole upper boundary. The function call will make the
load non-zero only at certain traveling positions.
Boundary Load 1
1 On 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 Box: Boundaries above.
4 Locate the Force section. Specify the FA vector as
0 x
if(BehindFirstLoad,-LoadIntensity*Pulse(X-LoadSpeed*t),0) y
9 | B E A M W I T H A TR A V E L I N G L O A D
Solved with COMSOL Multiphysics 5.2
MESH 1
Mapped 1
In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and choose
Mapped.
Distribution 1
1 In the Model Builder window, under Component 1 (comp1)>Mesh 1 right-click Mapped
1 and choose Distribution.
2 Select Boundaries 1 and 3 only.
3 In the Settings window for Distribution, locate the Distribution section.
4 In the Number of elements text field, type 1.
Distribution 2
1 Right-click Mapped 1 and choose Distribution.
2 In the Settings window for Distribution, locate the Boundary Selection section.
3 From the Selection list, choose Box: Boundaries above.
4 Locate the Distribution section. In the Number of elements text field, type
ElemPerSpan.
STUDY 1
Parametric Sweep
1 On the Study toolbar, click Parametric Sweep.
2 In the Settings window for Parametric Sweep, locate the Study Settings section.
3 Click Add.
4 Click Add.
5 In the table, enter the following settings:
10 | B E A M W I T H A TR A V E L I N G L O A D
Solved with COMSOL Multiphysics 5.2
Solution 1 (sol1)
1 On the Study toolbar, click Show Default Solver.
2 In the Model Builder window, expand the Solution 1 (sol1) node, then click
Time-Dependent Solver 1.
3 In the Settings window for Time-Dependent Solver, click to expand the Time
stepping section.
4 Locate the Time Stepping section. Select the Maximum step check box.
5 In the associated text field, type Tstep.
Set a reasonable scale for the displacements, so that the convergence checks in the
solver will be appropriate.
RESULTS
Stress (solid)
1 In the Settings window for 2D Plot Group, type Displacement in the Label text
field.
Displacement
1 In the Model Builder window, expand the Results>Displacement node, then click
Surface 1.
2 In the Settings window for Surface, locate the Expression section.
3 In the Expression text field, type v.
11 | B E A M W I T H A TR A V E L I N G L O A D
Solved with COMSOL Multiphysics 5.2
4 Locate the Coloring and Style section. From the Color table list, choose Wave.
5 Select the Symmetrize color range check box.
6 In the Model Builder window, expand the Results>Displacement>Surface 1 node, then
click Deformation.
7 In the Settings window for Deformation, locate the Scale section.
8 Select the Scale factor check box.
9 In the associated text field, type 50.
1 In the Settings window for Arrow Surface, type Supports in the Label text field.
2 Locate the Expression section. In the X component text field, type 0.
3 In the Y component text field, type 1.
4 Locate the Arrow Positioning section. Find the X grid points subsection. From the
Entry method list, choose Coordinates.
5 In the Coordinates text field, type range(0,SpanWidth,TotLength).
6 Find the Y grid points subsection. From the Entry method list, choose Coordinates.
7 In the Coordinates text field, type 0.
8 Locate the Coloring and Style section. From the Arrow type list, choose Cone.
12 | B E A M W I T H A TR A V E L I N G L O A D
Solved with COMSOL Multiphysics 5.2
Export
1 On the Displacement toolbar, under Animation click Play.
2 In the Model Builder window, under Results>Export click Animation 1.
3 In the Settings window for Animation, locate the Animation Editing section.
4 From the Parameter value (LoadSpeed (m/s),PulseSpacing (m)) list, choose 2:
LoadSpeed=89.7 m/s, PulseSpacing=160 m.
5 Right-click Results>Export>Animation 1 and choose Play.
6 From the Parameter value (LoadSpeed (m/s),PulseSpacing (m)) list, choose 3:
LoadSpeed=89.7 m/s, PulseSpacing=20 m.
7 Right-click Results>Export>Animation 1 and choose Play.
8 From the Parameter value (LoadSpeed (m/s),PulseSpacing (m)) list, choose 4:
LoadSpeed=89.7 m/s, PulseSpacing=10 m.
9 Right-click Results>Export>Animation 1 and choose Play.
Create a point at the midpoint of the first span. This is where the vertical displacement
will be compared between the four cases.
Cut Point 2D 1
On the Results toolbar, click Cut Point 2D.
Data Sets
1 In the Settings window for Cut Point 2D, locate the Point Data section.
13 | B E A M W I T H A TR A V E L I N G L O A D
Solved with COMSOL Multiphysics 5.2
1D Plot Group 2
On the Results toolbar, click 1D Plot Group.
Point Graph 1
On the 1D Plot Group 2 toolbar, click Point Graph.
1D Plot Group 2
1 In the Settings window for Point Graph, locate the Data section.
2 From the Data set list, choose Cut Point 2D 1.
3 Locate the y-Axis Data section. In the Expression text field, type v.
4 On the 1D Plot Group 2 toolbar, click Plot.
Since the time spans are different for different load speeds, it is more informative to
study the results versus the position of the first load pulse.
5 Locate the x-Axis Data section. From the Parameter list, choose Expression.
6 In the Expression text field, type t*LoadSpeed.
7 Click to expand the Coloring and style section. Locate the Coloring and Style section.
In the Width text field, type 2.
8 Find the Line markers subsection. From the Marker list, choose Cycle.
9 Click to expand the Legends section. Select the Show legends check box.
10 On the 1D Plot Group 2 toolbar, click Plot.
11 In the Model Builder window, click 1D Plot Group 2.
12 In the Settings window for 1D Plot Group, click to expand the Legend section.
13 From the Position list, choose Upper left.
14 Locate the Plot Settings section. Select the x-axis label check box.
15 In the associated text field, type Position of first load pulse [m].
16 On the 1D Plot Group 2 toolbar, click Plot.
14 | B E A M W I T H A TR A V E L I N G L O A D
Solved with COMSOL Multiphysics 5.2
Tuning Fork
Introduction
This example simulates a tuning fork for tuning musical instruments and, if correctly
design, should sound the note of A, 440 Hz. It computes the fundamental
eigenfrequency and eigenmode for the tuning fork. Although the example seems to be
somewhat academic in nature, the eigenfrequencies and eigenmodes of microscopic
tuning forks are also used in quartz watches and other electronic devices.
Model Definition
The model geometry is shown in Figure 1. The fundamental frequency of the fork is
determined by the length of the prongs, the cross-section geometry of the prongs, and
the material properties of the fork.
L
R1
The following formula gives a theoretical estimation for the fundamental frequency of
a tuning fork with cylindrical cross section of the prong (Ref. 1):
2
1.875 R 2 E
f = ------------------------
- ---- (1)
4L p
2
where R2 is the radius of the cross section of the prongs, E denotes Youngs modulus,
and is the density. The length of the prong can be estimated as
1 | TU N I N G F O R K
Solved with COMSOL Multiphysics 5.2
1
L p = L + --- R 1 (2)
2
where R1 the radius of the base, and L is the length of the straight cylindrical part, see
Figure 1.
In the fundamental eigenmode, the prongs move according to the figure below. Thus,
the eigenmode is symmetric with a symmetry plane placed between the prongs.
Expected displacement of
the prongs
The advantage with the shape of the fundamental eigenmode is that the relative
displacements in the handle are very small, which makes it possible to hold the fork
without damping the vibration. This also allows to make use of the theoretical
estimation for the frequency Equation 1 which is based on the solution for a cantilever
beam representing each prong.
The parameters used in the model are: R1 = 7.5 mm and R2 = 2.5 mm. The fork
material is Steel AISI 4340, for which E = 205 GPa and = 7850 kg/m3.
For the frequency f = 440 Hz, Equation 1 and Equation 2 give the length of the
prong cylindrical part as L = 7.8 cm. This presents an underestimation because the part
of the prong near the base has larger bending stiffness compared to that for a straight
cantilever beam.
To fine-tune the fork, you will use parametrized geometry and gradually increase the
cylinder length starting from the above given estimation. To achieve this, you set up a
parametric sweep with respect to parameter L.
Reference
1. Tuning fork, http://en.wikipedia.org/wiki/Tuning_fork
2 | TU N I N G F O R K
Solved with COMSOL Multiphysics 5.2
Modeling Instructions
From the File menu, choose New.
NEW
1 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>Eigenfrequency.
6 Click Done.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
3 In the table, enter the following settings:
GEOMETRY 1
You can build up the fork geometry efficiently using predefined geometry primitives.
Cone 1 (cone1)
1 On the Geometry toolbar, click Cone.
3 | TU N I N G F O R K
Solved with COMSOL Multiphysics 5.2
2 In the Settings window for Cone, locate the Size and Shape section.
3 In the Bottom radius text field, type R2.
4 In the Height text field, type 2e-2.
5 In the Semi-angle text field, type 2.
6 Locate the Position section. In the x text field, type R1.
7 In the z text field, type -R1.
8 Locate the Axis section. From the Axis type list, choose Cartesian.
9 In the z text field, type -1.
Sphere 1 (sph1)
1 On the Geometry toolbar, click Sphere.
2 In the Settings window for Sphere, locate the Size section.
3 In the Radius text field, type 4e-3.
4 Locate the Position section. In the x text field, type R1.
5 In the z text field, type -(R1+2.25e-2).
Torus 1 (tor1)
1 On the Geometry toolbar, click Torus.
2 In the Settings window for Torus, locate the Size and Shape section.
3 In the Major radius text field, type R1.
4 In the Minor radius text field, type R2.
5 In the Revolution angle text field, type 180.
6 Locate the Position section. In the x text field, type R1.
7 Locate the Axis section. From the Axis type list, choose Cartesian.
8 In the z text field, type 0.
9 In the y text field, type 1.
10 Locate the Rotation Angle section. In the Rotation text field, type -90.
Union 1 (uni1)
1 On the Geometry toolbar, click Booleans and Partitions and choose Union.
2 In the Settings window for Union, locate the Union section.
3 Clear the Keep interior boundaries check box.
4 Click in the Graphics window and then press Ctrl+A to select all objects.
This completes the handle and base of the fork.
4 | TU N I N G F O R K
Solved with COMSOL Multiphysics 5.2
Cylinder 1 (cyl1)
1 On the Geometry toolbar, click Cylinder.
2 In the Settings window for Cylinder, locate the Size and Shape section.
3 In the Radius text field, type R2.
4 In the Height text field, type L.
Cylinder 2 (cyl2)
1 On the Geometry toolbar, click Cylinder.
2 In the Settings window for Cylinder, locate the Size and Shape section.
3 In the Radius text field, type R2.
4 In the Height text field, type L.
5 Locate the Position section. In the x text field, type 2*R1.
Use virtual geometry operations to avoid short edges and narrow regions. This will
improve the mesh generation.
5 | TU N I N G F O R K
Solved with COMSOL Multiphysics 5.2
ADD MATERIAL
1 On 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>Steel AISI 4340.
4 Click Add to Component in the window toolbar.
5 On the Home toolbar, click Add Material to close the Add Material window.
MESH 1
1 In the Model Builder window, under Component 1 (comp1) click Mesh 1.
2 In the Settings window for Mesh, locate the Mesh Settings section.
3 From the Element size list, choose Fine.
Free Triangular 1
1 Right-click Component 1 (comp1)>Mesh 1 and choose More Operations>Free
Triangular.
2 Select Boundaries 6 and 24 only.
3 Click the Build Selected button.
Swept 1
1 In the Model Builder window, right-click Mesh 1 and choose Swept.
2 In the Settings window for Swept, locate the Domain Selection section.
3 From the Geometric entity level list, choose Domain.
4 Select Domains 1 and 3 only.
Distribution 1
1 Right-click Component 1 (comp1)>Mesh 1>Swept 1 and choose Distribution.
2 In the Settings window for Distribution, locate the Distribution section.
3 In the Number of elements text field, type 50.
Swept 1
1 Right-click Swept 1 and choose Build Selected.
2 Right-click Mesh 1 and choose Free Tetrahedral.
6 | TU N I N G F O R K
Solved with COMSOL Multiphysics 5.2
STUDY 1
Set up a parametric sweep with respect to the cylinder length L and search for an
eigenfrequency in the vicinity of 440 Hz.
Parametric Sweep
1 On the Study toolbar, click Parametric Sweep.
2 In the Settings window for Parametric Sweep, locate the Study Settings section.
3 Click Add.
4 In the table, enter the following settings:
Step 1: Eigenfrequency
1 In the Model Builder window, under Study 1 click Step 1: Eigenfrequency.
2 In the Settings window for Eigenfrequency, locate the Study Settings section.
3 Select the Desired number of eigenfrequencies check box.
4 In the associated text field, type 1.
5 Select the Search for eigenfrequencies around check box.
7 | TU N I N G F O R K
Solved with COMSOL Multiphysics 5.2
Solution 1 (sol1)
1 On the Study toolbar, click Show Default Solver.
2 In the Model Builder window, expand the Solution 1 (sol1) node, then click Eigenvalue
Solver 1.
3 In the Settings window for Eigenvalue Solver, locate the General section.
4 In the Relative tolerance text field, type 1e-3.
5 On the Study toolbar, click Compute.
RESULTS
Global Evaluation 1
On the Results toolbar, click Global Evaluation.
Derived Values
1 In the Settings window for Global Evaluation, locate the Data section.
2 From the Data set list, choose Study 1/Parametric Solutions 1 (sol2).
3 From the Table columns list, choose Inner solutions.
4 Click Replace Expression in the upper-right corner of the Expression section. From
the menu, choose Component 1>Solid Mechanics>Global>solid.freq - Frequency.
5 Right-click Global Evaluation 1 and choose Evaluate>New Table.
TABLE
Go to the Table window.
You can see that the eigenfrequency closest to 440 Hz occurs for the cylinder length
of 0.0791 m. Further fine-tuning can be performed if necessary.
RESULTS
8 | TU N I N G F O R K
Solved with COMSOL Multiphysics 5.2
In this figure, you can clearly see that the mode is symmetric, and the displacements at
the handle are very small compared to those of the prongs. This means that holding
the tuning fork at the handle will have a negligible damping effect on the vibrations.
9 | TU N I N G F O R K
Solved with COMSOL Multiphysics 5.2
10 | TU N I N G F O R K
Solved with COMSOL Multiphysics 5.2
Despite its simplicity, and the fact that very few engineers would run a structural
analysis before trying to turn a bolt, the example provides an excellent overview of
structural analysis in COMSOL Multiphysics.
Model Definition
The model geometry is shown below.
The bolts fixed constraint is at the cross section shown below. A load is applied at the
box end of the combination wrench.
Applied load
Fixed constraint
Here, assume that there is perfect contact between the wrench and the bolt. A possible
extension is to apply a contact condition between the wrench and the bolt where the
friction and the contact pressure determines the position of the contact surface.
Modeling Instructions
From the File menu, choose New.
NEW
1 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>Stationary.
6 Click Done.
GEOMETRY 1
Import 1 (imp1)
1 On the Home toolbar, click Import.
2 In the Settings window for Import, locate the Import section.
3 Click Browse.
4 Browse to the applications Application Library folder and double-click the file
wrench.mphbin.
ADD MATERIAL
1 On 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 Component in the window toolbar.
5 On the Home toolbar, click Add Material to close the Add Material window.
GLOBAL DEFINITIONS
Parameters
1 On the Home toolbar, click Parameters.
2 In the Settings window for Parameters, locate the Parameters section.
Fixed Constraint 1
1 On the Physics toolbar, click Boundaries and choose Fixed Constraint.
2 Click the Wireframe Rendering button on the Graphics toolbar.
3 Select Boundary 35 only.
Boundary Load 1
1 On the Physics toolbar, click Boundaries and choose Boundary Load.
2 Select Boundary 111 only.
3 In the Settings window for Boundary Load, locate the Force section.
4 From the Load type list, choose Total force.
5 Specify the Ftot vector as
0 x
0 y
-F z
MESH 1
Because the geometry contains small edges and faces, reduce the size of the minimum
element.
Size
1 In the Model Builder window, under Component 1 (comp1)>Mesh 1 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 Minimum element size text field,
type 0.0012.
5 Click the Build All button.
The following steps are needed to set up an iterative solver. By using such solver, you
can significantly reduce the memory amount needed for the calculations. If your
computer has more than 2 GB of memory, you can skip these steps and go directly to
the last step and compute the solution.
STUDY 1
Solution 1 (sol1)
1 On the Study toolbar, click Show Default Solver.
2 In the Model Builder window, expand the Solution 1 (sol1) node.
3 In the Model Builder window, expand the Study 1>Solver Configurations>Solution 1
(sol1)>Stationary Solver 1 node.
4 Right-click Study 1>Solver Configurations>Solution 1 (sol1)>Stationary Solver 1 and
choose Iterative.
5 In the Settings window for Iterative, locate the General section.
6 From the Preconditioning list, choose Right.
Stress (solid)
1 Right-click Study 1>Solver Configurations>Solution 1 (sol1)>Stationary Solver
1>Iterative 1 and choose Multigrid.
RESULTS
Stress (solid)
The default plot group shows the von Mises stress in a Surface plot with the
displacement visualized using a Deformation subnode. Change to a more suitable unit
as follows.
1 In the Model Builder window, expand the Stress (solid) node, then click Surface 1.
2 In the Settings window for Surface, locate the Expression section.
3 From the Unit list, choose MPa.
4 On the Stress (solid) toolbar, click Plot.
5 Click the Zoom Extents button on the Graphics toolbar.
3D Plot Group 2
1 On the Home toolbar, click Add Plot Group and choose 3D Plot Group.
2 In the Model Builder window, right-click 3D Plot Group 2 and choose Surface.
3 In the Settings window for Surface, click Replace Expression in the upper-right corner
of the Expression section. From the menu, choose Component 1>Solid
Mechanics>Strain>Principal strains>solid.ep1 - First principal strain.
4 On the 3D Plot Group 2 toolbar, click Plot.
5 Right-click 3D Plot Group 2 and choose Rename.
6 In the Rename 3D Plot Group dialog box, type First Principal Strain in the New
label text field.
7 Click OK.
Notice that the maximum principal strain is lower than 2%, a result that justifies the
small strain assumption.