Introduction to Comsol Comsol is a finite element software package

advertisement
Introduction to Comsol
Comsol is a finite element software package built on the matlab computation engine. Integration with
matlab allows it a great deal of flexibility, most of which we will not cover, but which you should explore
if the need arises.
Comsol’s primary advantage is that it was designed as a “multi-physics” package, meaning that it can be
used to solve structural mechanics, heat transfer, fluid flow, electromagnetic, etc. problems either in
cases where only one set of physics is import or in cases where multiple sets of physics are important.
The process of combining physics is relatively easy compared to other existing commercial packages.
Comsol’s primary drawback is that it has not developed specializations that have existed for decades in
other packages such as ANSYS, Abaqus, and NASTRAN. For example, these other packages have
specialized elements that deal with stress concentrations that occur at cracks and special formulations
of the governing equations that deal with the hyperelastic behavior of rubbers. However, since Comsol
is built upon matlab, the user has the ability to design his/her own elements and material behaviors.
A secondary drawback is that Comsol, since it was built from matlab, was not initially designed with a
GUI in mind. This is being corrected in a new release.
The initial tutorial is designed to introduce you to Comsol by solving an initially simple cantilever beam
problem. As the tutorials progress, complexity will be added to help show some of Comsol’s more useful
functions.
Comsol Tutorial 1 – A cantilever beam
modeled in 2D
F
L
We wish to model the bending behavior of a flat steel
h
plate of length L, height h, and depth d. A schematic
of this arrangement is shown in the figure. The figure depicts a cantilever beam of length L, height h,
end loaded by a total force F; the depth d into the page is not shown.
To generate a finite element model of the arrangement, begin by opening Comsol version 3.5a. You will
see the Model Navigator. Under Application Modes and COMSOL Multiphysics, choose Structural
Mechanics. Leave the default Space dimension of 2D. Since this is a plate (thick in the depth) select
Plane strain and since we are only looking at the static case, choose Static Analysis.
Notice how the dependent variables are now u and v.
Pull down the Element menu and notice the options of Linear through Quintic. These distinctions
determine the degree of the approximating polynomials used to describe the displacement functions, u,
v, and ,w, within the element. Choose Linear (but normally leave quadratic as the default) and hit OK.
A finite element model consists of the geometry, material definitions, and boundary conditions. We will
next begin making the geometry.
The working pane of Comsol will appear. Notice the 7 icons at the top right of the menu bar. The 7th
from the left, a Pencil, should be highlighted to identify you are in Drawing Mode. Next notice the two
columns of icons on the left hand side of the drawing grid. Select the top left icon, the Rectangle From a
Corner. Place the corner at (0,0) and draw a rectangle. Double click the rectangle to bring up its dialog
box. Ensure the corner is at 0,0 and set the width to 50, height to 1 and depth to 5. The default units are
[m] for length. Hit OK. Resize the screen if needed using the red cross (8th icon from the right on the top
menu bar).
Open the Physics pull down menu from the text menu bar. Notice the first three items: Subdomain,
Boundary, and Point. Comsol allows you to define quantities relevant to each category only when that
category is selected. Subdomain quantities include all material properties and possibly body forces.
Select Subdomain from the pull down and under Subdomain Selection, choose item 1. This will highlight
the rectangle. Notice the Omega in the top menu bar is highlighted. Next click Load to pull up the
Comsol Material Library, then choose Basic Material Properties and finally Structural Steel (Note that
you could enter your own material properties and make them functions of some variable). Change the
thickness to 5 [m]. Hit OK.
Open the Physics pull down again and select Boundary Settings. Notice the Del Omega in the top menu
bar is highlighted. Boundaries, in 2D, consist of all edges in the model and may be subjected to loads or
constraints on displacements in structural analysis. Cycle through the boundaries, selecting Boundary 1,
the left vertical edge. Click the constraint tab then highlight Rx and Ry. Set both to 0. Hit Apply. Notice
the boundary turns blue.
Cycle through the boundaries and choose Boundary 4, the right most vertical edge. Click the Load tab
and apply a vertical (y) pressure of 1kPa in the downward y-direction. (Note that over a 5m x 1m x area
1kPa is 5kN). Hit OK. Notice the boundary turns green.
Next generate the Finite Element Mesh by clicking the single triangle (Mesh) in the top menu bar. Once
this is done, click the equals sign (Solve). Note the number of elements, number of degrees of freedom
and the solution time in the bottom dialog box.
Select Post Processing from the top pull down menu then select Plot Parameters. The General tab allows
you to select which plots to use. The other tabs define those plots. Select Surface, Geometry Edges, and
Deformed shape. Select the Surface Tab and examine the choices under the Predefined Quantities pull
down menu. Select Sx normal stress (This is xx). Click the Deformed tab and note the Scale Factor. Hit
OK.
Using the Zoom tool in the top menu bar zoom in on the fixed edge at left. Notice that the values of the
Sx stress go from positive on top to Negative on the bottom. Also notice that the values seem to change
abruptly. This occurs because we have chosen Linear interpolations in u and v and therefore du/dx =
constant and therefore stress must be constant in the element. Also, the geometry is such that the
elements span both top and bottom surfaces. Is this result realistic?
From Post Processing select Point Evaluation. Select y-displacement from the Predefined Quantities pull
down. Notice the Expression is now v. Also notice that the Del Squared Omega icon in the top menu bar
is highlighted since this is a point quantity. Resize the drawing if needed and choose point 3.Convert the
unit to m. Hit Apply and read the result (-452.1 microns and 150 degrees of freedom) in the window at
the bottom of the Comsol screen.
Next, click the empty-multi-triangle (Refine Mesh) in the top menu bar. Hit the Equals (Solve) and run
the simulation again. Note the number of elements, degrees of freedom and solution time have
increased somewhat (write them down). Using Post Processing >Point Evaluation find the ydisplacement results of point 3 again (-1069 microns and 446 degrees of freedom).
Repeat the process by refining the mesh, solving the system, and finding the displacement 5 more times.
You can do this more quickly by not closing the Point evaluation window. Simply hit Apply instead of OK.
Plot the results (degrees of freedom) vs. (displacement) in Excel. This is called a convergence study.
If there is time, use the Drawing Intersection tool to drill holes in the beam and retest it.
Assignment: Perform a convergence study on a simply supported plate by placing the u=v=0 constraints
on the bottom left point and u=0 constraints on the bottom right. Plot the result in excel.
Download