Models - Rf.cavity Resonators
Models - Rf.cavity Resonators
3a
Model Definition
This example considers three geometries:
a rectangular cavity of dimensions 0.9 in-by-0.9 in-by-0.4 in;
a cylindrical cavity of radius 0.48 in and height 0.4 in; and
a spherical cavity of radius 1.35 cm.
The cavity walls are assumed to be a good conductor, such as copper, with an electric
conductivity of 5.7107 S/m, and relative permeability and permittivity of unity. The
interior of the cavity is assumed to be vacuum, with zero electric conductivity, and unit
permeability and permittivity. The analytic solutions to these three cases are given in
Ref. 1.
The lossy walls of the cavity are represented via the impedance boundary condition.
This boundary condition accounts for the frequency dependent losses on the walls of
a cavity due to the non-zero electric conductivity, which makes the eigenvalue problem
nonlinear. When solving any eigenvalue problem, it is necessary to provide a frequency
around which to search for modes. In addition, when solving a nonlinear eigenvalue
problem, it is also necessary to provide a frequency at which to initially evaluate the
frequency-dependent surface losses. Although the guesses for these frequencies do not
need to be very close, solution time is less the closer they are.
It is usually possible to estimate the resonant frequency of interest, and to use this as
an initial guess. It is also possible to quickly estimate the resonant frequency by
building a second model that uses the perfect electrical conductor (PEC) boundary
condition instead of the impedance boundary condition. A model that uses only PEC
boundaries will result in a linear eigenvalue problem, and is less computationally
intensive to solve. Such a model only requires a rough guess at the frequency of the
2012 COMSOL
1 |
mode, and does not require a frequency at which to evaluate the surface losses.
Therefore, it is often convenient to also solve a version of a model without losses.
Q-FACTOR AND RESONANT FREQUENCY IN CAVITY STRUCTURES
a
c
a
2
R s 1 + -------
2b
(1)
There are two dominant modes for a cylindrical cavity. One dominant mode of the
cylindrical cavity is TE111 when the ratio between the height and radius is more than
2.03. The other dominant mode is TM010 when the ratio is less than 2.03. For this
case, the Q-factor and resonant frequency are given as
1,2025
1
2,4049 2
Q TM 010 = --------------------------, f TM 010 = ------------------ ------------------
a
a
2
R s 1 + ---
h
(2)
(3)
r
---------- and is the
2
These two analytical approaches are compared with the Q-factor obtained from
Eigenfrequency analysis.
2 |
used by the finite element method better approximate the analytic solutions, which are
described by sinusoidal functions for the rectangular cavity and Bessel functions for the
cylindrical and spherical cavities. This difference between the numerical results and the
analytic solution is discretization error, and is always reduced with mesh refinement.
TABLE 1: RESULTS FOR THE TE101 MODE OF A RECTANGULAR CAVITY
MAXIMUM
MESH SIZE
Q-FACTOR
(ANALYTIC=7770)
h_max
9.706
7039
h_max/2
9.283
7687
h_max/4
9.273
7765
h_max/8
9.273
7770
Q-FACTOR
(ANALYTIC=8065)
h_max
9.458
7891
h_max/2
9.419
8004
h_max/4
9.411
8056
h_max/8
9.411
8065
Q-FACTOR
(ANALYTIC=14594)
h_max
9.752
14121
h_max/2
9.723
14430
h_max/4
9.701
14616
h_max/8
9.697
14641
Note that convergence with respect to the mesh is fastest for the rectangular cavity and
slowest for the spherical cavity. This is because the isoparametric finite-element mesh
represents curved surfaces approximately, via second order polynomials by default.
This introduces some small geometric discretization error that is always reduced with
mesh refinement. Although it is possible to use different element orders, the default
second-order curl element (also known as a vector or Nedelec element) is the best
compromise between accuracy and memory requirements. Because memory
requirements for three-dimensional models increase exponentially with increasing
element order, and increasing number of elements, there is strong motivation to use
as coarse a mesh as reasonable. Figure 1 shows the fields within the cavities, as well as
the surface currents and surface losses.
2012 COMSOL
3 |
Figure 1: Arrow plots of electric and magnetic fields. Slice plot of electric field.
4 |
2012 COMSOL
5 |
Reference
1. C.A. Balanis, Advanced Engineering Electromagnetics, Wiley, 1989.
Modeling Instructions
MODEL WIZARD
Parameters
1 In the Model Builder window, right-click Global Definitions and choose Parameters.
2 In the Parameters settings window, locate the Parameters section.
3 Click Load from File.
6 |
4 Browse to the models Model Library folder and double-click the file
cavity_resonators_parameters.txt.
Block 1
1 In the Model Builder window, under Model 1 right-click Geometry 1 and choose Block.
2 In the Block settings window, locate the Size and Shape section.
3 In the Width edit field, type a_r.
4 In the Depth edit field, type a_r.
5 In the Height edit field, type b_r.
6 Click the Build All button.
2012 COMSOL
7 |
Now set up the physics. Override the default perfect electric conductor condition on
the exterior boundaries by an impedance condition.
section.
3 From the Selection list, choose All boundaries.
MATERIALS
Assign material properties on the model. First, set all domains with vacuum.
Material 1
1 In the Model Builder window, under Model 1 right-click Materials and choose Material.
2 In the Material settings window, locate the Material Contents section.
3 In the table, enter the following settings:
Property
Name
Value
Relative permittivity
epsilonr
Relative permeability
mur
Electrical conductivity
sigma
Material 2
1 Right-click Materials and choose Material.
2 In the Material settings window, locate the Geometric Entity Selection section.
3 From the Geometric entity level list, choose Boundary.
4 From the Selection list, choose All boundaries.
8 |
5 Locate the Material Contents section. In the table, enter the following settings:
Property
Name
Value
Relative permittivity
epsilonr
Electrical conductivity
sigma
sigma_wall
Relative permeability
mur
field.
8 Click OK.
DEFINITIONS
Add variables for Q-factor calculation and visualization. For this Q-factor
calculation, add two integration coupling operators: one for volume and the other for
surface integration.
Integration 1
1 In the Model Builder window, under Model 1 right-click Definitions and choose Model
Couplings>Integration.
2 In the Integration settings window, locate the Operator Name section.
3 In the Operator name edit field, type int_v.
4 Locate the Source Selection section. From the Selection list, choose All domains.
Integration 2
1 In the Model Builder window, right-click Definitions and choose Model
Couplings>Integration.
2 In the Integration settings window, locate the Operator Name section.
3 In the Operator name edit field, type int_s.
4 Locate the Source Selection section. From the Geometric entity level list, choose
Boundary.
5 From the Selection list, choose All boundaries.
Variables 1
1 Right-click Definitions and choose Variables.
2 In the Variables settings window, locate the Variables section.
3 Click Load from File.
2012 COMSOL
9 |
4 Browse to the models Model Library folder and double-click the file
cavity_resonators_model1_variables.txt.
The emw. prefix is for the physics interface, Electromagnetic Waves, Frequency Domain
in the first model. Wav and Qsh are Energy density time average and Surface losses,
respectively.
MESH 1
The maximum mesh size is one dimension of the cavity scaled inversely by d_f,
discretization factor defined in Parameters. The discretization factor is also used as a
parametric sweep variable to see the effect of the mesh refinement.
1 In the Model Builder window, under Model 1 right-click Mesh 1 and choose Free
Tetrahedral.
Size
1 In the Model Builder window, under Model 1>Mesh 1 click Size.
2 In the Size settings window, locate the Element Size section.
3 Click the Custom button.
4 Locate the Element Size Parameters section. In the Maximum element size edit field,
type h_max_r/d_f.
5 In the Maximum element growth rate edit field, type 2.
6 In the Resolution of curvature edit field, type 1.
7 In the Resolution of narrow regions edit field, type 0.1.
8 Click the Build All button.
STUDY 1
Provide the number of modes and a frequency around which to search for modes.
Step 1: Eigenfrequency
1 In the Model Builder window, expand the Study 1 node, then click Step 1:
Eigenfrequency.
2 In the Eigenfrequency settings window, locate the Study Settings section.
3 In the Desired number of eigenfrequencies edit field, type 1.
4 In the Search for eigenfrequencies around edit field, type 9e9.
For the nonlinear eigenvalue problem, it is necessary to specify the linearization point
for convergence.
10 |
Solver 1
1 In the Model Builder window, right-click Study 1 and choose Show Default Solver.
2 In the Model Builder window, under Study 1>Solver Configurations>Solver 1 click
Eigenvalue Solver 1.
3 In the Eigenvalue Solver settings window, locate the Values of Linearization Point
section.
4 Find the Value of eigenvalue linearization point subsection. In the Point edit field, type
9e9.
Parametric Sweep
1 In the Model Builder window, right-click Study 1 and choose Parametric Sweep.
2 In the Parametric Sweep settings window, locate the Study Settings section.
3 Click Add.
4 In the table, enter the following settings:
Parameter names
d_f
1 2 4 8
Electric field
The default plot shows the distribution of the norm of the electric field. Add arrow
plots of the electric and magnetic fields.
1 In the Model Builder window, under Results right-click Electric field and choose Arrow
Volume.
2 In the Arrow Volume settings window, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Electromagnetic Waves,
Frequency Domain>Electric>Electric field (emw.Ex,emw.Ey,emw.Ez).
3 Click the Plot button.
4 In the Model Builder window, right-click Electric field and choose Arrow Volume.
5 In the Arrow Volume settings window, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Electromagnetic Waves,
Frequency Domain>Magnetic>Magnetic field (emw.Hx,emw.Hy,emw.Hz).
2012 COMSOL
11 |
6 Locate the Arrow Positioning section. Find the z grid points subsection. In the Points
3D Plot Group 2
1 In the Model Builder window, right-click Results and choose 3D Plot Group.
2 Right-click 3D Plot Group 2 and choose Surface.
3 In the Surface settings window, click Replace Expression in the upper-right corner of
the Expression section. From the menu, choose Electromagnetic Waves, Frequency
Domain>Heating and losses>Surface resistive losses (emw.Qsrh).
4 Locate the Coloring and Style section. From the Color table list, choose
ThermalEquidistant.
5 In the Model Builder window, right-click 3D Plot Group 2 and choose Arrow Surface.
6 In the Arrow Surface settings window, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Electromagnetic Waves,
Frequency Domain>Currents and charge>Surface current density (emw.Jsx,...,emw.Jsz).
7 Locate the Coloring and Style section. From the Color list, choose Blue.
8 Click the Plot button.
9 Right-click 3D Plot Group 2 and choose Rename.
10 Go to the Rename 3D Plot Group dialog box and type Surface Losses (emw) in
12 |
Cylinder 1
1 In the Model Builder window, under Model 2 right-click Geometry 2 and choose
Cylinder.
2 In the Cylinder settings window, locate the Size and Shape section.
3 In the Radius edit field, type a_c.
4 In the Height edit field, type height_c.
5 Click the Build All button.
Set up the second physics interface. The steps are same as for the first model.
2012 COMSOL
13 |
2 In the Impedance Boundary Condition settings window, locate the Boundary Selection
section.
3 From the Selection list, choose All boundaries.
MATERIALS
Assign material properties on the second model. Set all domains with vacuum.
Material 3
1 In the Model Builder window, under Model 2 right-click Materials and choose Material.
2 In the Material settings window, locate the Material Contents section.
3 In the table, enter the following settings:
Property
Name
Value
Relative permittivity
epsilonr
Relative permeability
mur
Electrical conductivity
sigma
Material 4
1 Right-click Materials and choose Material.
2 In the Material settings window, locate the Geometric Entity Selection section.
3 From the Geometric entity level list, choose Boundary.
4 From the Selection list, choose All boundaries.
5 Locate the Material Contents section. In the table, enter the following settings:
Property
Name
Value
Relative permittivity
epsilonr
Electrical conductivity
sigma
sigma_wall
Relative permeability
mur
field.
14 |
8 Click OK.
Add variables and two integration coupling operators. The purpose of these are same
as what you have done for the first model.
DEFINITIONS
Integration 3
1 In the Model Builder window, under Model 2 right-click Definitions and choose Model
Couplings>Integration.
2 In the Integration settings window, locate the Operator Name section.
3 In the Operator name edit field, type int_v.
4 Locate the Source Selection section. From the Selection list, choose All domains.
Integration 4
1 In the Model Builder window, right-click Definitions and choose Model
Couplings>Integration.
2 In the Integration settings window, locate the Operator Name section.
3 In the Operator name edit field, type int_s.
4 Locate the Source Selection section. From the Geometric entity level list, choose
Boundary.
5 From the Selection list, choose All boundaries.
Variables 2a
1 Right-click Definitions and choose Variables.
2 In the Variables settings window, locate the Variables section.
3 Click Load from File.
4 Browse to the models Model Library folder and double-click the file
cavity_resonators_model2_variables.txt.
The emw2. prefix refers to the Electromagnetic Waves, Frequency Domain interface for
the second model.
MESH 2
Apply the same logic in the mesh set up as you have done in the first model.
1 In the Model Builder window, under Model 2 right-click Mesh 2 and choose Free
Tetrahedral.
2012 COMSOL
15 |
Size
1 In the Model Builder window, under Model 2>Mesh 2 click Size.
2 In the Size settings window, locate the Element Size section.
3 Click the Custom button.
4 Locate the Element Size Parameters section. In the Maximum element size edit field,
type h_max_c/d_f.
5 In the Maximum element growth rate edit field, type 2.
6 In the Resolution of curvature edit field, type 1.
7 In the Resolution of narrow regions edit field, type 0.1.
8 Click the Build All button.
STUDY 2
1 Select both Study 1> Step 1: Eigenfrequency 1 and Study 1> Parametric Sweep 1 using
Step 1: Eigenfrequency 1
1 In the Model Builder window, expand the Study 2 node, then click Step 1:
Eigenfrequency 1.
2 In the Eigenfrequency settings window, locate the Physics and Variables Selection
section.
3 In the table, enter the following settings:
Physics
Solve for
Solver 7
1 In the Model Builder window, right-click Study 2 and choose Show Default Solver.
2 In the Model Builder window, under Study 2>Solver Configurations>Solver 7 click
Eigenvalue Solver 1.
3 In the Eigenvalue Solver settings window, locate the Values of Linearization Point
section.
4 Find the Value of eigenvalue linearization point subsection. In the Point edit field, type
9e9.
16 |
RESULTS
Electric field 1
1 In the Model Builder window, under Results right-click Electric field 1 and choose
Arrow Volume.
2 In the Arrow Volume settings window, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Electromagnetic Waves,
Frequency Domain 2>Electric>Electric field (emw2.Ex,emw2.Ey,emw2.Ez).
3 Click the Plot button.
4 In the Model Builder window, right-click Electric field 1 and choose Arrow Volume.
5 In the Arrow Volume settings window, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Electromagnetic Waves,
Frequency Domain 2>Magnetic>Magnetic field (emw2.Hx,emw2.Hy,emw2.Hz).
6 Locate the Arrow Positioning section. Find the z grid points subsection. In the Points
3D Plot Group 4
1 In the Model Builder window, right-click Results and choose 3D Plot Group.
2 In the 3D Plot Group settings window, locate the Data section.
3 From the Data set list, choose Solution 6.
4 Right-click Results>3D Plot Group 4 and choose Surface.
5 In the Surface settings window, click Replace Expression in the upper-right corner of
the Expression section. From the menu, choose Electromagnetic Waves, Frequency
Domain 2>Heating and losses>Surface losses (emw2.Qsh).
6 Locate the Coloring and Style section. From the Color table list, choose
ThermalEquidistant.
7 In the Model Builder window, right-click 3D Plot Group 4 and choose Arrow Surface.
8 In the Arrow Surface settings window, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Electromagnetic Waves,
2012 COMSOL
17 |
ROOT
18 |
GEOMETRY 3
Sphere 1
1 In the Model Builder window, under Model 3 right-click Geometry 3 and choose
Sphere.
2 In the Sphere settings window, locate the Size and Shape section.
3 In the Radius edit field, type a_s.
4 Click the Build All button.
section.
3 From the Selection list, choose All boundaries.
MATERIALS
Assign material properties on the model. Set all domains with vacuum.
2012 COMSOL
19 |
Material 5
1 In the Model Builder window, under Model 3 right-click Materials and choose Material.
2 In the Material settings window, locate the Material Contents section.
3 In the table, enter the following settings:
Property
Name
Value
Relative permittivity
epsilonr
Relative permeability
mur
Electrical conductivity
sigma
Material 6
1 Right-click Materials and choose Material.
2 In the Material settings window, locate the Geometric Entity Selection section.
3 From the Geometric entity level list, choose Boundary.
4 From the Selection list, choose All boundaries.
5 Locate the Material Contents section. In the table, enter the following settings:
Property
Name
Value
Relative permittivity
epsilonr
Electrical conductivity
sigma
sigma_wall
Relative permeability
mur
field.
8 Click OK.
DEFINITIONS
20 |
Integration 5
1 In the Model Builder window, under Model 3 right-click Definitions and choose Model
Couplings>Integration.
2 In the Integration settings window, locate the Operator Name section.
3 In the Operator name edit field, type int_v.
4 Locate the Source Selection section. From the Selection list, choose All domains.
Integration 6
1 In the Model Builder window, right-click Definitions and choose Model
Couplings>Integration.
2 In the Integration settings window, locate the Operator Name section.
3 In the Operator name edit field, type int_s.
4 Locate the Source Selection section. From the Geometric entity level list, choose
Boundary.
5 From the Selection list, choose All boundaries.
Variables 3a
1 Right-click Definitions and choose Variables.
2 In the Variables settings window, locate the Variables section.
3 Click Load from File.
4 Browse to the models Model Library folder and double-click the file
cavity_resonators_model3_variables.txt.
The emw3. prefix in the imported table is for the physics interface, Electromagnetic
Waves, Frequency Domain, in the third model.
MESH 3
In the Model Builder window, under Model 3 right-click Mesh 3 and choose Free
Tetrahedral.
Size
1 In the Model Builder window, under Model 3>Mesh 3 click Size.
2 In the Size settings window, locate the Element Size section.
3 Click the Custom button.
4 Locate the Element Size Parameters section. In the Maximum element size edit field,
type h_max_s/d_f.
5 In the Maximum element growth rate edit field, type 2.
2012 COMSOL
21 |
1 Select both Study 2> Step 1: Eigenfrequency 1, Study 2>Parametric Sweep 1 using
Step 1: Eigenfrequency 1
1 In the Model Builder window, under Study 3 click Step 1: Eigenfrequency 1.
2 In the Eigenfrequency settings window, locate the Physics and Variables Selection
section.
3 In the table, enter the following settings:
Physics
Solve for
Solver 13
1 In the Model Builder window, right-click Study 3 and choose Show Default Solver.
2 In the Model Builder window, expand the Study 3>Solver Configurations>Solver 13
section.
4 Find the Value of eigenvalue linearization point subsection. In the Point edit field, type
9e9.
Electric field 2
1 In the Model Builder window, under Results right-click Electric field 2 and choose
Arrow Volume.
2 In the Arrow Volume settings window, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Electromagnetic Waves,
Frequency Domain 3>Electric>Electric field (emw3.Ex,emw3.Ey,emw3.Ez).
22 |
3 In the Model Builder window, right-click Electric field 2 and choose Arrow Volume.
4 In the Arrow Volume settings window, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Electromagnetic Waves,
Frequency Domain 3>Magnetic>Magnetic field (emw3.Hx,emw3.Hy,emw3.Hz).
5 Locate the Arrow Positioning section. Find the z grid points subsection. In the Points
3D Plot Group 6
1 In the Model Builder window, right-click Results and choose 3D Plot Group.
2 In the 3D Plot Group settings window, locate the Data section.
3 From the Data set list, choose Solution 12.
4 Right-click Results>3D Plot Group 6 and choose Surface.
5 In the Surface settings window, click Replace Expression in the upper-right corner of
the Expression section. From the menu, choose Electromagnetic Waves, Frequency
Domain 3>Heating and losses>Surface losses (emw3.Qsh).
6 Locate the Coloring and Style section. From the Color table list, choose
ThermalEquidistant.
7 In the Model Builder window, right-click 3D Plot Group 6 and choose Arrow Surface.
8 In the Arrow Surface settings window, click Replace Expression in the upper-right
corner of the Expression section. From the menu, choose Electromagnetic Waves,
Frequency Domain 3>Currents and charge>Surface current density
(emw3.Jsx,...,emw3.Jsz).
9 Locate the Coloring and Style section. From the Color list, choose Blue.
10 Right-click 3D Plot Group 6 and choose Rename.
11 Go to the Rename 3D Plot Group dialog box and type Surface Losses (emw3) in
2012 COMSOL
23 |
12 Click OK.
Derived Values
Finish by evaluating the Q-factor and resonant frequency. Compare them with those
values in Table 1, Table 2 and Table 3.
1 In the Model Builder window, under Results right-click Derived Values and choose
Global Evaluation.
2 In the Global Evaluation settings window, locate the Data section.
3 From the Data set list, choose Solution 2.
4 From the Eigenfrequency selection list, choose First.
5 From the Table columns list, choose Inner solutions.
6 Click Replace Expression in the upper-right corner of the Expression section. From
24 |
2012 COMSOL
25 |
26 |