Vous êtes sur la page 1sur 36

COMSOL guide

What is COMSOL
Numerical solver for multiphysics PDEs and
ODEs.
It covers several areas of physics such as
Electrical
Mechanical
Fluid flow
Chemical
Finite element method for solution
Recap of finite element (FE) method
Approximate solution to a PDE
or ODE over finite domain
Divide complex geometry into
Discretize
elements of simple geometry
Within element, approximate
variable to find by linear
combinations of polynomials
Convert differential equation Element
into system of linear equations PDE
and solve!
Analyze Results! System of
linear eq

Solve and
analyze
Mechanics Examples
Basis: Mechanical Equilibrium or Dynamics

Bridge
Car Crash
Stress field of engine piston

Truss mount in aircraft Silo Shark bite force


Electromagnetism examples
Basis: Maxwell Equations

Electric field distribution Electric field distribution EM simulation of circuit


and antenna radiation in head from cellphone
radiation

Voltage distribution Electric Field intensity of


during trans-cranial map nanowires in Al2O3
Thermodynamics examples
Basis: Equations of thermodynamics

Temperature distribution and Temperature distribution in Global temperature


fluid flow in turbo-charger hot engine piston distribution in the ocean
Chemical Engineering
Basis: Electrochemistry and Ficks Laws

Solvent transport in micromixer Diffusive flux distribution between


electrodes in bio-fuel cell
Multiphysics and coupling
Most phenomena involve more than one area of
physics
Automobile engine Thermodynamics and mechanics
Chemical power plant Fluid flow, chemical reactions and
solute transport
Fuel Cell Electric potential, fluid flow, thermodynamics
The different physics may be coupled
Micro-resistor with thermal expansion
Flow of current produces heat <-> Increase in temperature <->
Change in electrical properties
Hydrogel mechanical behavior
Absorption of water <-> becomes softer <-> Changes water
pressure <-> affects absorption
Steps to COMSOL modeling
Draw/import geometry
Identify physics
Assign Material Properties
Assign boundary conditions
Generate Mesh
Solve
View Results
Post-process for specific results
We will go through the steps using a simple
example of a micro-resistor
Open COMSOL
Click the COMSOL 4.4 software icon to open it
Choose mode
Click on Model Wizard
Working Space Dimension
Select the space dimension according to
your model
For this problem, we will choose 3D
Select physics
Select the physics required
For this problem, we will first select only electric currents
Then click Add and Done
We will add the remaining physics later
COMSOL interface
This should open up the software interface
Units
Set the right units for the problem

If you check this option, the values will be


scaled. For example a 10 m length that you
created will become a 10 x 106 m length
rather than a 10 m length.
Drawing
We will create a 2D
surface and extrude
it. This is one of
several methods to
create a 3D
geometry
Right click the
Geometry tab and
choose Work Plane
Plane Geometry
The work plane will show up as shown
Then double click the Plane Geometry option
Drawing the plane geometry
Choose the Draw Line option so that you
can draw connected lines.
Then draw the following shape approximately.
Dont worry about the dimensions. We will
adjust them later
Complete the drawing
Right click with your mouse
to complete the figure, it will
show as a grey polygon. You
need to remember the order
in which you drew the line
segments.
If you want to delete the
polygon and redraw the
figure, just select the Bezier
Polygon that got created
and press the delete key on
your keyboard.
Adjust the coordinates
It is good to have an engineering drawing before
starting to draw (the other option is to import)
Double click Bezier Polygon1 (b1) and enter the
right coordinates using the control points option
Then you should see the right geometry on the
graphics screen
Building the 3D geometry
We can build the 3D geometry by extruding the planar drawing to the right depth
Right click on Work Plane and select Extrude
Extruding to 3D
Now you can enter the right distance to extrude and
then select Build Selected
Add Material
In the Model Builder under the Home
tab go to Material and click Add
Material (You can also define your own
material)
This opens up an Add Material tab on
the right hand side
Under Built-in, select Titanium beta-
21S
Then click + Add to component
Boundary Conditions
Under Electric Current (ec), click Ground.
Assign boundary condition 1
Assign the ground condition to one base of the resistor
Assign boundary condition 2
Right click Electric Currents and select Electric Potential to assign an
electrical potential boundary condition
Boundary Condition 2
Assign the boundary condition to the other face. Use a voltage of 0.2 V
Click mesh. The default is tetrahedral elements. Accept Comsols option for
Physics-controlled mesh and click build all.
The mesh should appear as below:
Add Study
Go to the Study Tab in the main list and click Add study
Add Study
Choose Stationary under Preset Studies and click + Add Study
Solve!
Click Compute to do the computation
Results
The electric potential is displayed by default using a section view
Change the view using the various options to observe the potential
distribution in different areas
Mesh

(-1.5,0) 2 (1.5,0)

1 3
(-1.15,-1) 6 (1.15,-1)
7 5

(1.5,-3) 4 (2,-3)
(-2,-3) 8 (-1.5,-3)

Vous aimerez peut-être aussi