Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
MEK4550
Elementmetoden i faststoffmekanikk I Contents
/ .
Foreleser: Geir Skeie
Page 1 of 40
(E-post:ges@math.uio.no)
Go Back
Close
Quit
Universitetet i Oslo
Innhold
F COMSOL Multiphysics 3
F.1 What is COMSOL Multiphysics? . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Subdomain boundary nodes Subdomain boundaries
G References 40
Contents
// ..
/ .
Page 2 of 40
Go Back
Close
Quit
Universitetet i Oslo
F. COMSOL Multiphysics
The mechanics department at UIO has currently access to two commercial codes for doing Subdomain boundary nodes Subdomain boundaries
COMSOL Multiphysics .
The present document is intended to help the students to get acquainted with the two codes Contents
in a way so that they may find their way around the respective documentation.
// ..
The current introduction is written in English to comply with the written documentation of
both COMSOL Multiphysics and ANSYS. / .
In this first version of the document we focus on COMSOL Multiphysics since we will use this
Page 3 of 40
in MEK4550.
Go Back
COMSOL Multiphysics is an engineering tool that performs equation based modeling in an Quit
interactive environment. The basic idea behind the tool is to make modeling and simulation
Universitetet i Oslo
of physical phenomena as easy as possible. It seems that they have come along way in this
respect. Actually this is for you, the user, to decide.
COMSOL Multiphysics is a well filled tool box for solving PDEs in an approximate way using Subdomain boundary nodes
the FEM.
Avdeling for Mekanikk
Currently, the mechanics department has access to two of the COMSOL Multiphysics modules: Geir Skeie
The first is the generic tool for solving general PDEs, while the second module is a specialized
version intended to solve general structural mechanics problems. // ..
/ .
F.2. What documentation exists?
Page 4 of 40
Relevant documentation may be found in different sections of the basic COMSOL Multiphysics Go Back
module:
Close
Quick Start and Quick Reference provides a quick overview of COMSOL Multiphysicss
capabilities and how to access them and a reference section containing lists of prede- Quit
COMSOL Multiphysics Modeling Guide provides an in-depth examination of the soft- Subdomain interior nodes
wares application modes and how to use them to model different types of physics and to
Avdeling for Mekanikk
perform equation-based modeling using PDEs.
Geir Skeie
COMSOL Multiphysics Model Library consists of a collection of ready-to-run models that
cover many classic problems and equations from science and engineering. These models
have two goals: to show the versatility of COMSOL Multiphysics and the wide range of
applications it covers; and to form an educational basis from which you can learn about
COMSOL Multiphysics and also gain an understanding of the underlying physics. Contents
// ..
In addition the Structural Mechanics Module comes with its own Users Guide and Model
Library. / .
Even if focus is on single physics application we shall see that they may be considered in a Page 5 of 40
multi-physics environment.
Go Back
Quit
The COMSOL Multiphysics graphical interface shown in this document is generated on Win-
dows.
Universitetet i Oslo
Close
Quit
Universitetet i Oslo
er Interface. Pressing F1
is also an option and pro- // ..
duces the following screen,
Figure F.2. We recognize the / .
sections mentioned in sec-
tion F.2. Page 7 of 40
Go Back
Close
Quit
The Quick Start and Quick References document serve as an ideal entry point for a more Subdomain boundary nodes Subdomain boundaries
// ..
We can illustrate the PDE mode of applications by solving the one-dimensional continuum
problem. The governing equations in this case is an ordinary differential equation given by
/ .
d du
EA =q
dx dx Page 8 of 40
with appropriate boundary conditions. E is Youngs modulus and A is the truss section area. Go Back
We use the Coefficient Form in this case. The model navigator for this problem set-up is shown
Figure F.3. Close
Quit
Universitetet i Oslo
/ .
Figure F.3: Model Navigator for a 1D example us-
ing the coefficient form. Page 9 of 40
c = EA, a = 0, = 0, =0 and f = q
Close
Quit
Universitetet i Oslo
Page 10 of 40
Go Back
Figure F.4: The Graphical User Interface for our 1D
model problem.
Close
Quit
Universitetet i Oslo
Menu bar.
Avdeling for Mekanikk
The second row contains Geir Skeie
the Main toolbar.
Figure F.5: Main tools in the Graphical User Interface
The left column is the
for our 1D model problem.
Draw toolbar.
Contents
At the bottom of the COM-
SOL Multiphysics user inter-
face a status bar shows infor- // ..
mation and provides buttons
for changing some user inter- / .
face properties. The contents
depend on the space dimen- Page 11 of 40
a status bar button toggles Figure F.6: Status bar in the Graphical User Interface
its features on and off. More for our 1D model problem. Close
Contents
/ .
Page 12 of 40
Go Back
Close
Quit
Universitetet i Oslo
// ..
/ .
Quit
// ..
Page 14 of 40
Go Back
Close
Quit
Universitetet i Oslo
Go Back
Close
Quit
// ..
Figure F.13: Boundary settings for our model problem.
/ .
The axial displacement along the truss axis is shown below.
Page 16 of 40
Go Back
Close
Quit
Universitetet i Oslo
Contents
// ..
/ .
Figure F.14: The axial deformation along the truss axis, two elements. Page 17 of 40
Go Back
The model problem may be re-generated form the .m-file.
Close
% COMSOL Multiphysics Model M-file
% Generated by COMSOL 3.2 (COMSOL 3.2.0.222, $Date: 2005/09/01 18:02:30 $)
Quit
flclear fem
% COMSOL version
Universitetet i Oslo
clear vrsn
vrsn.name = COMSOL 3.2;
vrsn.ext = ;
vrsn.major = 0;
vrsn.build = 222; Subdomain boundary nodes Subdomain boundaries
% Geometry
g1=solid1([0,2]);
clear s
s.objs={g1}; Contents
s.name={I1};
s.tags={g1};
// ..
fem.draw=struct(s,s);
fem.geom=geomcsg(fem);
/ .
% Initialize mesh
fem.mesh=meshinit(fem, ...
Page 18 of 40
hmax,[1]);
% Application mode 1
clear appl Close
appl.mode.class = FlPDEC;
appl.assignsuffix = _c;
clear prop Quit
prop.elemdefault=Lag1;
appl.prop = prop;
clear bnd
Universitetet i Oslo
bnd.type = {dir,neu};
bnd.ind = [1,2];
appl.bnd = bnd;
clear equ
equ.c = EA; Subdomain boundary nodes Subdomain boundaries
equ.f = q;
equ.ind = [1]; Avdeling for Mekanikk
appl.equ = equ;
fem.appl{1} = appl; Geir Skeie
fem.border = 1;
fem.units = SI;
% Multiphysics
fem=multiphysics(fem);
% Solve problem // ..
fem.sol=femlin(fem, ...
solcomp,{u}, ...
outcomp,{u}); / .
% Plot solution
Go Back
postplot(fem, ...
liny,{u,cont,internal}, ...
lincolor,[0.0,0.0,0.0], ... Close
title,Line: u, ...
refine,5, ...
axis,[-0.1,2.1,-0.025,0.525,-1,1]); Quit
Universitetet i Oslo
The simple plain stress problem shown below is modeled, meshed and solved using the Struc- Subdomain boundary nodes Subdomain boundaries
Contents
P = 40
// ..
x 12
/ .
48 Page 20 of 40
Go Back
Close
Figure F.15: Shear loaded cantilever beam. The geometry and loading is shown. The isotropic Quit
material is specified by, E = 30000, = 0.25 and t = 1.
Universitetet i Oslo
Model the problem in COMSOL Multiphysics using the Structural Mechanics Module. Subdomain boundary nodes Subdomain boundaries
Find the vertical displacement at (48, 0) using a 4 1 rectangular element mesh and Subdomain interior nodes
Draw the axial stress, xx , variation across the section at x = 12. Compare with exact
results. Contents
// ..
/ .
Page 21 of 40
Go Back
Close
Quit
Universitetet i Oslo
Contents
Structural Mechanics Module
Plane Stress Static // ..
Page 22 of 40
Go Back
Close
Quit
Universitetet i Oslo
// ..
/ .
Figure F.17: Main tools in the Graphical User Interface
Page 23 of 40
for our 2D model problem.
Go Back
Close
Quit
Universitetet i Oslo
Contents
Figure F.18: Axis/Grid Settings for our model problem.
// ..
/ .
Page 24 of 40
We may define constants that
may be used later in the mod-
Go Back
eling process
Quit
Figure F.19: Constant expressions that may be used in
our model problem.
Universitetet i Oslo
Draw
Specify Objects Rectangle
Contents
// ..
Figure F.20: Draw a rectangle for our model problem.
Page 25 of 40
Go Back
Close
Quit
Universitetet i Oslo
Contents
// ..
/ .
Go Back
Close
Quit
Universitetet i Oslo
Page 27 of 40
Go Back
Close
Quit
Universitetet i Oslo
Go Back
Figure F.24: Boundary settings for our model problem.
Close
Quit
Universitetet i Oslo
Triangulation, generat-
ing triangular elements, Avdeling for Mekanikk
and Geir Skeie
mapped meshing, result-
ing in quadrilateral ele-
ments.
Figure F.25: The mesh menu.
Contents
// ..
/ .
The exercise asks for quadri-
lateral elements However let
Page 29 of 40
us first generate a triangular
mesh. The mesh density is set Using
Go Back
using the command
Figure F.26: Mesh settings for the triangular mesh algo- Quit
rithms.
the mesh setting above results in the mesh shown in the Figure below.
Universitetet i Oslo
Contents
// ..
/ .
Page 30 of 40
Figure F.27: Using triangles for the cantilever.
Go Back
Close
Quit
Universitetet i Oslo
Page 31 of 40
Go Back
Close
Quit
Universitetet i Oslo
Contents
// ..
/ .
Page 32 of 40
Go Back
Close
The above settings generate the mesh below
Quit
Universitetet i Oslo
Contents
// ..
/ .
Go Back
Close
Quit
Universitetet i Oslo
We can now solve the problem. Subdomain boundary nodes Subdomain boundaries
/ .
Page 34 of 40
First, let us check if our
parabolic load distribution
produces the right resultant Go Back
The re-
force:
Close
Post processing Boundary Integration
Quit
Figure F.32: The value of the integral is shown in the Message log window.
Contents
// ..
stresses, xx .
Go Back
Post processing Plot Parameters
Close
Quit
Contents
// ..
/ .
Page 36 of 40
Close
Quit
Universitetet i Oslo
Post processing
// ..
Cross-Section Plot Parameters
/ .
Page 37 of 40
Go Back
Close
Contents
// ..
/ .
Page 38 of 40
Go Back
Close
Quit
Figure F.36: xx variation at x = 12.
Universitetet i Oslo
It is possible to run COMSOL Multiphysics on Windows. However you have to use your Win- Subdomain boundary nodes Subdomain boundaries
dows machine as a terminal towards the machines at UiO. This means that you have to be Subdomain interior nodes
Contents
// ..
/ .
Page 39 of 40
Go Back
Close
Quit
Universitetet i Oslo
G. References
Contents
// ..
/ .
Page 40 of 40
Go Back
Close
Quit