Introduction To COMSOL Multi Physics
Introduction To COMSOL Multi Physics
COMSOL Multiphysics
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:
Support Center: www.comsol.com/support
Product Download: www.comsol.com/product-download
Product Updates: www.comsol.com/support/updates
Discussion Forum: www.comsol.com/community
Events: www.comsol.com/events
COMSOL Video Gallery: www.comsol.com/video
Support Knowledge Base: www.comsol.com/support/knowledgebase
Part number: CM010004
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
COMSOL Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Example 1: Structural Analysis of a Wrench. . . . . . . . . . . . . . . 29
Example 2: The BusbarA Multiphysics Model . . . . . . . . . . . 51
Advanced Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Parameters, Functions, Variables and Couplings. . . . . . . . . . 78
Material Properties and Material Libraries. . . . . . . . . . . . . . . 82
Adding Meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Adding Physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Parametric Sweeps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Parallel Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Appendix ABuilding a Geometry. . . . . . . . . . . . . . . . . . . . . 120
Appendix BKeyboard and Mouse Shortcuts . . . . . . . . . . . 135
Appendix CLanguage Elements and Reserved Names. . . 139
Appendix DFile Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Appendix EConnecting with LiveLink Add-Ons . . . . . . 158
Contents
|3
4 | Contents
Introduction
Read this book if you are new to COMSOL Multiphysics. It provides a quick
overview of the COMSOL environment with examples that show you how to use
the COMSOL Desktop user interface and the Model Builder.
If you have not yet installed the software, install it now according to the
instructions at:
www.comsol.com/product-download.
In addition to this book, an extensive documentation set is available after
installation. A video gallery with tutorials can be found at:
www.comsol.com/video.
For information on how to use the Application Builder, see Introduction to
Application Builder.
|5
COMSOL Desktop
APPLICATION BUILDER
Click this button to switch to
the Application Builder and
start building an application
based on your model.
MODEL BUILDER
TOOLBAR
MODEL BUILDER
WINDOWThe Model
Builder window with its model
tree and the associated
toolbar buttons gives you an
overview of the model. The
modeling process can be
controlled from
context-sensitive menus
accessed by right-clicking a
node.
6|
SETTINGS WINDOWClick
any node in the model tree to
see its associated Settings
window displayed next to the
Model Builder.
|7
The screenshot on the previous pages is what you will see when you first start
modeling in COMSOL Multiphysics. COMSOL Desktop provides a complete
and integrated environment for physics modeling and simulation as well as
application design, providing you with the tools necessary to build a user-friendly
interface for your models. You can customize the desktop to your own needs. The
windows can be resized, moved, docked, and detached. Any changes you make to
the layout will be saved when you close the session and available again the next
time you open COMSOL Multiphysics. As you build your model, additional
windows and widgets will be added. (See page 25 for an example of a more
developed desktop.) Among the available windows and user interface components
are the following:
Quick Access Toolbar
The Quick Access Toolbar gives access to functionality such as Open, Save, Undo,
Redo, Copy, Paste, and Delete. You can customize its content from the
Customize Quick Access Toolbar list.
Ribbon
The ribbon at the top of the desktop gives access to commands used to complete
most modeling tasks. The ribbon is only available in the Windows version of the
COMSOL Desktop environment and is replaced by menus and toolbars in the
OS X and Linux versions. Click the Application Builder button to switch from
the Model Builder to the Application Builder and start building an application
based on your model.
Settings Window
This is the main window for entering all of the specifications of the model
including the dimensions of the geometry, properties of the materials, boundary
conditions and initial conditions, and any other information that the solver will
8|
need to carry out the simulation. The picture below shows the Settings window
for the Geometry node.
Plot Windows
These are the windows for graphical output. In addition to the Graphics window,
Plot windows are used for visualizing results. Several Plot windows can be used to
show multiple results simultaneously. A special case is the Convergence Plot
window, an automatically generated Plot window that displays a graphical
indication of the convergence of the solution process while a model is running.
Information Windows
These are the windows for non-graphical information. They include:
Messages: Various information about the current COMSOL session is
|9
Other Windows
Add Material and the Material Browser: Access the material property
10 |
Prefe re n c es
Preferences are settings that affect the modeling environment. Most are persistent
between modeling sessions, but some are saved with the model. You access
Preferences from the File menu.
In the Preferences window, you can change settings such as graphics rendering,
number of displayed digits for results, maximum number of CPU cores used for
computations, or paths to user-defined application libraries. Take a moment to
browse your current settings to familiarize yourself with the different options.
There are three graphics rendering options available: OpenGL, DirectX, and
Software Rendering. DirectX is not available in OS X or Linux, but is available
in Windows if you choose to install the DirectX runtime libraries during
installation. If your computer does not have a dedicated graphics card, you may
have to switch to Software Rendering for slower but fully functional graphics. A
list of recommended graphics cards can be found at:
www.comsol.com/system-requirements
| 11
C REATING
M ODEL G UIDED
BY THE
M ODEL W IZARD
The Model Wizard will guide you in setting up the space dimension, physics, and
study type in a few steps:
1 Start by selecting the space dimension for your model component: 3D, 2D
Axisymmetric, 2D, 1D Axisymmetric, or 0D.
2 Now, add one or more physics interfaces. These are organized in a number of
Physics branches in order to make them easy to locate. These branches do not
directly correspond to products. When products are added to your COMSOL
12 |
3 Select the Study type that represents the solver or set of solvers that will be used
for the computation.
Finally, click Done. The desktop is now displayed with the model tree
configured according to the choices you made in the Model Wizard.
| 13
C REATING
B LANK M ODEL
The Blank Model option will open the COMSOL Desktop interface without any
Component or Study. You can right-click the model tree to add a Component of
a certain space dimension, a physics interface, or a Study.
The Home tab contains buttons for the most common operations for making
changes to a model, running simulations, and for building and testing
applications. Examples include changing model parameters for a parameterized
geometry, reviewing material properties and physics, building the mesh, running
a study, and visualizing the simulation results.
There are standard tabs for each of the main steps in the modeling process. These
are ordered from left to right according to the workflow: Definitions, Geometry,
Materials, Physics, Mesh, Study, and Results.
Contextual tabs are shown only if and when they are needed, such as the 3D Plot
Group tab, which is shown when the corresponding plot group is added or when
the node is selected in the model tree.
Modal tabs are used for very specific operations, when other operations in the
ribbon may become temporarily irrelevant. An example is the Work Plane modal
tab. When working with Work Planes, other tabs are not shown since they do not
present relevant operations.
T HE R IBBON
VS .
T HE M ODEL B UILDER
The ribbon gives quick access to available commands and complements the model
tree in the Model Builder window. Most of the functionality accessed from the
14 |
OS X
AND
L INUX
The instructions in this book are based on the Windows version of the COMSOL
Desktop environment. However, running COMSOL in OS X and Linux is very
similar, keeping in mind that ribbon user interface components can instead be
found in the corresponding menus and toolbars.
T h e M o d e l B u i l d e r a n d t h e M o d e l Tre e
The Model Builder is the tool where you define the model and its components:
how to solve it, the analysis of results, and the reports. You do that by building a
model tree.
You build a model by starting with the default model tree, adding nodes, and
editing the node settings.
All of the nodes in the default model tree are top-level parent nodes. You can
right-click on them to see a list of child nodes, or subnodes, that you can add
beneath them. This is the means by which nodes are added to the tree.
When you click on a child node, then you will see its node settings in the Settings
window. It is here that you can edit node settings.
| 15
It is worth noting that if you have the Help window open (which is achieved either
by selecting Help from the File menu, or by pressing the function key F1), then
you will also get dynamic help (in English only) when you click on a node.
AND
R ESULTS N ODES
To these five default subnodes, you may also add more Plot Group subnodes that
define graphs to be displayed in the Graphics window or in Plot windows. Some
16 |
T HE C OMPONENT
AND
S TUDY N ODES
Keyboard Shortcuts
To be more specific, suppose that you build a model that simulates a coil assembly
that is made up of two parts, a coil and a coil housing. You can create two
Component nodes, one that models the coil and the other the coil housing. You
can then rename each of the nodes with the name of the object. Similarly, you can
also create two Study nodes, the first simulating the stationary or steady-state
behavior of the assembly, and the second simulating the frequency response. You
can rename these two nodes to be Stationary and Frequency Domain. When the
| 17
model is complete, save it to a file named Coil Assembly.mph. At that point, the
model tree in the Model Builder looks like the figure below.
In this figure, the root node is named Coil
Assembly.mph, indicating the file in which the
model is saved. The Global Definitions node
and the Results node each have their default
name. Additionally, there are two Component
nodes and two Study nodes with the names
chosen in the previous paragraph.
P ARAMETERS , VARIABLES ,
AND
S COPE
Parameters
Parameters are user-defined constant scalars that are usable throughout the model.
That is to say, they are global in nature. Important uses are:
Parameterizing geometric dimensions.
Specifying mesh element sizes.
Defining parametric sweeps (that is, simulations that are repeated for a
18 |
Variables
Variables can be defined either in the Global Definitions node or in the Definitions
subnode of any Component node. Naturally, the choice of where to define the
variable depends on whether you want it to be global (that is, usable throughout
the model tree) or locally defined within a single Component node. Like a
Parameter Expression, a Variable Expression may contain numbers, parameters,
built-in constants, and unary and binary operators. However, it may also contain
Variables like t, x, y, or z; functions with Variable Expressions as arguments; and
dependent variables that you are solving for in addition to their space and time
derivatives.
Scope
The scope of a Parameter or Variable is a statement about where it may be used
in an expression. All Parameters are defined in the Global Definitions node of the
model tree. This means that they are global in scope and can be used throughout
the model tree.
| 19
A Variable may also be defined in the Global Definitions node and have global
scope, but they are subject to other limitations. For example, Variables may not
be used in Geometry, Mesh, or Study nodes (with the one exception that a
Variable may be used in an expression that determines when the simulation should
stop).
A Variable that is defined, instead, in the Definitions subnode of a Component
node has local scope and is intended for use in that particular Component (but,
again, not in Geometry or Mesh nodes). They may be used, for example, to specify
material properties in the Materials subnode of a Component or to specify
boundary conditions or interactions. It is sometimes valuable to limit the scope of
the variable to only a certain part of the geometry, such as certain boundaries. For
that purpose, provisions are available in the settings for a Variable to select
whether to apply the definition either to the entire geometry of the Component,
or only to certain Domains, Boundaries, Edges, or Points.
The picture below shows the definition of two Variables, q_pin and R, for which
the scope is limited to just two boundaries identified by numbers 15 and 19.
20 |
Such Selections can be named and then referenced elsewhere in a model, such as
when defining material properties or boundary conditions that will use the
Variable. To give a name to the Selection, click the Create Selection button ( )
to the right of the Selection list.
Although Variables defined in the Definitions subnode of a Component node are
intended to have local scope, they can still be accessed outside of the Component
node in the model tree by being sufficiently specific about their identity. This is
done by using a dot-notation where the Variable name is preceded by the name
of the Component node in which it is defined and they are joined by a dot. In
other words, if a Variable named foo is defined in a Component node named
MyModel, then this variable may be accessed outside of the Component node by
using MyModel.foo. This can be useful, for example, when you want to use the
variable to make plots in the Results node. Variables defined under the
Declarations node in the Application Builder are available globally in form objects
and methods but cannot be used in the Model Builder.
B u i l t - I n C o n s t a n t s , Var i a bl e s , a n d F u n c t i o n s
COMSOL Multiphysics comes with many built-in constants, variables, and
functions. They have reserved names that cannot be redefined by the user. If you
use a reserved name for a user-defined variable, parameter, or function, the text
you enter will turn orange (a warning) or red (an error) and you will get a tooltip
message if you select the text string.
Some important examples are:
Mathematical constants such as pi (3.14...) or the imaginary unit i or j
Physical constants such as g_const (acceleration of gravity), c_const (speed
of light), or R_const (universal gas constant)
The time variable, t
First-and-second-order derivatives of the Dependent variables (the solution)
whose names are derived from the spatial coordinate names and Dependent
variable names (which are user-defined variables)
Mathematical functions such as cos, sin, exp, log, log10, and sqrt
See Appendix CLanguage Elements and Reserved Names on page 139 for
more information.
| 21
B u i l d i n g a n d D e s i g n i n g S i mu l a t i o n A p p l i c a t i o n s
To create an application based on your model, use
the Application Builder, accessible from the Home
tab in the ribbon. For more information on
creating a COMSOL application, refer to the
Introduction to Application Builder.
22 |
The MPH files in the COMSOL Application Library can have two formatsFull
MPH files or Compact MPH files:
Full MPH files, including all meshes and solutions. In the Application
and solution data to save space on the DVD (a few MPH files have no
solutions for other reasons). You can open these to study the settings and to
mesh and re-solve the applications. It is also possible to download the full
versionswith meshes and solutionsof most of these when you update
your Application Library. These appear in the Application Libraries window
with the
icon and for runnable applications, this icon
. If you position
| 23
24 |
RIBBON
QUICK ACCESS
TOOLBAR
MODEL BUILDER
WINDOW
MODEL TREE
SETTINGS WINDOW
| 25
GRAPHICS WINDOW
INFORMATION WINDOWS
26 |
Wor k f l ow a n d S e q u e n c e o f O p e r a t i o n s
In the Model Builder window, every step of the modeling process, from defining
global variables to the final report of results, is displayed in the model tree.
From top to bottom, the model tree defines an orderly sequence of operations.
In the following branches of the model tree, the node order makes a difference
and you can change the sequence of operations by moving the subnodes up or
down the model tree:
Geometry
Materials
Physics
| 27
Mesh
Study
Plot Groups
In the Component Definitions branch of the tree, the ordering of the following
node types also makes a difference:
Perfectly Matched Layer
Infinite Elements
In other branches, the ordering of nodes is not significant with respect to the
sequence of operations, but some nodes can be reordered for readability. Child
nodes to Global Definitions is one such example.
You can view the sequence of operations presented as program code statements by
saving the model as a model file for MATLAB or as a model file for Java after
having selected Compact History in the File menu. Note that the model history
keeps a complete record of the changes you make to a model as you build it. As
such, it includes all of your corrections including changes to parameters and
boundary conditions and modifications of solver methods. Compacting this
history removes all of the overridden changes and leaves a clean copy of the most
recent form of the model steps.
As you work with the COMSOL Desktop interface and the Model Builder, you
will grow to appreciate the organized and streamlined approach. But any
description of a user interface is inadequate until you try it for yourself. So, in the
next chapters, you are invited to work through two examples to familiarize
yourself with the software.
28 |
| 29
M o d e l W i z a rd
1 To start the software, double-click the COMSOL icon on
the desktop, which will take you to the New window with
two options for creating a new model: Model Wizard or
Blank Model.
If you select Blank Model, you can right-click the root
node in the model tree to manually add a Component and
a Study. For this tutorial, click the Model Wizard button.
If COMSOL is already open, you can start the Model
Wizard by selecting New from the File menu. Choose the
Model Wizard.
The Model Wizard will guide you through the first steps of
setting up a model. The next window lets you select the
dimension of the modeling space.
2 In the Select Space Dimension window, select 3D.
30 |
to continue.
4 Click Stationary
under Preset
Studies. Click Done
once you have
finished.
Preset Studies have solver and equation
settings adapted to the selected physics;
in this example, Solid Mechanics. A
Stationary study is used in this case
there are no time-varying loads or
material properties.
Any selection from the Custom Studies
branch
requires manual settings.
Geo metr y
This tutorial uses a geometry that was previously created and stored in the
COMSOL native CAD format,.mphbin. To learn how to build your own
geometry, see Appendix ABuilding a Geometry on page 120.
File Locations
The location of the application library that contains the file used in this exercise
varies based on the software installation and operating system. In Windows, the
file path will be similar to:
C:\Program Files\COMSOL\COMSOL51\Multiphysics\applications.
| 31
from the
2 In the Settings window for Import, from the Geometry import list, select
COMSOL Multiphysics file.
3 Click Browse and locate the file wrench.mphbin in the application library
folder of the COMSOL installation folder. Its default location in Windows is
C:\Program
Files\COMSOL\COMSOL51\Multiphysics\applications\COMSOL_Multiphysics\
Structural_Mechanics\wrench.mphbin
32 |
5 Click the wrench geometry in the Graphics window and then experiment with
moving it around. As you point to or click the geometry, it changes color. Click
the Zoom In , Zoom Out , Go to Default 3D View , Zoom Extents ,
and Transparency
buttons on the Graphics window toolbar to see what
happens to the geometry:
- To rotate, click and drag anywhere in the Graphics window.
- To move, right-click and drag.
- To zoom in and out, click the mouse scroll wheel, continue holding it, and
drag.
- To get back to the original position, click the Go to Default 3D View
| 33
Mate rials
The Materials node stores the material properties for all physics and all domains
in a Component node. Use the same generic steel material for both the bolt and
tool. Here is how to choose it in COMSOL.
1 Open the Add Materials window.
You can open the Add Materials
window in either of these two ways:
- Right-click Component 1>Materials
34 |
Global Definitions
You will now define a global parameter specifying the load applied to the wrench.
Parameters
1 In the Model Builder, right-click Global Definitions
Parameters .
and choose
If you have a Parameters table with more than one entry, you can sort the
table with respect to a particular column by clicking on the corresponding
header.
The sections Global Definitions on page 55 and Parameters, Functions,
Variables and Couplings on page 78 show you more about working with
parameters.
| 35
36 |
D o m a i n P hy s i c s a n d B o u n d a r y C o n d i t i o n s
With the geometry and materials defined, you are now ready to set the boundary
conditions.
1 In the Model Builder, right-click
Solid Mechanics (solid)
and
select Fixed Constraint .
This boundary condition
constrains the displacement of each
point on a boundary surface to be
zero in all directions.
You can also use the ribbon and
select, from the Physics tab,
Boundaries > Fixed Constraint.
| 37
38 |
Me sh
The mesh settings determine the resolution of the finite element mesh used to
discretize the model. The finite element method divides the model into small
elements of geometrically simple shapes, in this case tetrahedrons. In each
tetrahedron, a set of polynomial functions is used to approximate the structural
displacement fieldhow much the object deforms in each of the three coordinate
directions.
In this example, because the geometry contains small edges and faces, you will
define a slightly finer mesh than the default setting suggests. This will better
resolve the variations of the stress field and give a more accurate result. Refining
the mesh size to improve computational accuracy always involves some sacrifice in
speed and typically requires increased memory usage.
1 In the Model Builder, under Component 1 click Mesh 1 . In the Settings
window for Mesh, under Mesh Settings, select Fine from the Element size list.
| 39
3 After a few seconds the mesh is displayed in the Graphics window. Rotate the
wrench to take a look at the element size distribution.
Study
In the beginning of setting up the model you selected a Stationary study, which
implies that COMSOL will use a stationary solver. For this to be applicable, the
assumption is that the load, deformation, and stress do not vary in time. The
default solver settings will be good for this simulation if your computer has more
than 2 GB of in-core memory (RAM). If you should run out of memory, the
instructions below show solver settings that make the solver run a bit slower but
use up less memory. To start the solver:
1 Right-click Study 1
and select
Compute
(or press F8).
40 |
node and
| 41
the Graphics window. You can find other useful information about the
computation in the Messages and Log windows; click the Messages and Log tabs
under the Graphics window to see the kind of information available to you. The
Messages window can also be opened from the Windows drop-down list in the
Home tab of the ribbon.
42 |
| 43
For a typical steel used for tools like a wrench, the yield stress is about 600 MPa,
which means that we are getting close to plastic deformation for our 150 N load
(which corresponds to about 34 pounds force). You may also be interested in a
safety margin of, say, a factor of three. To quickly assess which parts of the wrench
are at risk of plastic deformation, you can plot an inequality expression such as
solid.mises>200[MPa].
1 Right-click the Results node
.
.
5 In the Model Builder, click 3D Plot Group 2. Press F2 and in the Rename 3D
Plot Group dialog box, enter Safety Margin. Click OK.
The resulting plot shows that the stress in the bolt is high, but the focus of this
exercise is on the wrench. If you wished to comfortably certify the wrench for a
44 |
150 N load with a factor-of-three safety margin, you would need to change the
handle design somewhat, such as making it wider.
You may have noticed that the manufacturer, for various reasons, has chosen an
asymmetric design for the wrench. Because of that, the stress field may be
different if the wrench is flipped around. Try now, on your own, to apply the
same force in the other direction and visualize the maximum von Mises stress to
see if there is any difference.
E VALUATING
THE
M AXIMUM
VON
M ISES S TRESS
1 To study the maximum von Mises stress in the wrench, in the Results section of
the model tree, right-click the Derived Values
node and select
Maximum>Volume Maximum .
| 45
2 In the Settings window for Volume Maximum, under Selection, choose Manual
and select the wrench, domain 1, by clicking on the wrench in the Graphics
window. We will only consider values in the wrench domain and neglect those
in the bolt.
3 In the Expression text field enter the function ppr(solid.mises). The
function ppr() corresponds to the Recover setting in the earlier note on page
43 for Surface plots. The Recover setting with the ppr function is used to
increase the quality of the stress field results. It uses a polynomial-preserving
recovery (ppr) algorithm, which is a higher-order interpolation of the solution
on a patch of mesh elements around each mesh vertex. It is not active by default
since it makes Results evaluations slower.
4 Under Expression, select or enter MPa as the Unit.
5 In the Settings window for Volume
Maximum, click Evaluate to
evaluate the maximum stress. The
result will be displayed in a Table
window and will be approximately
364 MPa.
6 To see where the maximum value is attained, you can use a Max/Min Volume
plot. Right-click the Results node
and add a 3D Plot Group .
7 Right-click the 3D Plot Group 3 node
Volume .
8 In the Settings window for Max/Min Volume, in the Expression text field,
enter the function ppr(solid.mises).
9 In the Settings window under Expression, from the Unit list select MPa (or
enter MPa in the field).
46 |
10Click the Plot button . This type of plot simultaneously shows the location of
the max and min values and also their coordinate location in the table below.
P ARAMETERIZING
THE
M ESH
We will now define a parametric sweep for successively refining the mesh size while
solving and then finally plot the maximum von Mises stress vs. mesh size. First,
lets define the parameters that will be used for controlling the mesh density.
1 In the Model Builder, click Parameters
2 Go to the Settings window for Parameters. In the Parameters table (or under
the table in the fields), enter these settings:
- In the Name column or field, enter hd. This parameter will be used in the
| 47
field.
- 1.3 in the Maximum element growth rate
field.
- 0.1 in the Curvature factor field.
- 0.2 in the Resolution of narrow regions
field.
See page 69 for more information on the Element Size Parameters.
P ARAMETRIC S WEEP
AND
S OLVER S ETTINGS
48 |
. From the
R ESULTS A NALYSIS
As a final step, analyze the results from the parametric sweep by displaying the
maximum von Mises stress in a Table.
1 In the Model Builder under Results>Derived values, select the Volume
Maximum 1 node .
The solutions from the parametric sweep are stored in a new Data Set named
Study 1/Parametric Solutions 1. Now change the Volume Maximum settings
accordingly:
| 49
2 In the Settings window for Volume Maximum, change the Data set to Study
1/Parametric Solutions 1.
3 Click the arrow next to the Evaluate button at the top of
the Settings window for Volume Maximum and select to
evaluate in a New Table. This evaluation may take a
minute or so.
4 To plot the results in the Table, click the Table Graph
button at the top of the Table window.
It is more interesting to plot the maximum value vs. the
number of DOFs. This is possible by using a built-in variable numberofdofs.
5 Right-click the Derived Values node
6 In the Settings window for Global Evaluation, change the Data set to Study
1/Parametric Solutions 1.
7 In the Expressions field, enter numberofdofs.
8 Click the arrow next to the Evaluate button in the Settings window for Global
Evaluation and select to evaluate in Table 2. This displays the DOF values for
each parameter next to the previously evaluated data.
This convergence analysis shows that the computed value of the maximum von
Mises stress in the wrench handle will increase from the original 355 MPa, for a
mesh with about 60,000 DOFs, to 370 MPa for a mesh with about 1,100,000
DOFs. It also shows that 300,000 DOFs essentially gives the same accuracy as
1,100,000 DOFs; see the table below.
DEGREES OF FREEDOM
58,899
354.8
177,918
364.3
314,181
368.5
585,849
369.0
862,509
369.6
1,126,380
369.8
50 |
Titanium Bolt 2b
Titanium Bolt 1
The goal of your simulation is to precisely calculate how much the busbar heats
up. Once you have captured the basic multiphysics phenomena, you will have the
chance to investigate thermal expansion yielding structural stresses and strains in
the busbar and the effects of cooling by an air stream.
The Joule heating effect is described by conservation laws for electric current and
energy. Once solved for, the two conservation laws give the temperature and
electric field, respectively. All surfaces, except the bolt contact surfaces, are cooled
by natural convection in the air surrounding the busbar. You can assume that the
exposed parts of the bolt do not contribute to the cooling or heating of the device.
| 51
The electric potential at the upper-right vertical bolt surface is 20 mV and the
potential at the two horizontal surfaces of the lower bolts is 0 V. This corresponds
to a relatively high and potentially unsafe loading of this type of busbar. More
advanced boundary conditions for electromagnetics analysis are available with the
AC/DC Module, such as the capability to give the total current on a boundary.
busbar using a parameter and then solve for a range of parameter values. The
result is a plot of the average temperature as a function of the width.
In the section Parallel Computing on page 116 you learn how to solve the
M o d e l W i z a rd
1 To open the software, double-click the COMSOL icon on
the desktop.
52 |
| 53
54 |
Global Definitions
To save time, its recommended that you
load the geometry from a file. In that case,
you can skip to Geometry on page 56.
2 x rad_1
. In the Parameters
2 Click the first row under Expression and enter the value of L, 9[cm]. You can
enter the unit inside the square brackets.
3 Continue adding the other parameters: rad_1, tbb, wbb, mh, htc, and Vtot
according to the Parameters list below. It is a good idea to enter descriptions for
| 55
variables in case you want to share the model with others and for your own
future reference.
Geometr y
This section describes how the geometry can be opened from the Application
Libraries. The physics, study, parameters, and geometry are included with the
model file you are about to open.
1 Select Application Libraries
from the
Windows drop down in the Home tab.
56 |
the menu
- Click one of the buttons under the
tree
You can select No if prompted to save
untitled.mph.
The geometry in this file is
parameterized. In the next few steps, we
will experiment with different values for
the width parameter, wbb.
3 Under Global Definitions
Parameters node .
click the
| 57
also use the ribbon and click Build All from the Geometry group in the Home
tab.
wbb=5cm
58 |
wbb=10cm
window.
- To move it, right-click and drag.
- To zoom in and out, click the scroll wheel, continue holding it, and drag.
- To get back to the original position, click the Go to Default 3D View
button
on the toolbar.
Mate rials
The Materials node stores the material properties for all physics and geometrical
domains in a Component node. The busbar is made of copper and the bolts are
made of a titanium alloy. Both of these materials are available from the Built-In
material database.
1 In the Model Builder, right-click Component 1>Materials
and select Add
Material . By default, the window will open at the right-hand side of the
desktop. You can move the window by clicking on the window title and then
| 59
dragging it to a new location. While dragging the window, you will be presented
with several options for docking.
The Materials node will show a red in the lower-left corner if you try to
solve without first defining a material (you are about to define that in the
next few steps).
2 In the Add Material window,
expand the Built-In materials
folder and locate Copper.
Right-click Copper
and
select Add to Component 1.
A Copper node is added to the
Model Builder.
3 In the Add Material window,
scroll to Titanium beta-21S in
the Built-In material folder list.
Right-click and select Add to
Component 1.
4 In the Model Builder, collapse
the Geometry 1 node to get
an overview of the model.
60 |
6 In the Settings window for Material, examine the Material Contents section.
The Material Contents section has useful information about the material
property usage of a model. Properties that are both required by the physics and
available from the material are marked with a green check mark . Properties
required by the physics but missing in the material are marked with a warning
sign . A property that is available but not used in the model is unmarked.
The Coefficient of thermal expansion in the table above is not used, but
will be needed later when heat-induced stresses and strains are added to
the model.
Because the copper material is added first, by default all parts have copper
material assigned. In the next step you will assign titanium properties to the
bolts, which overrides the copper material assignment for those parts.
7 In the Model Builder, click Titanium beta-21S
| 61
8 Select All Domains from the Selection list and then click domain 1 in the list.
Now remove domain 1 from the selection list.
To remove a domain from the selection list (or any geometric entity such as
boundaries, edges, or points), you can use either of these two methods:
- Click domain 1 in the selection list found in the Settings window for Material,
then click the Remove from Selection button
or press Delete on your
keyboard.
- Alternatively, in the Graphics window, click domain 1 to remove it from the
selection list.
62 |
To render the copper components in the actual color of the material, open
the Preferences window from the File menu. Then on the Graphics and
Plot Windows page, select the Show material color and texture check box.
This will also enable material-true rendering of the other materials.
9 In the Settings window for
Material, be sure to inspect
the Material Contents section
for the titanium material. All
the properties used by the
physics should have a green
check mark .
| 63
Physics
Next you will inspect the physics domain settings and set the boundary conditions
for the heat transfer problem and the conduction of electric current.
In the Model Builder window, examine the default physics nodes of the
multiphysics interface for Joule Heating. First, collapse the Materials node. Then
click the Electric Currents , Heat Transfer in Solids , and Multiphysics
nodes to expand them.
The D in the upper left corner of a nodes icon ( ) means it is a default node.
The equations that COMSOL solves are displayed in the Equation section of the
Settings windows of the respective physics nodes.
The default equation form is inherited from the study added in the Model Wizard.
For Joule heating, COMSOL displays the equations solved for the temperature
and electric potential.
To always display the equations in the Settings window, click the Show
button ( ) on the Model Builder toolbar and select Equation Sections so
that a check mark appears next to it.
64 |
Domain section
Section divider
Boundary section
| 65
43
15
66 |
| 67
6 Move the mouse pointer over the circular face of the single titanium bolt to
highlight it and then click to add it (boundary 43) to the Selection list.
43
68 |
9 In the Graphics window, click one of the remaining bolts to add it to the
Selection list.
Cross-check: Boundaries 8 and 15.
15
Repeat this step to add the last bolt. Boundaries 8 and 15 are added to the
selection list for the Ground boundary condition.
10On the Graphics toolbar, click the Go to Default 3D View button
Me sh
The simplest way to mesh is to create an unstructured tetrahedral mesh, which is
perfect for the busbar. Alternatively, you can create several meshing sequences as
shown in Adding Meshes on page 84.
A physics-controlled mesh is created by default. In most cases, it is possible
to skip to the Study branch and just solve the model. For this exercise, the
settings are investigated in order to parameterize the mesh settings.
| 69
70 |
You can also click Build Mesh in the Home tab of the ribbon.
Study
1 To run a simulation, in the Model
Builder, right-click Study 1
and
choose Compute . You can also
press F8 or click Compute in the
ribbon Home tab.
The Study node
automatically
defines a solution sequence for the
simulation based on the selected
physics and the study type. The
simulation only takes a few seconds to
solve. During the solution process, two Convergence plots are generated and are
available from tabs next to the Graphics window. These plots show the
convergence progress of the different solver algorithms engaged by the Study.
| 71
Results
By default, in the Results node, three plot groups are
generated: a Multislice plot of the Electric Potential, a
Surface plot of the Temperature, and a plot named
Isothermal Contours containing an Isosurface plot of
the temperature.
Click Results > Temperature to view the temperature
plot in the Graphics window. The temperature
difference in the device is less than 10 K due to the high
thermal conductivity of copper and titanium. The
temperature variations are largest in the top bolt, which
conducts double the amount of current compared to the two lower bolts. The
temperature is substantially higher than the ambient temperature of 293 K.
1 Click and drag the image in the Graphics window to rotate and view the back
of the busbar.
You can now manually set the color table range to visualize the temperature
difference in the copper part.
3 In the Model Builder, expand the Results > Temperature node
Surface 1 node .
72 |
4 In the Settings window for Surface click Range to expand the section. Select the
Manual color range check box and enter 323 in the Maximum field (replace the
default). Click the Plot button
on the Settings window for Surface.
| 73
6 Click and drag in the Graphics window to rotate the busbar and view the back.
Now, let us generate a Surface plot that shows the current density in the device.
1 In the Model Builder, right-click
Results
and add a 3D Plot
Group . Right-click 3D Plot
Group 4
and add a Surface
node .
74 |
The plot that displays in the Graphics window is almost uniform in color due to
the high current density at the contact edges with the bolts. The next step is to
manually change the color table range to visualize the current density
distribution.
4 In the Settings window for Surface under Range, select the Manual color range
check box. Enter 1e6 in the Maximum field and replace the default.
| 75
The resulting plot shows that the current takes the shortest path in the
90-degree bend in the busbar. Notice that the edges of the busbar outside of
the bolts are hardly utilized for current conduction.
6 Click and drag the busbar in the Graphics window to view the back. Continue
rotating the image to see the high current density around the contact surfaces
of each of the bolts.
Make sure to save the model. This version of the model, busbar.mph, is
reused and renamed during the next set of tutorials.
When you are done, click the Go to Default 3D View button
on the Graphics
toolbar. As a next step you will create a model thumbnail image.
76 |
FROM
P LOTS
With any solution, you can create an image to display in COMSOL when
browsing for model files. After generating a plot, in the Model Builder under
Results click the plot. Then click the root node (the first node in the model tree).
In the Settings window for Root under Thumbnail, click Set from Graphics
Window.
There are two other ways to create images from a plot. One is to click the
Image Snapshot button in the Graphics toolbar to directly create an image. You
can also add an Image node
to an Export node to create an image file.
Right-click the plot group of interest and then select Add Image to Export.
This completes the Busbar example. The next sections are designed to improve
your understanding of the steps implemented so far, and to extend your
simulation to include additional effects like thermal expansion and fluid flow.
These additional topics begin on the following pages:
Parameters, Functions, Variables and Couplings on page 78
Material Properties and Material Libraries on page 82
Adding Meshes on page 84
Adding Physics on page 86
Parametric Sweeps on page 107
Parallel Computing on page 116
Appendix ABuilding a Geometry on page 120
| 77
Advanced Topics
Par a m e t e r s , F u n c t i o n s , Va r i a bl e s a n d C o u p l i n g s
This section explores working with Parameters, Functions, Variables, and
Component Couplings.
Global Definitions and Component Definitions contain functionality that help
you to prepare model inputs and component couplings, and to organize
simulations. You have already used the functionality for adding Parameters to
organize model inputs in Global Definitions on page 55.
Functions, available as both Global Definitions and Component Definitions,
contain a set of predefined function templates that can be useful when setting up
multiphysics simulations. For example, the Step function template can create a
smooth step function for defining different types of spatial or temporal transitions.
To illustrate using functions, assume that you want to add a time dependent study
to the busbar model where an electric potential is applied across the busbar that
goes from 0 V to 20 mV in 0.5 seconds. For this purpose, you could use a step
function to be multiplied with the parameter Vtot. In this section, youll add a
step function to the model that goes smoothly from 0 to 1 in 0.5 seconds to find
out how functions can be defined and verified.
D EFINING F UNCTIONS
For this section, you can continue working with the same model file created in the
previous section. Locate and open the file busbar.mph if it is not already open on
the desktop.
78 |
2 In the Settings window for Step enter 0.25 in the Location field to set the
location of the middle of the step, where it has the value of 0.5.
3 Click Smoothing to expand the section and enter 0.5 in the Size of transition
zone field to set the width of the smoothing interval. Keep the default Number
of continuous derivatives at 2.
4 Click the Plot button
| 79
If your plot matches the one below, this confirms that you have defined the
function correctly.
You can also add comments and rename the function to make it more descriptive.
5 Right-click the Step 1 node
in the Model Builder and
select Properties .
80 |
2 In the Rename Component window, enter Busbar. Click OK and save the
model.
| 81
C USTOMIZING M ATERIALS
Let us keep working on the busbar.
1 In the Model Builder, under Materials, click
Copper .
82 |
By adding these material properties, you have changed the Copper material. You
can save this information in your own material library, but not in the read-only
Solid Mechanics materials library.
4 In the Model Builder, right-click Copper and select Add to User-Defined
Library .
| 83
Addin g M eshes
A model component can contain different meshing sequences for generating
meshes with different settings. These sequences can then be accessed by the study
steps. In the study, you can select which mesh you would like to use in a particular
simulation.
In the busbar model, a second mesh node is now added to create a mesh that is
refined in the areas around the bolts and the bend.
A DDING
M ESH
84 |
The asterisk in the upper-right corner of a node icon indicates that the node is
being edited.
6 In the Settings window for Size, under Element Size, click the Custom button.
7 Under Element Size Parameters, enter:
- mh/2 in the Maximum element size field, where mh is 6 mmthe mesh
Compare Mesh 1 and Mesh 2 by clicking the Mesh nodes. The mesh is updated
in the Graphics window. An alternative to using many different meshes is to run a
parametric sweep of the parameter for the maximum mesh size, mh, that was
| 85
Mesh 1
Mesh 2
A dd i n g P hy s i c s
The distinguishing characteristics of COMSOL, particularly adaptability and
compatibility, are prominently displayed when you add physics to an existing
model. In this section, you will understand the ease with which this seemingly
difficult task is performed. By following these directions, you can add structural
mechanics and fluid flow to the busbar model.
S TRUCTURAL M ECHANICS
After completing the busbar Joule heating simulation, we know that there is a
temperature rise in the busbar. What kind of mechanical stress is induced by
thermal expansion? To answer this question, let us expand the model to include
the physics associated with structural mechanics.
To complete these steps, either the Structural Mechanics Module or the
MEMS Module (which enhances the core Solid Mechanics interface) is
required.
If you want to add cooling by fluid flow, or dont have the Structural
Mechanics Module or MEMS Module, read this section and then go to
Cool by Adding Fluid Flow on page 93.
86 |
1 Open the model busbar.mph that was created earlier. From the main menu,
select File > Save As and rename the model busbar_II.mph.
2 In the Model Builder,
right-click the Component 1
node
and select Add
Physics .
When adding additional physics, you need to make sure that materials
included in the Materials node have all the required properties for the
selected physics. In this example, you already know that all properties are
available for copper and titanium.
You can start by adding the effect of thermal expansion to the structural
analysis.
| 87
88 |
43
15
For easier management of
multiple boundary selections, you
can group boundaries into a
user-defined Selection. Once you
have selected boundaries 8, 15,
and 43, click the Create Selection button
Bolt top surfaces.
Next we update the Study to take the added physics into account.
| 89
S OLVING
FOR JOULE
H EATING
AND
T HERMAL E XPANSION
The Joule heating effect is independent of the stresses and strains in the busbar,
assuming small deformations and ignoring the effects of electric contact pressure.
This means that you can run the simulation using the temperature as input to the
structural analysis. In other words, the extended multiphysics problem is weakly
coupled. As such, you can solve it in two separate study steps to save computation
timeone for Joule heating and a second one for structural analysis.
1 In the Model Builder, right-click Study 1
select Study Steps > Stationary > Stationary
a second stationary study step.
and
to add
When adding study steps you need to manually connect the correct
physics with the correct study step. We shall start by disabling the
structural analysis from the first step.
2 Under Study 1, click the Step 1: Stationary node
Now repeat these steps to remove Electric Currents (ec) and Heat Transfer in
Solids (ht) from the second study step.
5 Under Study 1, click Step 2: Stationary 2
90 |
Save the file busbar_II.mph, which now includes the Solid Mechanics interface
and the additional study step.
R ESULTING D EFORMATION
Now add a displacement plot.
1 Under Results>3D Plot Group 4, click the Surface 1 node
| 91
92 |
The deformations shown in the figure are highly amplified to make the
very small distortions that actually take place more visible.
5 Save the busbar_II.mph file, which now includes a Surface plot with a
Deformation.
You can also plot the von Mises and principal stresses to assess the
structural integrity of the busbar and the bolts.
C OOL
BY
After analyzing the heat generated in the busbar and possibly the induced thermal
expansion, you might want to investigate ways of cooling the busbar by letting air
flow over its surfaces. These steps do not require any additional modules as the
model only includes Joule heating without the previous thermal expansion
analysis.
If you have the CFD Module, the Non-Isothermal Flow multiphysics
interface is available. If you have the Heat Transfer Module, the Conjugate
Heat Transfer multiphysics interface is available. Either one of these two
interfaces automatically defines coupled heat transfer in solids and fluids
including laminar or turbulent flow, whereas in this example, this is done
manually and with limited functionality.
Adding fluid flow to the Joule heating model forms a new multiphysics coupling.
To simulate the flow domain, you need to create an air box around the busbar.
You can do this manually by altering the geometry from your first model or by
opening an application library file. In this case, you will open a file with the box
already created.
| 93
After loading the geometry, you will learn how to simulate air flow according to
this figure:
Air outlet
Air inlet
94 |
2 Click the Home tab, and from the Windows menu select Application Libraries
. Navigate to COMSOL Multiphysics> Multiphysics> busbar box.
Double-click to open the file,
which contains the geometry in
addition to the physics modeling
steps completed through the end
of the section Customizing
Materials on page 82.
4 In the Settings window for Parameters click the empty row just below the Vtot
row. In the Name column, enter Vin. Enter 1e-1[m/s] in the Expression
column and a description of your choice in the Description column, such as
Inlet velocity.
5 Select File>Save As and save the model with a new name, busbar_box_I.mph.
A DDING A IR
The next step is to add the material properties of air.
| 95
96 |
| 97
5 In the Model Builder, right-click Heat Transfer in Solids . In the first section
of the context menu, the domain level , select Heat Transfer in Fluids.
98 |
| 99
The settings for the busbar, the bolts, and the Electric Potential 1 and
Ground 1 boundaries have retained the correct selection, even though you
added the box geometry for the air domain. To confirm this, in the Model
Builder under Electric Currents, click the Electric Potential 1 and the
Ground 1 nodes to verify that they have the correct boundary selection.
Lets continue with the flow settings. You need to indicate that fluid flow only
takes place in the fluid domain and then set the inlet, outlet, and symmetry
conditions.
100 |
1 In the model tree, click the Laminar Flow node . In the Settings window for
Laminar Flow click the Clear Selection button .
2 In the Graphics window, click the air box (Domain 1) to add it to the Selection.
It is good practice to verify that the Air
material under the Materials node has all
the properties that this multiphysics
combination requires. In the model tree
under Materials, click Air. In the Settings
window for Material under Material Contents, verify that there are no
missing properties, which are marked with a warning sign . The section
Materials on page 59 has more information.
Lets continue with the boundaries.
3 In the Model Builder, right-click Laminar Flow and
at the boundary level select Inlet. An Inlet node
is
added to the Model Builder.
| 101
102 |
is
8 In the Graphics window, click each of the blue faces in the figure below
(Boundaries 1, 3, 4, and 48) to add all of them to the Selection list. You may
need to use the mouse scroll wheel or rotate the geometry to select all of them.
Save the busbar_box_I.mph
file, which now includes the
Air material and Laminar
Flow interface settings.
C OARSENING
THE
M ESH
To get a quick solution, we will change the mesh slightly and make it coarser. The
current mesh settings would take a relatively long time to solve, and you can
always refine it later.
1 In the Model Builder, expand the Mesh 1 node
click the Size node .
and
| 103
3 Click the Build All button . The geometry displays with a mesh in the
Graphics window (you may need to turn Transparency off to see the picture
below.)
You can assume that the flow velocity is large enough to neglect the influence of
the temperature increase in the flow field.
It follows that you can solve for the flow field first and then solve for the
temperature using the results from the flow field as input. This is implemented
with a study sequence.
S OLVING
FOR
F LUID F LOW
AND JOULE
H EATING
When the flow field is solved before the temperature field it yields a weakly
coupled multiphysics problem. The study sequence described in this section
automatically solves such a weak coupling.
104 |
Next, the correct physics needs to be connected with the correct study step.
Start by disabling the Electric Currents (ec) and Heat Transfer in Solids (ht)
interfaces associated with Joule heating from the first step.
2 Under Study 1, click Step 1: Stationary
3 In the Settings window for Stationary locate the Physics and Variables Selection
section. In both the Electric Currents (ec) and the Heat Transfer in Solids (ht)
rows, click to change the check mark
to an
in the Solve for column,
removing Joule heating from Step 1.
| 105
4 Repeat the step. Under Study 1, click Step 2: Stationary 2 . Under Physics
and Variables Selection, in the Laminar Flow (spf) row, click in the Solve for
column to change the check mark
to an .
6 After the solution is complete, select the Temperature (ht) plot under the
Results node in the Model Builder. If you dont already have transparency on,
click the Transparency button
on the Graphics toolbar to visualize the
106 |
temperature field inside the box. To zoom, middle-click and hold down the
mouse button (or scroll wheel) while dragging the mouse.
The Temperature Surface plot that displays in the Graphics window shows the
temperature in the busbar and in the surrounding box. You can also see that the
temperature field is not smooth due to the relatively coarse mesh. A good
strategy to get a smoother solution would be to refine the mesh to estimate the
accuracy.
7 Save the busbar_box_I.mph file at this point so you can return to this file if
you want. The next steps use the original busbar.mph file.
Par am et ri c Swe ep s
S WEEPING
G EOMETRIC P ARAMETER
| 107
A DDING
P ARAMETRIC S WEEP
2 In the Settings window for Parametric Sweep, under the empty parameter table,
click the Add button . From the Parameter names list in the table, select wbb.
The Sweep type, available above the Parameter names, is used to control
parametric sweeps with multiple parameters. You select between
sweeping for All combinations of the given parameters or a subset of
Specified combinations.
108 |
3 Enter a range of parameter values to sweep the width of the busbar from 5 cm
to 10 cm in 1 cm increments. There are different ways to enter this information:
- Copy and paste or enter range(0.05,0.01,0.1) into the Parameter value
list field.
- Click the Range
button and
enter the values in the Range
dialog box. In the Start field, enter
5e-2. In the Step field, enter
1e-2, and in the Stop field, enter
1e-1. Click Replace.
| 109
5 In the Settings window for Average select All domains from the Selection list.
110 |
6 Select File>Save As to save the model with the new name, busbar_III.mph.
7 Right-click Study 1
and select Compute
Compute in the Home tab.
| 111
Compare the wider busbar plot to the temperature for wbb=0.05[m] (5[cm]).
1 In the Model Builder, click the first Temperature (ht) node
112 |
The Temperature (ht) plot is updated for wbb=0.05[m] (5[cm]). Note that if
you have updated the color range for this plot already, your plot should look
similar to the one below. If not, follow the subsequent steps.
Like the wider busbar, the plot may be quite uniform in color, so change the
maximum color range.
1 Under the first Temperature (ht) node, click the Surface node
2 In the Settings window for Surface click Range to expand the section (if it is not
already expanded). Select the Manual color range check box.
| 113
3 Enter 323 in the Maximum field (replace the default) to plot wbb at 5 cm.
The Temperature (ht) plot is updated in the Graphics window for
wbb=0.05[m] (5[cm]).
Click the first and second Temperature plot nodes to compare the plots in the
Graphics window. The maximum temperature decreases from 331 K to 318 K
as the width of the busbar increases from 5 cm to 10 cm.
114 |
node.
4 In the Settings window for Global under y-Axis Data, click the first row in the
Expressions column and enter aveop1(T). This operator is the one we defined
on page 110 for later use. You use a similar syntax to calculate the average of
other quantities.
5 Click to expand the Legends section. Select the Expression check box.
This adds a legend at the top right corner of the graph.
| 115
In the plot, the average temperature also decreases as the width increases. This
indicates that the goal of a lower operating temperature would be fulfilled by using
a wider busbar.
The subject of parametric sweeps raises the question of parallel computing; it
would be efficient if all parameters were solved simultaneously.
Par a l l e l C o m p u t i n g
COMSOL supports most forms of parallel computing including shared memory
parallelism for multicore processors and high performance computing (HPC) for
clusters and clouds. All COMSOL licenses are multicore enabled. For cluster or
cloud computing, including parallelized sweeps, a Floating Network License is
needed.
You can use clusters or clouds either for Cluster Sweep or for Cluster Computing.
If you have a Floating Network License, these two options are available by
right-clicking the Study node. However, you first need to enable Advanced Study
116 |
C LUSTER S WEEP
Cluster Sweep is used for solving several models in parallel where each model has
a different set of Parameters. This can be seen as a generalization of Parametric
Sweep. Right-click the Study 1 node to add a Cluster Sweep node.
The Study Settings for Cluster Sweep are similar to that of Parametric Sweep, but
additional settings are required for the cluster or cloud being used. The picture
above shows how the top of the Settings window for Cluster Sweep would look
for the same sweep as defined in Parametric Sweeps on page 107.
| 117
C LUSTER C OMPUTING
You can also utilize a cluster or cloud to solve a single large model using
distributed memory. For maximum performance, the COMSOL cluster
implementation can utilize shared-memory multicore processing on each node in
combination with the Message Passing Interface (MPI) based distributed memory
model. This is also known as hybrid parallelism and brings a major performance
boost by making the most out of the computational power available.
Right-click the Study node to add a Cluster Computing node. A Cluster
Computing node cannot be used in combination with a Cluster Sweep. You will
be asked if you want to remove the Cluster Sweep before proceeding, select Yes.
The Settings window for Cluster Computing, shown below, helps to manage the
simulation with settings for the cluster or cloud.
118 |
You choose the type of cluster job you want to perform from the Cluster type list.
COMSOL supports Windows Compute Cluster Server (WCCS) 2003,
Windows HPC Server (HPCS) 2008, Open Grid Scheduler/ Grid Engine
(OGS/GE), SLURM, or Not distributed.
To learn more about running COMSOL in parallel, see the COMSOL
Multiphysics Reference Manual.
| 119
120 |
Under Grid:
- Select the Manual Spacing check box.
- In the x spacing and y spacing fields,
enter 5e-3.
on the
Geometry Primitives
to
| 121
and
122 |
two rectangles) to add it to the Objects to add list in the Settings window for
Difference.
To help select the geometry you can display geometry labels in the
Graphics window. In the Model Builder under Geometry
1>WorkPlane 1, click the View 2 node. Go to the Settings window for
View and select the Show geometry labels check box.
8 Click the Difference node. In the
Settings window for Difference, click
the Active selection button to the left of
the Objects to subtract list. Select the
smaller rectangle, r2, by using the
mouse scroll wheel to cycle through the
overlapping rectangles to first highlight
it, and then click on it to select it.
Click Build Selected
| 123
subtract list. Right-click on the Selection List window title and select Close.
After building the selected geometry, you should have a backward-facing,
L-shaped profile. Continue by rounding the corners of the L-shaped profile.
Select point 3 to add it to the Vertices to fillet list. There are different ways to
add points:
- In the Graphics window, click point 3 (in the inner right corner) to add it to
124 |
| 125
Next you extrude the work plane to create the 3D busbar geometry.
1 In the Model Builder, right-click Work Plane 1 and select Extrude . In the
Settings window for Extrude enter wbb in the Distances from Plane table
(replace the default) to extrude to the width of the profile.
The table allows you to enter several values in order to create sandwich
structures with different materials. In this case, only one extruded layer is
needed.
126 |
Next, create the titanium bolts by extruding two circles drawn in two work
planes.
3 In the Model Builder, right-click Geometry 1
and add a Work Plane . A
Work Plane 2 node is added. In the Settings window for Work Plane, under
Plane Definition, select Face parallel as the Plane type.
| 127
4 In the Graphics window, click face 8 as shown in the figure below, to add it to
the Planar face list in the Settings window for Work Plane.
Face number 8 is now highlighted in blue and the work plane is positioned on
top of the face.
Face 8
5 Click the Show Work Plane button to draw the first circle representing the
position of the first bolt. Click the Zoom Extents button
on the Graphics
toolbar.
6 Under Work Plane 2, right-click
Plane Geometry
and select
Circle .
In the Settings window for Circle:
- Under Size and Shape, in the
Radius field, enter rad_1.
- Under Position, the default xw
128 |
2 Click the Build Selected button to create the cylindrical part of the titanium
bolt that runs through the busbar.
| 129
3 Right-click Geometry 1
and select Work Plane . A Work Plane 3 node is
added. In the Settings window for Work Plane, for Work Plane 3, select Face
parallel as the Plane type.
4 In the Graphics window, click Face 4 as shown in the figure, to add it to the
Planar face list in the Settings window for Work Plane.
5 Click the Show Work Plane button on the Settings window for Work Plane
and the Zoom Extents button
on the Graphics toolbar to get a better view
of the geometry.
To parameterize the position of the two remaining bolts, add the circles that
form the cross sections of the bolts.
130 |
field.
Click Build Selected
| 131
on the Graphics
Your geometry, as shown in the work plane, should match this figure so far.
132 |
11In the Model Builder, right-click Work Plane 3 and select Extrude . In the
Settings window for Extrude, in the first row of the Distances from Plane table,
enter -2*tbb (replace the default). Click Build All Objects .
The geometry and geometry sequence should match the figures below. Click
the Save button
and name the model busbar.mph.
| 133
C REATING P ARTS
AND
U SING
THE
P ART L IBRARIES
After setting up the busbar or other geometry, its convenient to be able to save
it for future use, avoiding unnecessary work. In the steps youve just completed,
the geometry was stored directly in the COMSOL model file that will also be
used to set up the complete busbar model. Instead, you can also create a
reusable part that can serve as a building block of a more complex COMSOL
model geometry, which is stored in a separate file accessible through the Part
Libraries.
While building the busbar geometry, you were using features from the
Geometry and Workplane tabs. A Parts menu is located in the Other group in
these tabs.
Through the Parts menu, you can choose to create or load a part, or add a part to
the model geometry by selecting one from the Part Libraries. Several Part
Libraries are already provided with the software by default. When new parts are
created, they are added under a Parts parent node in the Global Definitions
section of the model tree. For additional information on working with Parts and
the Part Libraries, see the COMSOL Multiphysics Reference Manual.
To continue with the busbar tutorial, return to the section Materials on
page 59.
134 |
SHORTCUT (OS X)
ACTION
F1
F1
Ctrl+F1
Command+F1
F2
F2
F3
F3
F4
F4
F5
F5
F6
F6
F7
F7
F8
F8
Del
Del
Left arrow
Right arrow
Up arrow
Up arrow
Down arrow
Down arrow
Alt+left arrow
Ctrl+left arrow
| 135
SHORTCUT (OS X)
ACTION
Alt+right arrow
Ctrl+right arrow
Ctrl+A
Command+A
Ctrl+C
Command+C
Ctrl+D
Command+D
Ctrl+F
Ctrl+N
Command+N
New model
Ctrl+O
Command+O
Ctrl+P
Command+P
Ctrl+S
Command+S
Ctrl+V
Command+V
Ctrl+Y
Ctrl+Shift+Z
Ctrl+Z
Command+Z
Ctrl+up arrow
Command+up arrow
Ctrl+down arrow
Command+down
arrow
Ctrl+Tab
Ctrl+Tab
Ctrl+Shift+Tab
Ctrl+Shift+Tab
Ctrl+Alt+A
Not available
Go to Application Builder
Ctrl+Alt+M
Not available
Go to Model Builder
Ctrl+Alt+left arrow
Command+Alt+left
arrow
Ctrl+Alt+right arrow
Command+Alt+right
arrow
136 |
SHORTCUT (OS X)
ACTION
Ctrl+Alt+up arrow
Command+Alt+up
arrow
Ctrl+Alt+down arrow
Command+Alt+down
arrow
Shift+F10 or
(Windows only) Menu key
Ctrl+F10
Ctrl+Space
Ctrl+Space
| 137
SHORTCUT (OS X)
ACTION
138 |
VARIABLES
USED IN
A PPLICATIONS
Model parameters and variables can be used in applications. For example, you can
let the user of an application change the value of a parameter. In addition, variables
to be used in applications can be defined in the Application Builder under the
Declarations node. Such variables are available globally in form objects and
methods but cannot be used in the Model Builder.
C o n s t a n t s a n d Par a m e t e r s
There are three different types of constants: built-in mathematical and numerical
constants, built-in physical constants, and parameters. Parameters are user-defined
| 139
constants which can vary over parameter sweeps. Constants are scalar valued. The
tables below list the built-in mathematical and numerical constants as well as
built-in physical constants. Constants and parameters can have units.
140 |
B UILT - IN M ATHEMATICAL
AND
N UMERICAL C ONSTANTS
DESCRIPTION
NAME
VALUE
eps
2-52 (~2.220410-16)
i, j
i, sqrt(-1)
Infinity,
inf, Inf
A value larger
than what can be
handled with
floating point
representation
Not-a-number
NaN, nan
An undefined or
unrepresentable value
such as the result of 0/0
or inf/inf
pi
3.141592653589793
NAME
VALUE
Acceleration of gravity
g_const
9.80665[m/s^2]
Avogadro constant
N_A_const
6.02214129e23[1/mol]
Boltzmann constant
k_B_const
1.3806488e-23[J/K]
Characteristic impedance
of vacuum (impedance of
free space)
Z0_const
376.73031346177066[ohm]
Electron mass
me_const
9.10938291e-31[kg]
Elementary charge
e_const
1.602176565e-19[C]
Faraday constant
F_const
96485.3365[C/mol]
Fine-structure constant
alpha_const
7.2973525698e-3
Gravitational constant
G_const
6.67384e-11[m^3/(kg*s^2)]
V_m_const
2.2413968e-2[m^3/mol]
Neutron mass
mn_const
1.674927351e-27[kg]
Permeability of vacuum
(magnetic constant)
mu0_const
4*pi*1e-7[H/m]
| 141
DESCRIPTION
NAME
VALUE
Permittivity of vacuum
(electric constant)
epsilon0_const
8.854187817000001e-12[F/m]
Plancks constant
h_const
6.62606957e-34[J*s]
hbar_const
1.05457172533629e-34[J*s]
Proton mass
mp_const
1.672621777e-27[kg]
c_const
299792458[m/s]
Stefan-Boltzmann
constant
sigma_const
5.670373e-8[W/(m^2*K^4)]
R_const
8.3144621[J/(mol*K)]
b_const
2.8977721e-3[m*K]
P ARAMETERS
Parameters are user-defined constant scalars in the Global Definitions branch in
the model tree. Example uses are:
Parameterizing geometric dimensions
Parameterizing mesh element sizes
Defining parameters to be used in parametric sweeps
Var i abl e s
There are two types of variables: built-in and user-defined. Variables can be scalars
or fields. Variables can have units.
Note: There is a group of user-defined variables of special interest. Spatial
coordinate variables and dependent variables. These variables have default names
based on the space dimension of the geometry and the physics interface
respectively. As a result of the names chosen for these variables, a list of built-in
variables will be created by COMSOL: the first and second order derivatives with
respect to space and time.
142 |
B UILT - IN VARIABLES
NAME
DESCRIPTION
TYPE
Time
Scalar
freq
Frequency
Scalar
lambda
Eigenvalue
Scalar
phase
Phase angle
Scalar
numberofdofs
Scalar
Field
meshtype
Field
meshelement
Field
dvol
Field
qual
Field
DESCRIPTION
TYPE
x, y, z
Field
r, phi, z
Field
u, T, etc.
Field
Example: T is the name for the temperature in a 2D, time-dependent heat transfer
model, x and y are the spatial coordinate names. In this case, the following built-in
variables will be generated: T, Tx, Ty, Txx, Txy, Tyx, Tyy, Tt, Txt, Tyt, Txxt,
Txyt, Tyxt, Tyyt, Ttt, Txtt, Tytt, Txxtt, Txytt, Tyxtt, and Tyytt. Here, Tx
corresponds to the partial derivative of the temperature T with respect to x, and
Ttt corresponds to the second-order time derivative of T, and so on. If the spatial
coordinate variables have other namesfor example, psi and chithen Txy
would be Tpsichi, and Txt would be Tpsit. (The time variable t is built-in; the
user cannot change its name.)
| 143
Functio n s
There are two types of functions: built-in and user-defined. Functions can be
scalar valued or field valued depending on the input argument(s). Some functions
can have units for both input and output arguments.
DESCRIPTION
SYNTAX EXAMPLE
abs
Absolute value
abs(x)
acos
acos(x)
acosh
acosh(x)
acot
acot(x)
acoth
acoth(x)
acsc
acsc(x)
acsch
acsch(x)
arg
arg(x)
asec
asec(x)
asech
asech(x)
asin
asin(x)
asinh
asinh(x)
atan
atan(x)
atan2
atan2(y,x)
atanh
atanh(x)
besselj
besselj(a,x)
bessely
bessely(a,x)
besseli
besseli(a,x)
besselk
besselk(a,x)
ceil
ceil(x)
conj
Complex conjugate
conj(x)
cos
Cosine
cos(x)
cosh
Hyperbolic cosine
cosh(x)
cot
Cotangent
cot(x)
coth
Hyperbolic cotangent
coth(x)
144 |
NAME
DESCRIPTION
SYNTAX EXAMPLE
csc
Cosecant
csc(x)
csch
Hyperbolic cosecant
csch(x)
erf
Error function
erf(x)
exp
Exponential
exp(x)
floor
floor(x)
gamma
Gamma function
gamma(x)
imag
Imaginary part
imag(u)
log
Natural logarithm
log(x)
log10
Base-10 logarithm
log10(x)
log2
Base-2 logarithm
log2(x)
max
max(a,b)
min
min(a,b)
mod
Modulo operator
mod(a,b)
psi
psi(x,k)
range
range(a,step,b)
real
Real part
real(u)
round
round(x)
sec
Secant
sec(x)
sech
Hyperbolic secant
sech(x)
sign
Signum function
sign(u)
sin
Sine
sin(x)
sinh
Hyperbolic sine
sinh(x)
sqrt
Square root
sqrt(x)
tan
Tangent
tan(x)
tanh
Hyperbolic tangent
tanh(x)
| 145
the list of reserved names. For more information see the COMSOL Multiphysics
Reference Manual.
NAME
NAME
NAME
NAME
adj
dtang
linsol
sens
at
emetric
lintotal
shapeorder
ballavg
env
lintotalavg
side
ballint
error
lintotalpeak
sphavg
bdf
fsens
lintotalrms
sphint
bndenv
if
linzero
subst
centroid
integrate
mean
sum
circavg
isdefined
noenv
test
nojac
timeavg
circint
circumcenter
isinf
pd
timeint
islinear
ppr
try_catch
depends
isnan
pprint
up
dest
jacdepends
prev
var
diskavg
lindev
reacf
with
diskint
linper
realdot
down
linpoint
scope.ati
146 |
SYNTAX EXAMPLE
Analytic
Elevation
Gaussian Pulse
( x x0 )
----------------------2
2
1
y ( x ) = --------------- e
2
| 147
TEMPLATE NAME
SYNTAX EXAMPLE
Image
Interpolation
Piecewise
Ramp
148 |
TEMPLATE NAME
SYNTAX EXAMPLE
Random
Rectangle
Step
Triangle
Waveform
| 149
TEMPLATE NAME
SYNTAX EXAMPLE
External (Global
Definitions only)
MATLAB
(Global
Definitions only)
150 |
PRECEDENCE LEVEL
SYMBOL
DESCRIPTION
() {} .
Power
! - +
[]
Unit
* /
Multiplication, Division
+ -
== !=
&&
Logical And
10
||
Logical Or
11
Ex pres sions
P ARAMETERS
A parameter expression can contain: numbers, parameters, built-in constants,
built-in functions of parameter expressions, unary and binary operators.
Parameters can have units.
VARIABLES
A variable expression can contain: numbers, parameters, constants, variables,
functions of variable expressions, unary and binary operators. Variables can have
units.
F UNCTIONS
A function definition can contain: input arguments, numbers, parameters,
constants, functions of parameter expressions including input arguments, unary
and binary operators.
| 151
C O M S O L F i l e Fo r m a t s
The COMSOL Model file type, with the extension .mph, is the default file type
containing the entire model tree. The file contains both binary and text data. The
mesh and solution data are stored as binary data, while all other information is
stored as plain text.
The Application Builder file type, with the extension .mphapp, contains an
application that can be run in COMSOL Multiphysics, the COMSOL client for
Windows, or through a web browser. See the COMSOL Multiphysics Reference
Manual and the Application Builder Reference Manual for more information.
The COMSOL binary and text file types, with the extension .mphbin and
.mphtxt, respectively, contain either geometry objects or mesh objects which can
be imported directly to the Geometry or Mesh branches in the model tree.
The Physics Builder file type, with the extension .mphphb, contains one or more
physics interfaces that you can access from the Model Wizard. See the Physics
Builder Manual, for more information.
See Supported External File Formats for more information about all the other
formats supported by COMSOL.
FILE TYPE
EXTENSION
READ
WRITE
COMSOL Model
.mph
Yes
Yes
Application Builder
.mphapp
Yes
Yes
Binary Data
.mphbin
Yes
Yes
Text Data
.mphtxt
Yes
Yes
Physics Builder
.mphphb
Yes
Yes
S u p p o r t e d E x t e r n a l F i l e Fo r m a t s
CAD
The CAD Import Module and Design Module allow for import of a range of
industry-standard CAD file types. Additional file types are available through the
152 |
bidirectional functionality of the LiveLink products for CAD as well as with the
File Import for CATIA V5 add-on.
The DXF (2D), VRML (3D), and STL (3D) file types are available for import with
COMSOL Multiphysics and dont require any add-on products. Unless noted
otherwise in the table below, import of the listed file types is available on all by
COMSOL supported versions of Linux, Mac OS X, and Windows operating
systems.
FILE TYPE
EXTENSION
READ
WRITE
AutoCAD1,2,3
.dwg
Yes
Yes9
Inventor1,2,3
.ipt, .iam
Yes
Yes9
NX1,4
.prt
Yes
No
.prt, .asm
Yes
Yes9
PTC Pro/ENGINEER1,3
.prt, .asm
Yes
Yes9
Revit Architecture3,5
.rvt
Yes9
Yes9
Solid Edge3,6
.par, .asm
Yes9
Yes9
.sldprt, .sldasm
Yes
Yes9
.dxf
Yes
Yes10
Parasolid1
Yes
Yes
Yes
Yes
.step, .stp
Yes
No
.iges, .igs
Yes
No
.CATPart, .CATProduct
Yes
No
.vrml, .wrl
Yes
No
SOLIDWORKS
ACIS
STEP1
1
IGES
2,7
CATIA V5
8
VRML, v1
1,2,3
| 153
FILE TYPE
EXTENSION
READ
WRITE
STL8
.stl
Yes
Yes
1Requires one of the LiveLink products for AutoCAD, Revit, PTC Creo Parametric,
Inventor, PTC Pro/ENGINEER, Solid Edge, SOLIDWORKS; or the CAD Import Module;
or the Design Module
2
Import supported on Windows operating systems only
3Synchronization of files between COMSOL and a linked CAD program supported on
Windows 7, 8, and 8.1 operating systems only
4Import supported on Windows and Linux operating systems only
5
Requires LiveLink for Revit
6Requires LiveLink for Solid Edge
7
Requires the CAD Import Module (or the Design Module, or one of the LiveLink products
for AutoCAD, PTC Creo Parametric, Inventor, PTC Pro/ENGINEER, Solid Edge, or
SOLIDWORKS) and the File Import for CATIA V5
8Limited to a single geometric domain
9
From/To file using linked CAD package provided the original CAD geometry is created in the
CAD package
10
Writing to file is supported for 2D geometry only
ECAD
The ECAD Import Module allows for import of 2D layout files with automatic
conversion to 3D CAD models. The Touchstone file type is used for exporting
S-parameters, impedance, and admittance values from simultaneous port and
frequency sweeps. The SPICE Circuit Netlist file type is converted at import to a
series of lumped circuit element nodes under an Electrical Circuit node.
FILE TYPE
EXTENSION
READ
WRITE
NETEX-G1
.asc
Yes
No
ODB++1
Yes
No
ODB++(X)1
.xml
Yes
No
GDS1
.gds
Yes
No
Touchstone2
No
Yes
.cir
Yes
No
154 |
M ATERIAL D ATABASES
The Chemical Reaction Engineering Module can read CHEMKIN files to
simulate complex chemical reactions in the gas phase. The Plasma Module can
read LXCAT files for sets of electron impact collision cross sections.
FILE TYPE
EXTENSION
READ
WRITE
CHEMKIN1
Yes
No
n/a
n/a
n/a
Yes
No
LXCAT file2
.lxcat, .txt
1Requires the Chemical Reaction Engineering Module
2
3
M ESH
The NASTRAN Bulk Data file types are used to import a volumetric mesh. The
VRML and STL file types are used to import a triangular surface mesh, and cannot
be used for creating a volumetric mesh. If imported as a Geometry, VRML and
STL files can be used as a basis for creating a volumetric mesh for a single
geometric domain.
FILE TYPE
EXTENSION
READ
WRITE
Yes
Yes
VRML, v1
.vrml, .wrl
Yes
No
STL
.stl
Yes
Yes
I MAGES
AND
M OVIES
Results visualization can be exported to a number of common image file types, see
the table below. Images can also be read and used as interpolation functions for
physics modeling. Animations can be exported to one of the Animated GIF,
Adobe Flash, and AVI file types.
FILE TYPE
EXTENSION
READ
WRITE
JPEG
.jpg, .jpeg
Yes
Yes
PNG
.png
Yes
Yes
BMP
.bmp
Yes
Yes
TIFF
.tif, .tiff
No
Yes
GIF
.gif
Yes
Yes
| 155
FILE TYPE
EXTENSION
READ
WRITE
.eps
No
Yes
Animated GIF
.gif
No
Yes
Adobe
.swf
No
Yes
.avi
No
Yes
Flash
AVI1
1Available for Windows only
P ROGRAMMING L ANGUAGES
AND
S PREADSHEET
Model files for Java are editable script files, with the extension .java, that contain
sequences of COMSOL commands as Java code. Edit the files in a text editor to
add additional commands. You can compile these Java files into Java Class files,
with the extension .class, and run them as separate applications.
Model files for MATLAB are editable script files (M-files), similar to the model
files for Java, for use with MATLAB. These model files, which have the
extension .m, contain a sequence of COMSOL commands as a MATLAB M-file.
You can run the model files in MATLAB like any other M-file scripts. It is also
possible to edit the files in a text editor to include additional COMSOL
commands or general MATLAB commands. Running model files in the M-file
format requires the COMSOL LiveLink for MATLAB.
FILE TYPE
EXTENSION
READ
WRITE
.m
No
Yes
MATLAB : Function
.m
Yes
No
.java
No
Yes
Yes
No
Yes
No
Yes
Yes
.class
3
C: Function
Excel
.xlsx
N UMERICAL
AND I NTERPOLATION
D ATA FORMATS
The grid, sectionwise, and spreadsheet file types can be read for defining
interpolation functions. The sectionwise and spreadsheet file types can
156 |
furthermore be read and used for defining interpolation curves and written for
exporting results. In addition, tables can be copy-pasted on spreadsheet format.
Parameters and variables can be imported and exported to the plain text,
comma-separated values, or data file types.
The continuous and discrete color table text file types are used for user-defined
color tables for results visualization.
Digital elevation model (DEM) files can be read and used as a parametric surface
for defining a geometry.
FILE TYPE
EXTENSION
READ
WRITE
n/a
Yes
Yes
Excel spreadsheet1
.xlsx
Yes
Yes
Table
Yes
Yes
Grid
.txt
Yes
Yes
Sectionwise
Yes
Yes
Spreadsheet
Yes
Yes
Parameters
Yes
Yes
Variables
Yes
Yes
.txt
Yes
No
.txt
Yes
No
DEM
.dem
Yes
No
| 157
Can Connect
Running Sessions
LiveLink
Yes1
Yes2
No
Yes3
Yes4
Yes5
No
No
Yes
No
No
Yes
No
No
Yes
- Bidirectional
Mode
No
No
Yes
- One Window
Mode
Yes
No
No
LiveLink
No
No
Yes
No
No
Yes
- Bidirectional
Mode
No
No
Yes
- One Window
Mode
Yes
No
No
for
Excel
LiveLink
for MATLAB
LiveLink
for AutoCad
LiveLink
for Revit
LiveLink
for PTCCreo
Parametric
LiveLink
for Inventor
for PTC
Pro/ENGINEER
LiveLink
for Solid Edge
LiveLink
for SOLIDWORKS
When you open a COMSOL model from Excel, a COMSOL model window starts and a link is
established automatically. The COMSOL model window is an output window that displays
geometry, mesh, and results.
158 |
A COMSOL model that includes a table reference to an Excel spreadsheet automatically starts
an Excel process in the background when the model is run in COMSOL Desktop environment.
3
You can start a COMSOL Multiphysics Server from a MATLAB session using the system
command and then connect to it using mphstart in the MATLAB command prompt.
4
The COMSOL 5.1 with MATLAB desktop shortcut starts a COMSOL Multiphysics Server
and MATLAB, then connects them automatically. When you run a COMSOL model in the
COMSOL Desktop interface that includes a MATLAB function (Global Definitions>Functions), a
MATLAB engine and connection is started automatically.
5
You can connect a MATLAB session to a running COMSOL Multiphysics Server using the
COMSOL command mphstart in the MATLAB command prompt.
2
| 159
160 |
Index
A
AC/DC Module 52
adding to selection 68
accuracy
variables scope 20
convergence analysis 45
boundary condition 64
recover option 43
automatically defined 39
boundary load 38
busbar model 60
busbar, setting 64
opening 34, 59
add-on modules
fixed constraint 37
AC/DC 52
free 36
ground, electrical 69
heat transfer 64
CFD 93
insulating 66
material interface 39
MEMS 86
boundary load 39
boundary section
Plasma 155
geometry 57
advanced topics 78
meshes 39, 71
analysis
built-in
convergence 45
materials 34, 59
application 22
Application Builder 5, 6, 8, 19, 22, 139
Application Libraries
examples 22
file types 23
MPH-files 22
opening 22
Application Library Update 24
average temperature 110
B
variables 75
C
Compact MPH-files 23
boundaries 66
Index
| 161
computing studies 49
materials 62
physics 37
customizing 24
on Linux 15
variables scope 20
on OS X 15
overview 6
dynamic help 10
E
COMSOL Multiphysics
edges
variables scope 20
opening 30
eigenfrequency analysis 17
constants
context menu
overview 64
contextual tab 14
electric potential 52
physics node 67
Convergence plot 9, 71
cooling
electrical heating 51
air stream 51
equation
natural convection 55
built-in 64
user-defined 44
custom studies 54
customized desktop 24
D
evaluating
volume maximum 46
default feature 64
Definitions node 28
example
derivatives 21
Derived Values
Excel 158
defined 16
Global Evaluation 50
exporting images 77
expressions
Direct solver 41
Boolean 44
DirectX 11
discretize 39
replacing 44, 75
documentation, models 22
units, specifying 46
domain level 65
user-defined 44
domain section
context menu, and 65
domains
162 | Index
finite element
mesh 39
preconditioning 49
sparse matrix 41
Graphics window 9
tetrahedrons 39
geometry, and 33
plot 41
frequency response 17
using 33, 59
frequency-domain study 17
zoom box 38
Full MPH-files 23
functions
advanced topics 78
built-in 21
mathematical 21
overview 64
scope 55
Help window
Functions node 55
G
defined 10
geometric dimensions
opening 16
parameters, and 18
parametric sweep 55
Home tab 14
geometry
HPC 116
building 55
CAD format 31
importing 31
in Application Libraries 56
infinite elements 28
information windows 9
settings window 8
initial conditions 8
Geometry node 27
functions 55
parameters 55
scope 19, 55
Isosurface plot 72
variables 19
iterative solver
multigrid 49
graphics
preconditioning 49
Java 156
Java-file 28
Index
| 163
Joule heating
refining 47
multiphysics coupling 69
settings 39
physics-controlled, default 69
equations 64
unstructured tetrahedral 69
user-controlled 48, 70
mesh element size
parameters, defining 18, 70
settings 39
Message Passing Interface 118
Messages window 9, 42
Material Browser
defined 10
material contents section 34, 61
material interface
mechanical contact 39
visualization accuracy 43
materials
copper 51
domains, assigning 61
model tree 27
settings window 8
steel 34, 44
titanium alloy 51
Materials node 34, 59
mathematical constants and functions
21
MATLAB 156
matrix 41
matrix equation system 41
Max/Min Volume plot 46
memory requirements (RAM) 40
MEMS Module
thermal expansion, and 86
mesh
convergence analysis, and 45
density 47
finite element 39
model tree, and 28
parameterizing 47, 69
164 | Index
M-file 28
modal tab 14
Model Builder
defined 15
example 27
expanding sections 64
geometry import 32
node sequence example 36
the ribbon, and 14
model history 28
model tree
building 15
defined 55
example 27
geometry 27
Global Definitions node 16, 35, 55
Materials node 27, 34
Model Builder, and 15
nodes, and 15
Results node 16
root node 16
Study node 17, 28
the ribbon, and 14
Model Wizard
adding physics 17, 30, 53
Component node, and 17
creating a new model 12
custom studies 31, 54
opening 30, 52
parametric study 55
study 17, 54
parametric sweep 18
models
defining 15
discretization 39
meshes, and 47
range, defining 49
documentation 22
saving 59
physics
structural mechanics 29
adding 53
symmetry 74
boundary conditions 64
workflow 27
electromagnetic heating 53
MPH-files
heat transfer 53
saving 59, 76
laminar flow 97
MPI 118
multicore processors 116
example 48
multiphysics models 51
Electric Currents 54
multiphysics phenomena 51
Joule Heating 53
Multislice plot 72
Laminar Flow 97
nodes 15
default feature 36
reordering 28
Solid Mechanics 30
Plasma Module 155
Plot Group 16
3D, adding 44
OpenGL 11
OS X version 15
plots 43
expression, user-defined 44
max/min volume 46
Parameter settings
expression 47
regenerating 43, 47
name 47
surface 42, 44
parameters 18
windows 9
defining 47, 55
editing 57
polynomial functions 39
expression 18
polynomial-preserving recovery 46
global 19
preconditioning 49
meshes, and 47
preferences 11
range of values 49
preset studies 54
scope 55
principal stress 93
using, referencing 67
program code
Index
| 165
model M-file 28
progress bar 10
Progress window 9
Q
running simulations 71
S
166 | Index
overview 6
user-controlled mesh 48
V
variables
advanced topics 78
built-in 21
studies
example, built-in 50
expression 19
defining 40
scope 55
scope, limit 20
example, stationary 40
visualization 9
preset 54
accuracy 43
types 17
Study node 17
solution sequence 71
Surface plot
busbar results 72
workflow 27
zoom 107
replace expression 75
settings 44
updating 73, 75
T
Table window 10
graph plot 50
wrench results 46
Tables node 16
tables, evaluating 50
temperature 72, 107
temperature, average 110
tetrahedron, polynomial functions 39
thermal expansion 51, 61
thumbnail image 77
time-dependent study 17
torque, applied 29
Index
| 167
168 | Index