Professional Documents
Culture Documents
COMSOL 4.2 Tutorial: COMSOL Multiphysics (Formerly FEMLAB) Is A Finite Element Analysis, Solver
COMSOL 4.2 Tutorial: COMSOL Multiphysics (Formerly FEMLAB) Is A Finite Element Analysis, Solver
2 Tutorial
and Simulation software / FEA Software package for various physics and
also allows for entering coupled systems of partial differential equations (PDEs).
2. Work through the COMSOL Model Wizard which will require you to select the
coordinate system for the model, the relevant physics to the problem, and the type
3. Define the parameters, equations and variables pertinent to the model (sub
you are using (This will be entered separately for each different physics you are
using e.g. you will need to enter these for Laminar Flow and again for Heat
10. Display the desired results in the most meaningful way (Results).
Not all of these steps are always necessary when building a model. The order is
thickness 0.05 m and which starts 0.05 m away from the center. The entire
approximations for your future quiz and test): The temperature of the heater is
Given that heat diffusion should be the same at any given it is reasonable to
to perform (either time dependant or stationary). For this problem start by selecting
screen.
in Solids, left click this so that it is highlighted then click the blue, right pointing
arrow at the top right of the Model Wizard menu screen. Multiple physics can be
added to a single model by left clicking the physics to add and then left clicking
the blue + sign at the bottom left of the Model Wizard menu screen.
selecting Save As as is the case with most programs. This file will be named
Heat Transfer Example. By default COMSOL will save all COMSOL files in a
folder it creates called COMSOL42 however this folder name will change with the
version of COMSOL being used. After giving our file a name and clicking the save
button seen in the above image notice that the first icon within the model builder
this point on we can essentially just work our way down the Model Builders list of
of only of a rectangle.
3. At this point the rectangle has been added, however the dimensions of this
left clicking the white rectangle just to the left of the geometry icon. This will
expand the geometry tab to show all the sub tabs contained within geometry. If you
added the rectangle correctly you will see the tab called Rectangle 1. This contains
all the information regarding this object and to adjust the dimensions and position
of this rectangle this is where we do so. Left click the tab labeled Rectangle 1.
4. If you have completed the above steps successfully your screen should resemble
the one above. Notice that by default the corner of the rectangle has been placed at
the origin (position x= 0, y =0) and given width and height of 1m. For this problem
the height needs to be 5 cm (0.05 m) and the width needs to be 30 cm (0.3 m).
Enter these values into the designated fields and press the blue building icon at the
top right of the rectangle menus. This is the Build All button and will add your
Materials
To give the rectangle thermal properties such as heat capacity and thermal
conductivity we can either add these directly under the Heat Transfer tab or by
selecting a material to build the rectangle from. In this problem we will make our
rectangle out of copper and we will do this using the Materials tab.
1. Left click on Materials tab and then left click Materials Browser. Your
2. As can be seen above the Material Browser has a search bar that allows you to
enter the name of the material in question and COMSOL will find any matches
within its database. Enter copper into the search bar and click search.
3. Open the Built-In tab and then right click Copper. Your screen should now
look like the one below. Left click Add Material to Model. You have now added
copper to all domains by default which means the rectangle now has the properties
of solid copper.
Heat Transfer
It is under the Heat Transfer tab that the boundary, bulk and initial conditions for
the equations of heat conduction can be input. In our case we only have boundary
conditions. Initial conditions are used in conjunction with time dependant studies
and bulk conditions apply to the entire domain, not just a boundary. In our case we
have on boundary in contact with the heated rod which is at 400k and all other
1. To input these boundary conditions first open the Heat Transfer tab by left
clicking the white triangle to the left of the Heat Transfer icon. Your screen should
of bulk and boundary conditions. Go through this menu and select Temperature
by left clicking. A new icon will now appear under initial values that says
Temperature this is where we will input one of our two temperature conditions.
conditions your
screen should
we wish to apply this boundary condition and the second is to give a value to this
temperature. We will choose the bottom of our rectangle as the location for our
boundary condition. In the graphical interface left click this boundary (which
should then turn red as seen below and click the button to add. Now set the
Temperature 2 to open the interface and select the top and side boundaries to
apply the boundary condition. Then enter 300 into the To field. Your screen should
look the one below. This concludes our activities within the Heat Transfer tab we
To calculate the solution to our PDE we simply right click on the Study tab and
To display the temperature at a given point left click the point you wish to probe
and the result will be displayed under the results tab as shown below.
To make a graph showing the temperature profile along a line we will need to add
a cut line to our solution and display the temperature along it. This may be done
as follows.
have our cut line start at point (0.15,0) and end at point (0.15,0.05). To do this
3. Press the paint brush button in the top right of the Cut line 2D screen to
have the cut line displayed. Your cut line should look like the one below.
4. We now need to add a 1D plot group to the results. As you may be beginning
plot group.
5. We want to add a line graph to our 1D plot group, so to do this right click on
6. Finally left click on Line graph and for data select Cut Line 2D, this will
cooled surface.
At this point it is a simple matter to go back and change some of our boundary or
follows:
1. Go back to Heat Transfer and left click the arrow just to the right of this icon
so that now only the upper surface is at constant 300 k. You de-select a sub-
domain by left clicking it and then pressing the minus button . If done correctly
your constant temperature condition should look like the one below. By default
3. Right click on Study and press compute. The below result should appear.
Notice how only the region of the rectangle close to the lateral surfaces has
changed from before. If you check the temperature profile along the cut line you
shouldnt see much of a change because this cut line was exactly in the middle of
We will now add a heat generation term. This is a bulk condition and can be added
1. Go back up to Heat Transfer and right click to open the list of possible
2. We need to add the domain over which this condition applies, and as a bulk
condition it will apply over the entire geometry. So left click the rectangle and then
3. Now a value for a per volume heat generation term needs to be added. We will
found so right click on Study and press compute. The below result should be
obtained.
We will now solve the same problem as in example 1, but this time without the
reduction of the problem into rectangular coordinates. To avoid redundancy only
the steps that are significantly different from those in example 1 will be explained
in detail.
Startup
1. You will need to start a new model either be restarting COMSOL or by clicking
New in the File menu.
2. You will now select 2D Axisymmtric instead
of simply 2D. This will take whatever geometry
you create and rotate it about an axis and is ideal
for problems with symmetry about an axis.
Geometry
We will now create our geometry, this is the where the biggest differences exist
between this model and the previous one.
2. Have the corner placed at z=0m and r=0.05m. Notice that our geometry will be
spun around the line r=0.
Materials
Select Copper as the material and apply this to the geometry as before.
Heat Transfer
@ r=R1 T=400k
@ r=R2 T=300k
This means that as before we will need to add two different temperature
conditions. This is done by right clicking on heat transfer and clicking temperature.
Enter the appropriate temperatures in the temperature field and select the
appropriate surfaces to apply these boundaries (same as before).
Study
Now that the model has been built we are ready to examine the solution. Right
click Study and left click compute. The below result should be obtained.
This is a pretty image but does not tell us much about the actual solution. To get a
better understanding of the temperature profile we will add a Cut Line as before.
1. Right click on Data Sets under the Results tab. Click Cut Line 2D
2. Set the two points for the cut line as (r=0.05m,z=0.15m) and (r=0.10,z=0.15m)
5. In the line graph interface select Cut line 2D as the data source and click the
paintbrush icon to have the graph generated. The below result should be obtained.