You are on page 1of 56

NAP5 NUMERICAL ANALYSIS of

PROCESSES

Models described by ordinary differential equations –


boundary problems
Method of weighted residuals and finite elements
Heat exchangers (making use analytical solution)
Pipelines (pressure and flowrates using finite element
methods)
Trusses, beams and rotationally symmetric shells

Rudolf Žitný, Ústav procesní a


zpracovatelské techniky ČVUT FS 2010
NAP5
Models by ODE boundary problem
Some systems are described by the same ODE as before (ie as systems of
equations with first derivatives), except that the initial state is not completely defined
because not all conditions are specified for the same value of the independent
variable (we speak not about initial, but boundary conditions).
While the initial problem generally refers to non-stationary processes (the
independent variable is time) finding a steady state is typical for boundary problems
when independent variable is a spatial coordinate.
Examples:

Temperature profiles in shel&tube and plate heat exchangers

Pressures and flowrates in branched pipelines (steady state)

Static deformation of loaded beam structures or rotational thin wall shells


NAP5
ODE heat exchangers
NAP5
ODE heat exchangers
The simplest possible case of hat exchanger with two parallel streams (coordinate
x is measured from one end of HE). This is example solved in the course of „Heat
processes“.

Enthalpy balance for CO-CURRENT


dT1 k INITIAL
trhis is
  (T1  T2 ) T 1’ problem, can be solved by
dx W1 x
previous methods

dT2 k
 (T1  T2 ) T 2’
dx W2
L
Enthalpy balance for COUNTER-CURRENT
BOUNDARY problem,
missing temperature at x=0
dT1 k
  (T1  T2 ) T 1’
dx W1 x
dT2 k
 (T1  T2 ) T 2’
dx W2
(k is heat transfer coefficient related to unit length of channel, Wi heat capacity of
streams)
NAP5
ODE heat exchangers
Equations for temperature profiles in a matrix form are as follows
d special case for co-
[T ]  [[ A]]  [T ] current flow

dx
 T1    k / W1 k / W1 
[T ]    [[ A]]   
 T2   k / W2  k / W2 
The matrix [[A]] is constant (for constant k), the ODE system is therefore linear and
can be transformed from a coupled to a separated system by linear transformation
[T ]  [[U ]]  [ Z ]
where [[U]] is the eigenvector matrix of [[A]] satisfying
[[ A]]  [[U ]]  [[U ]]  [[ ]] a matrix multiplied by its eigenvector gives the same
eigenvector (scaled by eigenvalue)

[[ ]] is a diagonal matrix of eigenvalues 1 2… (how many equations so


many eigenvalues and eigenvectors). Calculation of [[]] and [[U]] is
accomplished in MATLAB by single standard function [U,L]=eig(A).
NAP5
ODE heat exchangers
Substituting transformation to the ODE system
d
[[U ]]  [ Z ]  [[ A]]  [[U ]]  [ Z ] Square DIAGONAL matrix
(as soon as the [[U]] are
dx eigenvectors)
d
[ Z ]  [[U ]]1  [[ A]]  [[U ]]  [ Z ]
dx
results to uncoupled system of ODE for transformed temperatures
(vector [Z] ) d
[ Z ]  [[ ]]  [ Z ]
dx
ODE for Z are independent,

Z i ( x)  di ei x
because [[]] is diagonal
Solution of ODE i  1, 2,...
[ Z ]  e[[  ]] x [d ]  [[e x ]]  [d ]
diagonal matrix
Backtransformation
[T ( x)]  [[U ]]  [[ex ]]  [d ] coefficients dj are
determined by

Ti ( x)  U ij e j d j
boundary conditions
 x

j
NAP5
ODE heat exchangers
Specific case of 2channels and co-current arrangement of HE
T1 ( x)  U11d1e1 x + U12d 2e2 x
T2 ( x)  U 21d1e1 x + U 22d 2e2 x
Eigenproblem of [[A]]2 x 2 can be solved analytically :
0 0 
  k / W1 k / W1  1 W2   
[[ A]]     [[U ]]    [[]]   1 1 
 k / W2  k / W2  1  W1   0  k (W + W ) 
 1 2 

Boundary conditions for x=0

 T1 '  1 W2  d1  W T '+W2T2 ' T1 'T2 '


      and solution d1  1 1 d2  .
 T2 '  1  W1  d 2  W1 + W2 W1 + W2

verify eigenproblem sol;ution in MATLABu (k=1, w1=1, w2=2) the result is the same, only the order of
vectors is exchanged, and eigenvectors
a=[-1 1;0.5 -0.5];
are normalised to the unit Eucleid norm.
[u,l]=eig(a) It has no effect upon the results.
u=
-0.8944 -0.7071
0.4472 -0.7071
l=
-1.5000 0
0 0
NAP5
ODE heat exchangers
Generalisation for more complicated HE and HEN (Heat Exchanger Networks)
Heat exchangers have often more than 2 streams (generally N-streams) and each stream (channel) is
divided into M sub-channels (eg because the inlet and outlet ports of various streams are in different
locations or heat transfer coefficient changes along the flow direction). Let us assume that all N streams is
divided into M sub-channels (M> N), the position of the input subchannels is given by the vector [x '] position
and outputs the vector [x'']. Subchannel i (i = 1,2, ..., M) corresponds to the temperature Ti(x), heat capacity
Wi (constant), and the heat transfer coefficient kij with all other sub-channels (also constant). This data is
sufficient to write an enthalpy balance of subchannels M and to formulate system of M-differential equations
d
[T ]  [[ A]]  [T ]
dx
This system is solved by previous procedure (finding the eigenvalues and eigenvectors of [[A]] and
solving separated equations). The result is a vector of temperature profiles in M subchannels, expressed
by M-coefficients of yet unknown vector [d]
[T ( x)]  [[U ]] [[ex ]] [d ]

From this equation we can determine the input and output temperatures of M subchannels (substituting
the coordinates [x '], [x'']). Some of the inputs/outputs of subchannels are input/output channels (ie the
whole heat exchanger), some express only and internal linking. These links of subchannels are
represented by binary matrix [[G]]MxM whose rows correspond to the inputs and outputs of the column
(Gij=1 means that the input of i-th sub-channel is the output of j-th sub-channel), by the matrix of inputs
[[G ']]MxN (G'ij=1 means that the input of i-th subchannel is the input of j-th stream) and by the matrix of
outputs [[G'']]NxM (G''ij=1 means that the output of i-th stream is and the output of j-th sub-channel).
NAP5
ODE heat exchangers
N-coefficients of [d] is determined from the boundary conditions (the prescribed inlet temperature at N
streams). The requirement that the outlet temperature of subchannels are simultaneously input temperature
subchannels downstream (it is defined by matrix [[G]]), represents the missing M-N conditions.
Inlet temperature of all subchannels are therefore either the heat exchanger inlet temperature or outlet
temperature of the downstream sub-channel, ie

[T ( x' )]M  [[G ' ]]MxN  [T ' ]N + [[G ]]MxM  [T ( x' ' )]M
[[U ]]MxM  [[e x ' ]]MxM  [d ]M  [[G ' ]]MxN  [T ' ]N + [[G ]]MxM  [[U ]]MxM  [[e x '' ]]MxM  [d ]M
([[V ' ]]MxM  [[G ]]MxM  [[V ' ' ]]MxM )  [d ]M  [[G ' ]]MxN  [T ' ]N

 U11e 1x1 ' U12e 2 x1 ' ... U1M e M x1 ' 


 1 x2 ' 2 x 2 ' M x2 '

U e U 22e ... U 2 M e 
[[V ' ]]   21 
 ... 
U e 1xM ' M x M ' 
 M1 ... U MM e 
Previous relationship is a system of M linear algebraic equations for the coefficients [d] and for example
the output temperatures of the whole heat exchanger can be expressed as follows

[T '']N  [[G '']]NxM  [[V '']]MxM  ([[V ']]MxM  [[G ]]MxM  [[V '']]MxM ) 1  [[G ']]MxN  [T ']N

Xing Luo, Meiling Li, Wilfried Roetzel: A general solution for one-dimensional multistream heat exchangers and their
networks. International Journal of Heat and Mass Transfer 45 (2002) 2695–2705
NAP5
ODE heat exchangers
The previous method is appropriate when the ODE are linear and if there exists an
analytical solution. If the coefficients of heat transfer are not constant (but are
independent of the temperature) the exchanger channels can be divided into
smaller subchannels with constant mean values k (see above). If the coefficient k
is temperature dependent, it would be necessary to repeat the process iteratively
(and in each iteration to solve their own eigenproblem for the matrix [[A]]
depending on temperature).
It is alternatively possible to use numerical integration (repeated solution of the initial problem): Missing
initial condition (x=0) must be estimated and gradually refined in repeated integration (eg by Runge Kutta)
so as to best meet the remaining boundary conditions (for x=L). This is called the shooting method
and it's actually an optimization problem of minimization the norm of the difference between the prescribed
boundary conditions and numerical prediction for x=L (in MATLAB the function fminsearch optimizes the
parameters of missing initial conditions).
You can try a different approach of estimating the missing initial conditions at x=0, execution of integration
from x=0 to x=L, and then carry out the solution in the reverse direction from x=L to x=0, but with the
predicted values (x=L) replaced with prescribed boundary terms. The whole procedure must be repeated
several times (zig zag method) and not always converge (see next example).
NAP5
ODE heat exchangers
Example of two channels HE of length L=1, T1’=90
90
cocurrent and countercurrent arrangement 85

solved by Runge Kutta in MATLABu (ode45) 80

75

definition of ODE for counter 70


definition ODE for
current (differs only by sign)
cocurrent 65

function dtdx=dts(x,t) function dtdx=dtp(x,t) 60

dtdx=zeros(2,1); dtdx=zeros(2,1); 55
w1=1; w2=2; k=1; w1=1; w2=2; k=1; 50
dtdx(1)=-k/w1*(t(1)-t(2)); dtdx(1)=-k/w1*(t(1)-t(2));
dtdx(2)=k/w2*(t(1)-t(2)); dtdx(2)=-k/w2*(t(1)-t(2));
45 T2’=40
40
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
cocurrent arrangement is
INITIAL problem
90
(therefore easy) >> sol=ode45(@dts,[0 1],[90 40]);
>> plot(sol.x,sol.y) 80
T 1’
countrercurrent by the
70
zig-zag method
s=ode45(@dtp,[0,1],[90,50]);
for i=1:10
60
n=length(s.x);
s=ode45(@dtp,[1,0],[s.y(1,n),40]);
50
n=length(s.x);
s=ode45(@dtp,[0,1],[90,s.y(2,n)]);
end 40 T 2’
plot(s.x,s.y)
30
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
NAP5
ODE dryers, extractors…
Flow-through (continuous) devices such as contactors, reactors or dryers (co-
current, counter) are solved almost as well as heat exchangers. Only the
balancing equations of heat transfer are added to equation analogous to the
mass transfer.
So, again the numerical integration methods (Runge Kutta), method of
shooting, etc. are used

Example:
Bruce D.M., Giner S.A.: Mathematicall Modelling of Grain Drying in Counter-flow Beds.
J.Agric.Engng.Res. (1993),pp.143-161
Solution by Euler, Runge Kutta, shooting method.
NAP5
Pipelines networks
The piping network is
made up of straight
sections, bends and turns.
In a broader sense also by
machines like pumps,
accumulators, valves.
The aim is to determine the
pressure profile along the
pipe and flow distribution in
branches.

Different design procedure must


be applied in the case of

•nonstationary flow (effect of acceleration)


•compressible fluid or deformable walls
(hydraulic shock)
NAP5
Pipeline network
The basic element is a tube (of any section which may vary in the axial
direction). Flow characteristics in a certain place of the tube are the
pressure p(x) and the characteristic velocity u. Axial velocity profile is
fairly generally (even for compressible flow) described by the Navier
Stokes equation
v 1 v 2
p
( + )     2v +  g x
t 2 x x
The second term of the right side expresses the frictional losses which are a
function of flow rate, viscosity and the geometry of the channel. These
factors will be included into the coefficient k:
D equivalent diameter, A
cross section, m mass flow-
v 1 v 2 p m 2 DA2 rate
( + )  +  gx k
t 2 x x k (m, x) m

Friction loss dArcy Weissbach friction


coefficient, in laminar e.g. 64/Re

Integrating this equation in the pipe is obtained Bernoulli equation for


unsteady compressible fluid flow (this equation will be uses later ...).
NAP5
Pipeline network FEM, MWR Finite Element Method Method of Weighted Residuals

Consider a special case: a steady flow-rate, constant cross section. Derive the
previous equation  p k
(k )  gx
x x x
There is only the pressure p(x) in this equation, and the mass flow rate (which is
constant) was eliminated. The left side represents the friction loss, the right side
buoyancy (when the density depends on the temperature and the temperature
along the channel change). The coefficient k is constant in the laminar flow regime
and decreases with increasing Reynolds number in the turbulent regime.

This ordinary differential equation will be used for explanation of principles of the
method of weighted residuals (MWR) and its special variant of finite element
method (FEM). What is the residue of differential equations? What remains to
the right side, when all terms will transfer to the left

 p  k
(k )  g x  res ( x)
x x x
If p(x) is exact solution the
residual function res(x) is zero
NAP5
Pipeline network FEM, MWR Finite Element Method Method of Weighted Residuals

The method of weighted residuals collected from the possible options p(x) such that
nullifies integrals of residuals multiplied by the selected weight (test) function w(x)

 res ( x)w( x)dx  0


The solution is approximated by a linear model, a linear combination of basis
functions Nj(x) (which may even be normalised polynomials defined in elements)
N
p ( x)   p j N j ( x)
j 1

N unknown parameters pj requires at least N equations. Therefore, it is


necessary to select at least N different weighting function wi(x).
 N j k 
L N

 ( p j
0 j 1 x
(k
x
) g x
x
) wi dx  0 i  1, 2,..., N

The result is a system of N linear algebraic equations for N unknowns


N L
 N j L
k

j 1
p j (  wi
x
(k
x
)dx)   wi g x
x
dx
0 0
NAP5
Method of Weighted Residuals
The weighting function wi(x,y,z) are proposed in advance, more or less independently
to solutions. They can be of different types and correspond to the different numerical
methods

Spectral methods (analytical weight functions wi(x))


(orthogonal polynomials or goniometric functions are used as base and
weight functions. Analytical weights are used also in the Boundary Element
Methods BEM.)

Finite Element Methods (continuous weight functions)


(example is Galerkin’s method using the same base and weight functions.
xi
FEM is preffered in structural analysis, see software ANSYS)

Finite Volume Methods (discontinuous, stepwise functions)


(also Control Volume Method. Most
frequently used in fluid mechanics, see wi  h( x  xi 1 / 2 )  h( x  xi +1 / 2 )
software FLUENT) xi

Collocation Methods (zero residuum in nodes. Weights are delta functions)


(also Finite Difference Method. Suitable for
complicated problems in simple geometries, wi   ( x  xi )
easy programming)
xi
NAP5
Finite Elements and Volumes
System (e.g.pipes) is divided into finite elements with nodal points on the element
boundaries (element is a section of pipe between two nodes). Each node (i) is
assigned one weighting function wi(x), one basis function Ni(x) and the one
calculated value (pressure pi).

xi wi(x) xi wi(x)
FEM - weight functions FVM weight functions are
x are continuous and first
derivative exists
x discontinuous at finite
volume boundaries

Solution inside a finite element is defined by interpolation of nodal values at


boundary. At finite volumes there is only one (internal) node associated with the finite
volume and therefore the solution is approximated by a constant.
Remark: A prototype of FVM are compartment models (aim was calculation of
temperatures and concentrations the same in the whole compartment). FEM aims to
calculate values at element boundaries, i.e. parameters of streams connecting
compartments. FVM satisfies the balances of control volume (it follows from principle
of control volume), while FEM need not satisfy the conservation exactly (and this is
disadvantage of FEM).
NAP5
Finite Element Method
Basis functions Ni(x) are generally constructed so that they are equal to 1 at
node i and zero at all other nodes (1, ..., N). Basis function Ni(x) is a non-zero
only in the element that contains the node number i
It is possible to use identical base and weight functions (for example element-
wise linear polynomial pressure and weights). Identification of weight and base
functions (wi(x)=Ni(x)) is a characteristics of Galerkin’s method.
Integrand of the residual integral is the product of weight function and the
second derivative of base function. Because the weight function in FEM is
continuous its first derivative exists and it is possible to transform the integral by
per partes method Kij bi

N i N j  k
N L L
 p j (  k dx)   N i g x dx
j 1 0
x x 0
x
Matrix coefficients Kij and right side vector bi are integrals over the entire pipe
network (L is the total length of all branches). These integrals are calculated as
the sum of integrals over individual finite elements.
NAP5
Finite Element Method
In a general finite element only two base and weighting functions corresponding to
two nodes i, j are nonzero. The element therefore contributes only to 4 entries of the
matrix (Kii, Kjj Kij Kji). Because the derivatives of linear Ni(x) are constant the integral
contribution of element is calculated easily as
Ni Nj
ke  1 1
[[ K ]]e    j
Le  1 1  i
Le

Assembly algorithm = element matrix addition into the K=zeros(n,n);


subroutine
calculating Ke
global system matrix (and right side vector). In the cycle b=zeros(n,1);
through all elements a procedure calculating the local for e=1:ne
[Ke,be]=local(e); connectivity
matrix for a given flow rate and geometry is called and the for i=1:2
matrix

matrix is added to the global array. Correspondence ig=c(e,i);


between the local indices (1,2) and the global indexes b(ig)=b(ig)+be(i);
for j=1:2
must be defined in the matrix connectivity c whose rows
jg=c(e,j) ;
correspond to the elements and in the two columns are K(ig,jg)=K(ig,jg)+Ke(i,j);
indices i, j nodes of each element. This is actually defined end
by the network topology. end
end
NAP5
Finite Element Method
Physical interpretation: Product of local matrix of one element [[K]]e by the vector
of calculated pressures results to the mass flowrate through the element (e), more
specifically flowrate from node i to the node j
 K iie K ije   pi   bie   m i 
e
 e     e    e 
K
 ji
e  
K jj   p j   b j   m j 
Assembly of local matrices represents requirement that the sum of
oriented flowrates through any node is zero.

The assembled matrix [[K]] is singular in this phase, as soon as the boundary
conditions are not specified (and distribution of pressures is not unique). The
boundary conditions have to be prescribed at all end-nodes of mesh:
End pressures (the correponding row of [[K]] is substituted by 1 at diagonal and
the right hand side is prescribed pressure).
As soon as the mass flowrate is prescribed at an end-node the flowrate is
substituted as the right hand side bi.
NAP5
Finite Element Method
System of linear algebraic equations can be solved either by direct methods
(characterized by a finite number of steps, example is Gauss elimination method,
frontal method ) or iteration methods (e.g. Gauss Seidel overrelaxation, or method
of conjugated gradients). The system matrix [[K]] is sparsed (in a row
corresponding to a node connecting only 2 elements are only 3 nonzero entries)
and therefore special storage methods are used for sparse matrices, e.g.
Band Sky Line
matrix matrix

Profit is not only a memory saving but first of all speed of computation. For example
the Gauss elimination with a full and asymetric matrix N x N requires N3/3 floating
point multiplication. Using the band matrix algorithm the number of operations is
reduced to N.Nb2/2, where Nb is the band width.
For small problems (for example pipe networks) it is sufficient to use a standard
Gauss eliminatiom and to write the solution of [[K]][p]=[b] in MATLAB as
p=K\b
NAP5
Finite Element Method
Matrix of equations for nodal values of pressures is a constant only at
laminar.flows. For turbulent or non-Newtonian flows the matrix [[K]] is a function of
Reynolds number and calculated pressure drop (k(p)). The system is non-linear
and must be solved iteratively
[[ K ( p ( k 1) )]][ p ( k ) ]  [b]
where k is index of iteration (and a new matrix [[K]] must be assembled at each
iteration).
Systém of nonlinear equations can be used by previously introduced substitution
method (Picard) or by using Newton Raphson method, that is a straightforward
generalisation of Newton‘s tangent-line method. The method is based upon Taylor
expansion of residuals.

( k 1)
N N N
K ( p ) ( k 1)

j 1
K ij ( p ( k 1)
) p ( k 1)
j  bi +  ( 
j 1 m 1
im

p j
pm + K ij ( p ( k 1)
))( p (k )
j  p ( k 1)
j )0

residuum  residuum / p
NAP5
Finite Element Method
Historical remark: Galerkin method and FEM

In russsian literature the Galerkin method is referred to Bubnov method published in 1914 (Bubnov
I.G.: Stroitelnaja mechanika korablja. II. SPB-Tipografija morskogo ministerstva – Bubnov was a
designer of battleships). Galerkin published his works later Galerkin B.G. K voprosu ob issledovajii
naprjazenij i deformacij v uprugom izotropnom tele, Doklady Akademii Nauk SSSR, 1930, Ser.A,
No.14, s.353-358. FEM application of Galerkin method was developed much later in connection to
analysis of catastrophes of british jet-liners Comet. Turner M.J. et al: Stiffness and deflection analysis
of complex structures. J. of Aeronautical Sciences, 23, pp.805-823 (1956).
NAP5
Pipe networks – circulation model
Fluid flow in a model of blood circulation (physical model in the laboratory of
cardiovascular mechanics). The model demonstrates that the FEM need not be
designed by Galerkin or even by weighted residual methods (in this case only
Bernoulli and continuity equations are used).
NAP5
Pipeline network - nodes
Nodal parameter are pressure p and the volumetric flowrate Q. It means that nodes
cannot be located at the branching points, where the flowrate is not defined!

Y [m] 19 18 Number of unknowns 2N-Nb,


16 where N is number of nodes and Nb
28
15 is number of end-points (where either
27 17 flowrate or pressure is prescribed as
14 22 a boundary condition)
20 29

9 7
25 24
12 6 21
26 8 5
10
11 It is not possible to define
13 pressure and flowrate at a
node simultaneously!!!
4 3
23

2 n Prescribed pressure p, calculated Q


m Calculated pressure and flowrate
k Auxilliary node defining geometry of branching

1
-0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 X [m]
NAP5
Pipeline network - elements
Two different FE: two-nodes element generate 2 equations (Bernoulli’s equation
along streamline between nodes 1,2 and continuity equation) and a three-nodes FE
generating 3 equations (Bernoulli 1,2 and 1,3 plus continuity equation). Equations of
system are not generated by assembly of elements contributions. Equations are
generated directly at an element level. Number of unknowns agrees with the
number of generated equations: Number of
2N-Nb = 2Mp+3Mv elements BRANCH

Number of
Number of nodes
elements PIPE
d x2,y2,z2 p2,Q2
Number of end-
nodes

x1,y1,z1 p1,Q1

x2,y2,z2 p2,Q2
V1(2,3,4,23,d1,d2,d2) x3,y3,z3 p3,Q3

P1(1,2,d1) d1
x4,y4,z4

x1,y1,z1 p1,Q1
NAP5
Pipeline network - Bernoulli
Previous solution is based upon Bernoulli equation derived by integration of
momentum balance along streamline between nodes 1 and 2

dv  2 2 p2  p1
L12 + (v2  v1 ) + + g x ( x2  x1 ) + ez12  0
dt 2 
The last term ez12 , energy loss [J/kg], depends on flowrate Q, apparent viscosity,
local losses, seez E.Fried, E.I.Idelcik: Flow resistance, a design guide for engineers, E.I.Idelcik:
Handbook of hydraulic resistances.

d 128 LQ 38 8Q 2
L ez12  t 4 + (1.2 + ) 2 4
 d Re  d

Q2
8Q12 300Q1 128 Q1L1 Q2 L2
d2 Q3 ez12  2 4 (k + 1) 12t + + (  +  )
 d1 d1 
t1 t2
L2 3
d14
d24

d1
p1  p2 150
L1  12   (k + 1) 12t +
v1 2
Re1
2
Q1
NAP5
Pipeline network MATLAB
MATLAB possible solution: mainpq.m

Input data files:

xyz.txt xyz (coordinates of nodes)

cb.txt i pq (boundary conditions i-node, +pressure, -flowrate as pq)

cp.txt i j d (connectivity matrix, diameter of pipe)

cv.txt i j k l d1 d2 d3  (connectivity for branching, diameter of pipes, branching angle)


NAP5
Truss, beam, shells

In this chapter you will se similarity


between calculation of pressures and
flowrates in pipelines and calculation of
forces and sisplacements in a frame
structure.
NAP5
Truss, beam, shells FEM
What is the difference between trusses and beams? Both are rods but
trusses are connected by joints (no moment can be transfered) while beams
are welded and are deformed by bending and torsional moments.
The same differences characterise membranes and shells. Membrane is an
analogy of truss (no bending moments, unlike shells).
Bernoulli beam deformed cross section remains perpendicular to the beam
axis
Timoshenko beam: deformed cross section remains planar but not
perpendicular to axis (effect of shear)

Analogy in shells
Kirchhoff plate – cross section perpendicular to the deformed mid plane
9analogy to Bernoulli beam)
Mindlin plate is analogy to Timoshenko beam
NAP5
Truss, beam, shells FEM
Following examples share the following features:
Solution is based upon deformation method, calculating displacements and
rotations at nodes (stresses are calculated ex post).
Deformation method corresponds to Lagrangean principle of minimum of total potentiual energy. There exist another
principles based upon complementary energy (Castiggliano) when primary results are forces or hybrid principles (Hu
Waschizu) calculating both kinematic and dynamic varibles as primary unknowns..

Basic result of each example are element matrices (local matrices)


implemented as MATLAB functions. You can copy these functions and use
them for solution of particular problems.
NAP5
Truss FEM
Frame construction from trusses is computationally identical with the calculation
of pressures in pipeline networks. Instead of pressures are displacements of
nodes, the stiffness coefficient (cross-section x Young modulus) replaces the
friction factor and buoyancy is substituted by continuous load.
 2u x fx(x), ux(x)
EA 2 + f x  0
x
Weighted residual method results to algebraic equations for displacements
Kij
bi
N i N j
N L L
 u xj (  EA dx)   N i f x dx
j 1 0
x x 0 Remark: FUNCTIONALISTs would
derived the same result in a simpler
way by minimising potential energy
L
1 du
and also the stiffness matrix is identical W   ( EA( x ) 2  f xu x )dx
0
2 dx

EAe  1 1
[[ K ]]e   
Le  1 1 
NAP5
Trusses FEM
In this way it could be possible to solve only the simplest 1D problem of serially
connected springs in the direction x. Nodal displacements are generally vectors
ux,uy (2D case), uz (3D case).
Local matrices must be transformed to a global coordinate system shared by all
finite elements. For example the local element matrix 2 x 2 is to be transformed to
4 x 4 matrix in planar construction (each node is characterized by two
displacements ux, uy).
Transform from local to global coordinatge system concerns only rotations (one
rotation at 2D and three rotations at 3D frames).

Local coordinate system (axis ) Global system x,y (c=cos, s=sin)

y
u  ux1   Fx1   c 0
 
uy
   
ux  u 1   c s 0 0   u y1   F s 0   F 1 
 
y1
u   Fx 2   0  

u
   0 0 c s  x2 c   F 2 
x 2
     
 uy2   y2   0
F s
NAP5
Trusses FEM
Equations in local coordinate system
EAe  1 1  u 1   F 1 
     
Le  1 1   u 2   F 2 
After transformation
c 0  ux1   Fx1 
     
EAe  s 0   1 1 c s 0 0   u y1   Fy1 
   
Le  0 c   1 1  0 0 c s   ux 2   Fx 2 
     
0 s u F
 y2   y2 
Final matrix in thee coordinate systém x,y
 c2 cs c 2 cs 
 2 >> t=[c^2 c*s;c*s s^2];
EA cs s 2
cs  s 
[[ K ]]e  e  2 >> ke=[t -t;-t t]
Le  c cs c 2 cs 
 
2 
  cs  s 2
cs s 
NAP5
Truss
Example 5
x=[0 1 0 1 2]; y=[0 0 1 1 2];
y con=[1 3; 2 3; 2 4; 3 4; 3 5; 4 5];
e5 a=[4e-4 4e-4 4e-4 4e-4 4e-4 4e-4];
e6 nu=length(x)
3 e4 ne=length(a)
4 n=2*nu;
k=zeros(n,n);b=zeros(n,1); assembly
e1 e2 e3 for e=1:ne
[kl,ig]=kloc(e,x,y,con,a);
x k(ig(1:4),ig(1:4))=k(ig(1:4),ig(1:4))+kl(1:4,1:4);
end
1 2 for i=1:4
k(i,:)=0;k(i,i)=1; nulové posuvy v uzlech 1,2 a
end zatížení -100N v uzlu 5 (ošklivé
řešení, platí jen pro danou topologii)
b(n)=-100;
Connectivity matrix p=k\b;

function [kl,ig]=kloc(ie,x,y,con,a) Gauss elimination. Vector


p are displacements
E=200e9;
ae=a(ie);
i1=con(ie,1);i2=con(ie,2);
ig=[2*i1-1 2*i1 2*i2-1 2*i2];
le=((x(i1)-x(i2))^2+(y(i1)-y(i2))^2)^0.5;
c=(x(i2)-x(i1))/le;s=(y(i2)-y(i1))/le;
td=E*ae/le*[c^2 c*s;c*s s^2];
kl=[td -td;-td td];
Stiffness matrix
of element
NAP5
Beams (pipes)
Displacement of neutral axis of a straight beam is described by
differential equation of the fourth order
Fx
z
 4u z  2u z x
EI 4 + Fx 2 + kuz  f z
x x fz

where I is inertia moment of cross section, Fx is axial force, k is stiffness of support


and fz(x) is continuous transversal load. Corresponding residual integral is

b
 4  uzj N j  2  uzj N j
 Ni ( EI
j
+ Fx j
+ k  uzj N j  f z )dx  0
a
x 4
x 2
j

Per partes integration is applied twice with the aim to decrease order of derivatives
 2 Ni  N j Ni N j
b 2 b

j [ (EI x2 x2  Fx x x + kNi N j )dx]uzj   Ni f z dx


a a

The terms at boundary points resulting from per partes integration are neglected.
This is consistent with the assumption that strong boundary conditions (fixed
deformations) are applied or that there is no loading at boundary (free ends).
NAP5
Beams (pipes)
If you are not interested in details, skip these gray pages

The Bernoulli beam is described by ODE, relating bending moment M and resistive moment
 2u z
EI 2  M ( x)
x
Where the second derivative is a measure of curvature (1/d 2u/dx2 radius of circular arc).

Bending moment can be caused by transversal force (reaction M=Fz(b-x)), but also by axial force Fx
2M F  2u z  4u z  2u z
M F ( x)  (uz (b)  uz ( x)) Fx    Fx 2  EI 4 + Fx 2  0
x 2 x x x
This equation is a basis for stability analysis of axially loaded beams (Euler stability).

Bending moment M(x) corresponding to isolated transversal forces is only a linear function of x-coordinate and its second
derivative is zero. Only a continuous transversal loading or a continuous elastic support give moments with non-zero second
derivative

b x
M 2M  4u z
b
M ( x)  
0
 f z ( x +  )d  
x
   f z ( )d  
x
 x 2
 f z ( x)  EI 4  f z ( x)
x
b
x  Derivative of integral with
variable upper bound
M(x) M(x)
fz
NAP5
Beams (pipes)
Lets return back to the weighted residual method

 4u z  2u z
b

a w(EI x4 + Fx x2 + kuz  f z )dx  0


Twice applied per partes to the first term and once applied per partes to the second term give

 2 w  2u z w u z  3u z u z w  2u z b
b

a (EI x2 x2  Fx x x + w(kuz  f z ))dx + [w( EI x3 + Fx x )  EI x x 2 ]a  0


New terms corresponding to boundary conditions at ends of beam are expressed in terms of moments and forces
Fz(b)

 2 w  2u z w u z w
b M(b)

a x2 x 2  +   + a 0
b
(EI F w( ku f )) dx [ wF M ]
x x x
x z z z
M(b)
Fz(a)

In previous derivation of Galerkin approach these terms were neglected.


NAP5
Beams (pipes)
Strong and weak boundary conditions
Degrees of freedom (DOF) of the systém taken as a stiff body should be eliminated by STRONG boundary conditions
(nodal displacements and rotations). Strong BC are implemented easily by zeroing corresponding row of the system
matrix with the exception of diagonal element that is substituted by one and by specifying prescribed displacement as
the right hand side. If strong BC are satisfied at all approximations than the limit of approximations satisfies the BC too.
However, some boundary conditions cannot be specified as strong but WEAK (conditions containing first derivatives in
case of second order differential equations). But it is questionable whether they will comply with the prescribed
conditions and limitations of numerical solutions for refining the network elements. Not always, at least not when the
differential equation simply does not prescribe any parameter as a strong boundary condition. An example is the
equation of the beam entered the second derivative of the deflection lines
 2u w u z u z L
L L
M EI 2z  M ( x)
x
 0 x x
EI dx  [ wEI
x
]0 =   wMdx
0

Cantilever beam loaded constant torque M. Linear The same task, but using the cubic basis functions.
basis functions. Nodes have a single parameter, Nodal parameters are displacement and rotation.
the displacement uz. Zero rotation at the fixed (x Zero rotation can be prescribed, but the solution with
= 0) or not possible to prescribe. a large number of elements ignores this condition
5 5

4 Exact solution
Mx 2 In the solution shown in the 4 20 elements
uz ( x) 
3

2 2 EI figures this term is neglected, we


assume that Natural boundary 3 1 element
1
conditions hold. Is it not the cause
0 of failure? 2 2 elements
-1
1 3 elements
-2
3 elementy
-3
0
-4
20 elementů
Exact solution
-5 -1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
NAP5
Beams (pipes)
u z L
Neglecting the term  [ wEI ]0 assumes zero duz/dx at the end-point L. The equation
x
of weighted residuals method is really trying to accomplish (this is evident from the previous figures, where an approximation of the deflection line
by linear and cubic polynomials respect this unwanted boundary condition). When we include the boundary term into the stiffness matrix, the
result will be improved (for cubic polynomials solutions will be even accurate), but the boundary condition of zero rotation is not satisfied when
using linear polynomials. It is due to the fact that for second order differential equations only displacements can be applied as the strong boundary
condition. The first derivative of displacement (rotation) can be prescribed as a strong boundary condition only for the fourth-order equations.

5 5 Řešení uvažující člen


u z L
Linear base functions  [ wEI ]0
4 4 Cubic base x
3 3
Arbitrary number of
2 2
elements
3 elements 20 elements

1 1

0 0

-1 -1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1

Boundary conditions, which a priori ensures each approximation solutions are called strong, while the boundary conditions
transferred to the integral formula MWR application integration by parts are weak. For differential equations 2s-th order
weak boundary conditions in a least s-normal derivatives, boundary conditions with lower derivatives are strong. For
second order differential equations are strong boundary conditions prescribed values and weak conditions include the first
derivative, while the fourth order equation (like bending plates) are strong boundary condition values and first derivative
(displacements and rotations, ie kinematic conditions), poor conditions concern until the second or third derivative (stressful
conditions, the second derivative of corresponding moments M = EId 2u / dx2, the third derivative of a rolling force F = -EI
d3u / dx3). Compliance with weak boundary conditions is a matter of correct choices integral formula for the method of
weighted residuals and can not enforce them by fixing the nodal parameters.
NAP5
Beams (pipes)
The final formulation of the Galerkin method of weighted residuals for
Bernoulli’s beam on elastic foundation
Fz

M
Fx
z
x
fz

 2 Ni  N j Ni N j Ni
b 2 b

j  x2 x2 x x x
[ ( EI  F + kN i N j ) dx ]u zj   N i f z dx + [ N i Fz +
x
M ]b
a
a a

Stiffnes matrix Continuous


Forces and
[[K]] load
moments

Remark.: Do not forget that this is still only very simplified model of the beam, functioning only
for small deformations, slender beams (not considering shear forces as Timošenko model) and
does not even have axial stiffness. The model calculates only with a bending stiffness!
NAP5
Beams (pipes)
Significant difference from the problem with trusses is that there are now the
second derivatives of basis functions in the integrand and therefore it is not
possible to use linear polynomials - basis functions must be constructed so as to
have a continuous first derivative, for example the Hermite cubic polynomials
Base function having zero first
Basis function equal to 0 on all
derivative e at all nodes and in a
nodes and in single node is the
single node the value is 1
first derivative equal to 1 N zi ( x)

N di (x)

i i+1
( x  xi 1 ) 2 ( x  xi ) i i+1
( x  xi 1 )2 (3xi  xi 1  2 x)
N di ( x)  N zi ( x) 
Expression of
deflection line
( xi  xi 1 )2 ( xi  xi 1 )3

uz ( x)  uz1N z1 ( x) + 1Nd1 ( x) + uz 2 N z 2 ( x) + 2 N d 2 ( x)
Substituting Hermite polynomials into integrand results to a system of linear
algebraic equations whose matrix is the sum of three matrices
[[ K ]]  [[ K M ]]  Fx [[ K F ]] + [[ M ]]
[[KM]] bending stiffness, [[KF]] geometrical stiffness, [[M]] is mass matrix
NAP5
Beams (pipes)
Results for element of length L

Nodal parameters
 u zi  (transversal displacement
  and rotation)

 i 
 12 6 L 12 6 L 
 6 L 2 L2 
 2 Ni  N j
2
1 L
EI  4 L2
[[ K M ]]   EI dx  3
0.8
 x 2
x 2
L  12 6 L 
 
0
Stiffness matrix
0.6
N1  sym 4 L2 
N2
0.4 N3

 36 3L 36 3L 
N4

 3L  L2 
0.2

Ni N j 4 L2
L
1 
0
[[ K F ]]   dx 
  30 L  36 3L 
0 0.5 1

x x
 
-0.2
0
Geometry stiffness
 sym 4 L2 
 N1  1  3( x / L) 2 + 2( x / L)3 
 2  156 22 L 54 13L 
 2N  x (1  2 x / L + ( x / L ) )
L  4 L2 13L 3L2 
 N3  3( x / L) 2  2( x / L)3  [[ M ]]   kNi N j dx 
kL 
  420  156 22 L 
 N 4  x (  x / L + ( x / L) ) 
2
 2 
0

 
Mass matrix
sym 4 L
NAP5
Beams (pipes) MATLAB
 12 6 L 12 6 L 
 4 L2 6 L 2 L2 
EI
function [kstif,kgeom,mass,ig]=kloc(ie,x,y,con,ei,k) [[ K M ]]  3 
L  12 6 L 
EI=ei(ie);E=200e9;  
i1=con(ie,1);i2=con(ie,2);  sym 4 L2 
ig=[2*i1-1 2*i1 2*i2-1 2*i2];
l=((x(i1)-x(i2))^2+(y(i1)-y(i2))^2)^0.5;  36 3L 36 3L 
kstif=EI*E/l^3*[12 6*l -12 6*l;6*l 4*l^2 -6*l 2*l^2;  4 L2 3L  L2 
1 
-12 -6*l 12 -6*l;6*l 2*l^2 -6*l 4*l^2]; [[ K F ]] 
30 L  36 3L 
kgeom=1/(30*l)*[36 3*l -36 3*l;3*l 4*l^2 -3*l -l^2;  
-36 -3*l 36 -3*l;3*l -l^2 -3*l 4*l^2];  sym 4 L2 
mass=k*l/420*[156 22*l 54 -13*l;22*l 4*l^2 13*l -3*l^2;
54 13*l 156 -22*l;-13*l -3*l^2 -22*l 4*l^2]; 156 22 L 54 13L 
 4 L2 13L 3L2 
kL 
Nodal [[ M ]] 
 u zi  parems 420  156 22 L 
   
 i   sym 4 L2 

These matrices can be used to construct several elements, but only oriented
along the axis x (mass matrix will be use when analyzing vibration of beams,
geometric stiffness matrix for the investigation of stability). In each node are two
calculated parameters, deflection and bending angle of deflection. We can not use
the coordinate transformation for rotating the truss beams as well as for rods,
because the cantilever element has zero stiffness in the x direction. The addition
of stiffness matrix of the beam stiffness of the element type of rod is shown in the
following example.
NAP5
Beams frame 1/3
Stiffness matrix of steel beam + truss
uy z
function [kstif,ig]=klocp(ie,x,y,con,ei,ea)  AL2 AL2 
EI=ei(ie);EA=ea(ie); E=200e9;  I 0 0  0 0 
i1=con(ie,1);i2=con(ie,2); ux  I 
ig=[3*i1-2 3*i1-1 3*i1 3*i2-2 3*i2-1 3*i2];  12 6 L 0 12 6 L 
l=((x(i1)-x(i2))^2+(y(i1)-y(i2))^2)^0.5; EI  4 L2 0 6 L 2 L2 

[[ K ]]  3
c=(x(i2)-x(i1))/l;s=(y(i2)-y(i1))/l; L  AL2 
r=[c s 0;-s c 0;0 0 1];z=zeros(3,3);  0 0 
 I 
Q=[r z;z r];
 12 6 L 
km=EI*E/l^3*[EA*l^2/EI 0 0 -EA*l^2/EI 0 0;  sym
0 12 6*l 0 -12 6*l;  4 L2 
0 6*l 4*l^2 0 -6*l 2*l^2;
-EA*l^2/EI 0 0 EA*l^2/EI 0 0;
0 -12 -6*l 0 12 -6*l;
Previous matrix [[KM]] extended by first and fourth
0 6*l 2*l^2 0 -6*l 4*l^2]; rows and columns (inserting stiffness matrix of
kstif=Q'*km*Q; truss)
Transformation to global
coordinate system

Transformation stiffness matrix from local to global coordinates [[K]]=[[Q]]’[[Ke]][[Q]]


Generalised
 C S 0 0 0 0
displacements
  S C 0 0 0 0
uy z   Generalised loads
 0 0 1 0 0 0
 Q , C  cos , S  sin 
 u xi   Fxi 
 0 0 0 C S 0  
 0 0 0  S C 0  u yi   
ux
     Fyi 
 0 0 0 0 0 1  i M 
 i
NAP5
Beams frame 2/3
Nodal coordinates, connectiv ity matrix, assembly, boundary values
spacification and solution of systém is the same as with trusses

Inertia moment for pipe I ( D24  D14 )
Square cross section 1x1 cm. 64
bh3
Area 1e-4 m2, inertia moment Inertia moment for rectangular profile I
I=8.3333e-10 m4 12

2 e2 3 x=[0 0 1]; y=[0 1 1];


con=[1 2; 2 3];
ei=[8.3333e-10 8.3333e-10];ea=[1e-4 1e-4];
nu=length(x)
ne=length(ea)
Fy=-100 N
n=3*nu;
k=zeros(n,n);b=zeros(n,1);
for e=1:ne
e1 [kl,ig]=klocp(e,x,y,con,ei,ea);
x k(ig(1:6),ig(1:6))=k(ig(1:6),ig(1:6))+kl(1:6,1:6);
1 end
for i=1:3
k(i,:)=0;k(i,i)=1;
end
Zero displacement and rotation
b(n-1)=-100; in node 1 and load -100N at
p=k\b; node 3
NAP5
Beams frame 3/3
Result is vector of nodal parameters p(1:9), generalised displacements
p=
-0.0000 ux1
0.0000 uy1
0 1
0.3000 ux2
-0.0000 uy2
-0.6000 2
0.3000 ux3
-0.8000 uy3
-0.9000 3

Internal forces and moments are calculated as the product of stiffness matrix of
particular element times displacement vector (in this element). For example element 2
f=kl*p(ig(1:6))
kl local stiffness matrix
f= ig selects 6 corresponding displacements
from the vector of global displacements p.
0 Fx2
100.0000 Fy2
100.0000 M2 arm of force 1m, force 100 N

0 Fx3
-100.0000 Fy3
0.0000 M3
NAP5
Rotationally symmetric shells
In rotationally symmetric vessels loaded eg. by internal pressure exist normal
membrane stresses (formulas of type pr / s), but at the locations, where the
curvature or thickness of wall changes, bending and shear stresses appears (wave
of stresses in range typically (rs) ). The vessel is then to be understood as a shell.
FEM systems, e.g. ANSYS, COSMOS, ... always contain spatial shell elements
(curved triangles or quadrangles), but for application to rotationally symmetric shells
are sufficient and important only 2-nodal elements (representing a conical ring).

Perhaps the most successful element of this type already suggested about 30 years ago ing.Vykutil (VUT
Brno), is implemented in Femina and is easy to write in MATLAB

See Schneider P., Vykutil J.:Aplikovaná metoda konečných prvků, skripta VÚT Brno, 1997.

ukázky grafických výstupů programu


FEMINA (Vykutilovský element)
NAP5
Rotationally symmetric shells
Element representing the conical ring has two nodes and each node 3 parameters:
displacement in the axial direction ux, uy radial direction and rotation .
N
r=y 2  u x1 
 
ur1 M  u y1 
rz1=  
 [u ]   1 
1
ux1  ux2 
u 
 y2 
r  
x  2

Stiffness matrix has dimension 6x6


[[ K ]]e  rL[[ B]]T  [[ D]]  [[ B]]
Derivatives of base

Elastic constants 1  0 0 0  functions


   c  s 0 c s 0 
 1 0 0 0   L L 
 h2  h2   0 0 0 0 
Eh  0 0   
0 2r 2r
  12 12  1 0 0 1 0 0 1 
[[ D]]5 x 5
1  2  [[ B]]5 x 6 
 h2 h2  L 0 sL sL 
0 0 0  0 0 0
12 12  2r 2r 
   L L
 5(1   )   s c s c 
0 0 0 0   2 2 
 12 
NAP5
Rotationally symmetric shells
MATLAB

function [kstif,bp,ig]=kloc(ie,x,y,con,he,pe)
% kstif(6x6) matice tuhosti, bp(6) zatížení tlakem, ig(6) indexy globální soustavy  c  s 0 c s 0 
% ie index elementu,x(),y() globalni souradnice, con(:,2) konektivita  L L 
 0 0 0 0 
% he() tloušťky stěn, pe() vnitřní přetlaky  2r 2r 
1 0 0 1
[[ B]]5 x 6  
E=200e9;mi=0.28;h=he(ie);p=pe(ie); 0 0 1 
i1=con(ie,1);i2=con(ie,2); L 0 sL sL 
0 0 0
ig=[3*i1-2 3*i1-1 3*i1 3*i2-2 3*i2-1 3*i2];  2r 2r 
 L L
r1=y(i1);r2=y(i2);  s c s c 
l=((x(i1)-x(i2))^2+(r1-r2)^2)^0.5;  2 2 
r=(r1+r2)/2;
c=(x(i2)-x(i1))/l;s=(r2-r1)/l;
b=1/l*[-c -s 0 c s 0; 1  0 0 0 
 
0 l/(2*r) 0 0 l/(2*r) 0;  1 0 0 0 
0 0 -1 0 0 1;  h2  h2 
0 0 s*l/(2*r) 0 0 s*l/(2*r); Eh  0 0 0 
-s -c l/2 s -c l/2]; [[ D]]5 x 5   12 12 
1  2
h 2
h2 
d=E*h/(1-mi^2)*[1 mi 0 0 0;  0 0 0 
mi 1 0 0 0;  12 12 
0 0 h^2/12 mi*h^2/12 0;  5(1   ) 
0 0 0 0 
0 0 mi*h^2/12 h^2/12 0;  12 
0 0 0 0 5*(1-mi)/12];
kstif=r*l*b'*d*b;
pl=p*l/8;
bp=[-pl*s*(3*r1+r2) pl*c*(3*r1+r2) 0 -pl*s*(3*r2+r1) pl*c*(3*r2+r1) 0];
Pressure loading
NAP5
Rotationally symmetric shells
Solution of system [[K]][u]=[b] is vector of generalized displacements,
for element with nodes 1,2
N
 u x1 
  r=y 2
 u y1  ur1 M
  rz1=

[u ]   1  1
 ux2  ux1
u 
 y2 
  x
 2

Eh Eh u x 2  u x1 u  u r1 u + u r1
5 generalized forces: N  (  +   )  [ cos  + r 2 sin  +  r 2 ]
1  2
1  2
L L 2R
N [N/m] meridian membrane force
Eh Eh u  u x1 u  u r1 u + u r1
N  (  +   )  [ ( x 2 cos  + r 2 sin  ) + r 2 ]
N [N/m] circumferential force 1  2
1  2
L L 2R

M [N] meridian moment Eh 3 Eh 3   1  + 1


M  (  +   )  [ 2 +  sin  2 ]
12(1   )
2
12(1   )
2
L 2R
M [N] circumferential moment
Eh 3 Eh 3   1  + 1
M  (  +   )  [ 2 + sin  2 ]
Q [N/m] transversal force 12(1   )
2
12(1   )
2
L 2R

5Eh u  u x1 u  u r1  + 1
Q [ x2 sin  + r 2 cos  + 2 ]
12(1 +  ) L L 2
NAP5
FEM 2D and 3D elements
Truss, beam, but also the rotary shell are typical 1D finite elements
corresponding to ordinary differential equations for displacement, deflection or
rotation of a single independent variable (length in the direction of the
coordinate axis of the element). Analogous equations for displacements,
deflections or rotations also applies to 2D or 3D elements (eg. triangles,
tetrahedrons, hexahedron ...). Basis weight functions and Ni are, however, a
function of x, y, z (again it may e.g. linear or Hermite polynomials). Application
of Galerkin method and implementation of assembly, boundary conditions and
the solution of system of algebraic equations is the same for 1D, 2D or 3D
elements.

The 2D and 3D problems differ from the 1D problems more or less formally,
because corresponding differential equations are partial differential equations
and not ordinary differential equations (because there is more than one
independent variable, x,y,z). A solution of partial differential equations will be a
subject of next lecture ...
NAP5
What is important

The lecture was devoted to solving boundary value problems


described by ordinary differential equations. It is quite extensive and
quite important, it is important to remember that a little more than
usual ...
NAP5
What is important
How to use solution of eigenproblem for transformation of
differential equations to separated equations
[[ A]]  [[U ]]  [[U ]]  [[ ]]
Weighted residual method. What is it weight function. Type
of weight functions used in spectral, finite element, finite  res ( x)w( x)dx  0
N
volumes and collocation methods. p ( x)   p j N j ( x)
j 1

 p k
FEM for solution of popeline networks (k )  g x
(incompressible fluid, steady state). x x x
N i N j  k
N L L
 p j (  k dx)   N i g x dx
Finite element PIPE j 1 x x x
ke  1 1
0 0

[[ K ]]e   
Le  1 1 
Assembly of elements to global matrix for e=1:ne
[kl,ig]=kloc(e);
k(ig(1:2),ig(1:2))=k(ig(1:2),ig(1:2))+kl(1:2,1:2);
end
NAP5
What is important
What is the difference between truss, beam and membrane, shell.
FEM for trusses

 2u x EAe  1 1
EA 2 + f x  0 [[ K ]]e   
x Le  1 1 
Transformation from local coordinate systém of element to global coordinate  u 
x1
systém x,y  
 u 1   c s 0 0   u y1 
  
 u 2   0 0 c s   ux 2 
u 
 y2 
FEM for beams. Cubic polynomials
 4u z  2u z
EI 4 + Fx 2 + kuz  f z
x x
Bending and geometrical stiffness, mass matrix
 2 Ni  N j N N j
L 2 L L

[[ K M ]]   EI dx [[ K F ]]   i dx [[ M ]]   kN i N j dx
0
 x 2
x 2
0
x x 0