COMSOL Multiphisics
Prepared by:
Mastaneh Hajipour
Supervisor:
Dr. Pishvaie
January 2010
COMSOL Multiphysics
COMSOL Multiphysics is a powerful interactive
environment for modeling and solving all kinds of scientific
and engineering problems based on partial differential
equations (PDEs).
With this software you can easily extend conventional
models for one type of physics into multiphysics models
that solve coupled physics phenomena - and do so
simultaneously.
3
COMSOL Multiphysics
It is possible to build models by defining the physical quantities
- such as material properties, loads, constraints, sources, and
fluxes - rather than by defining the underlying equations.
You can always apply these variables, expressions, or numbers
directly to solid domains, boundaries, edges, and points
independently of the computational mesh.
COMSOL then internally compiles a set of PDEs representing
the entire model. You access the power of COMSOL through a
flexible graphical user interface, or by script programming in
the COMSOL Script language.
COMSOL Multiphysics
PDEs form the basis for the laws of science and provide the
foundation for modeling a wide range of scientific and
engineering phenomena.
When solving the PDEs, COMSOL Multiphysics uses the
finite element method (FEM). The software runs the finite
element analysis together with adaptive meshing and error
control using a variety of numerical solvers.
5
COMSOL Application
You can use COMSOL Multiphysics in many application
areas, just a few examples being:
Chemical reactions
Diffusion
Fluid dynamics
Bioscience
Acoustics
Electromagnetics
Geophysics
6
COMSOL Application
Heat transfer
Microelectromechanical systems (MEMS)
Microwave engineering
Optics
Photonics
Porous media flow
Quantum mechanics
Radio-frequency components
Semiconductor devices
Structural mechanics
Transport phenomena
Wave propagation
COMSOL M-file
You can build models of all types in the COMSOL user interface.
For additional flexibility, COMSOL also provides its own
scripting language, COMSOL Script, where you can access
the model as a Model M-file or a data structure.
COMSOL Multiphysics also provides a seamless interface to
MATLAB. This gives you the freedom to combine PDE-based
modeling, simulation, and analysis with other modeling
techniques. For instance, it is possible to create a model in
COMSOL and then export it to Simulink as part of a controlsystem design.
COMSOL Multiphysics
AC/DC Module
Acoustics Module
Chemical Engineering Module
Earth Science Module
Heat Transfer Module
MEMS Module
RF Module
Structural Mechanics Module
11
Electrostatics
Conductive media DC
Magnetostatics
Low-frequency electromagnetics
12
Pressure acoustics
13
Aeroacoustics
Underwater acoustics
14
Heterogeneous catalysis
Separation processes
15
Heat transfer
Fluid dynamics
17
Momentum balances
Incompressible Navier-Stokes equations
Darcys law
Brinkman equations
Non-Newtonian flow
Nonisothermal and weakly compressible flow
Turbulent flow, k- turbulence model
Turbulent flow, k- turbulence model
Multiphase flow
18
3.
Energy balances
Heat conduction
Mass balances
Diffusion
Electrokinetic flow
19
Brinkman equations
20
The RF Module
The RF Module provides a unique environment for the
simulation of electromagnetic waves in 2D and 3D.
The RF Module is useful for component design in virtually all
areas where you find electromagnetic waves, such as:
Optical fibers
Antennas
Photonic waveguides
Photonic crystals
24
The RF Module
The available application modes cover the following types of
electromagnetics field simulations:
25
Axisymmetry, stress-strain
Piezoelectric modeling
3D solids
Shells
26
2.
3.
4.
5.
6.
27
2. Creating Geometry
An important part of the modeling process is creating the
geometry. The COMSOL Multiphysics user interface contains
a set of CAD tools for geometry modeling in 1D, 2D, and 3D.
The CAD Import Module provides an interface for import of
Parasolid, SAT (ACIS), STEP, and IGES formats.
In combination with the programming tools, you can even use
images and magnetic resonance imaging (MRI) data to create a
geometry.
29
30
Models that you open using the space dimensions 1D, 2D,
and 3D use the Cartesian coordinates x, y, and z.
Domain equations
Material properties
Initial conditions
32
4. Creating Mesh
When the geometry is complete and the parameters are defined,
COMSOL Multiphysics automatically meshes the geometry.
However, you can take charge of the mesh-generation process
through a set of control parameters.
For a 2D geometry the mesh generator partitions the subdomains
into triangular or quadrilateral mesh elements.
Similarly, in 3D the mesh generator partitions the subdomains
into tetrahedral, hexahedral, or prism mesh elements.
33
5. Solution
Next comes the solution stage. Here COMSOL Multiphysics
comes with a suite of solvers for stationary, eigenvalue, and
time-dependent problems.
For solving linear systems, the software features both direct and
iterative solvers. A range of preconditioners are available for
the iterative solvers. COMSOL sets up solver defaults
appropriate for the chosen application mode and automatically
detects linearity and symmetry in the model.
A segregated solver provides efficient solution schemes for large
multiphysics models, turbulence modeling, and other
34
challenging applications.
6. Postprocessing
For postprocessing, COMSOL provides tools for plotting and
postprocessing any model quantity or parameter:
Surface plots
Slice plots
Isosurfaces
Contour plots
Arrow plots
Streamline plots and particle tracing
Cross-sectional plots
Animations
Data display and interpolation
Integration on boundaries and subdomains
35
Report Generator
To document your models, the COMSOL Report Generator
provides a comprehensive report of the entire model,
including graphics of the geometry, mesh, and postprocessing
quantities.
You can print the report directly or save it as an HTML file for
viewing through a web browser and further editing.
36
Expression Variables
Add symbolic expression variables or expressions using the
dialog boxes that you open from the Expressions submenu on
the Options menu.
Global expressions are available globally in the model, and scalar
expressions are defined the same anywhere in the current
geometry.
With boundary expressions, subdomain expressions, point
expressions, and interior mesh boundary expressions you can
also create expressions that have different meanings in
different parts of the model.
37
Expression Variables
Expression variables can make a model easier to understand by
introducing short names for complicated expressions.
Another use for expression variables is during postprocessing. If
you need to view a field variable throughout the model, but it
has different names in different domains, create an expression
variable made up of the different domains and then plot that
variable.
38
39
40
Type the values below in the respective edit fields for the
rectangle dimensions.
Boundary Conditions
From the Physics menu, select Boundary Settings.
Enter boundary conditions according to the following table.
43
2.
3.
4.
Step 5 : Solve
Computing the solution,
Click the Solve button on the Main toolbar.
Step 6 : Postprocessing
The resulting plots show how the velocity profile develops
along the flow direction. At the outlet, the flow is almost a fully
developed parabolic velocity profile.
45
46
47
48
Type the values below in the respective edit fields for the
rectangle dimensions.
49
Boundary Conditions
From the Physics menu, select Boundary Settings.
Enter boundary conditions according to the following table.
51
2.
3.
4.
5.
Step 5 : Solve
Click the Solve button on the Main toolbar.
Step 6 : Postprocessing
To visualize the velocity in a horizontal cross-section across
the channel and the porous domain, follow these steps:
1.
2.
54