III Solution of pde’s using variational principles
• Introduction• Euler-Lagrange equations• Method of Ritz for minimising functionals• Weighted residual methods• The Finite Element Method
4.1 Introduction
IntroductionVariational principles
• Variational principles are familiar in mechanics •the ‘best’ approximate wave function for the ground state of a quantum system is the one with the minimum energy•The path between two endpoints (t1, t2) in configuration space taken by a particle is the one for which the action is minimised
•Energy or Action is a function of a function or functions •Wave function or particle positions and velocities•A function of a function is called a functional
•A functional is minimal if its functional derivative is zero•This condition can be expressed as a partial differential equation
IntroductionHamilton’s principal of least action
2
t
1t
N11N11 dt (t)).q..., (t),
.q(t),
.q(t),q(t),...,q(t),L(q Action
L = T – V is the Lagrangian (t)q1
1t
2t
(t)q2
(t)q1
The path actually taken is the one for which infinitesimal variations in the path result in no change in the action
IntroductionHamilton’s principal of least action
• The condition that a particular function is the one that minimises the value of a functional can be expressed as a partial differential equation
• We are therefore presented with an alternative method for solving partial differential equations besides directly seeking an analytical or numerical solution
• We can solve the partial differential equation by finding the function which minimises a functional
• Lagrange’s equations arise from the condition that the action be minimal 0
qL -
qL
dtd
ii
4.2 Euler-Lagrange Equations
• Let J[y(x)] be the functional • Denote the function that minimises J[y] and satisfies boundary conditions specified in the problem by
• Let (x) be an arbitrary function which is zero at the boundaries in the problem so that + (x) is an arbitrary function that satisfies the boundary conditions
• is a number which will tend to zero
b
adx )y'y,F(x, J[y]
dxdy y'
y
y
Euler-Lagrange EquationsFunctionals
b
adx )''y,yF(x, (x)]yJ[
a b
A
(x)
y(x)
B (x)y(x) (x)y
x
Functional
Boundary conditionsy(a) = Ay(b) = B
Function )J(
0dx )'y,yF(x,
dx )''y,yF(x,dd
d)dJ(
b
a
b
a
Euler-Lagrange EquationsFunctionals
0y'F
dxd
yF if 0
ddJ
dx y'F
dxd
yF
dx 'y'F
yF
ddJ
'y'F
yF 0
y'y'F y
yF x
xF F
b
a
b
a
•
• y is the solution to a pde as well as being the function which minimises F[x,y,y’]
• We can therefore solve a pde by finding the function which minimises the corresponding functional
y y
• Electrostatic potential u(x,y) inside region D SF p 362
• Charges with density f(x,y) inside the square
• Boundary condition zero potential on boundary
•Potential energy functional
•Euler-Lagrange equation
4.3 Method of Ritz for minimising functionals
dxdy 2uf u u J[u]D
2y
2x
y)f(x, y)u(x,2
D
Method of Ritz for minimising functionalsElectrostatic potential problem
etc.
y)(x, xy y)(x,
y)(x,y y)(x,
y)(x, x y)(x,
y)(x,y y)(x,
y)(x, x y)(x,
y)-x)(1- xy(1 y)(x,
16
12
5
12
4
13
12
1
Basis set which satisfies boundary conditions
00.2
0.40.6
0.81 0
0.2
0.4
0.6
0.8
1
0
0.02
0.04
0.06
00.2
0.40.6
0.81
00.2
0.40.6
0.81 0
0.2
0.4
0.6
0.8
1
00.010.02
0.03
00.2
0.40.6
0.81
1
2
• Series expansion of solution
•Substitute into functional
•Differentiate wrt cj
Method of Ritz for minimising functionalsElectrostatic potential problem
y)(x, c y)u(x,N
1 iii
dydx cf 2 y
c x
c )J(cD
N
1 iii
2N
1 i
ii
2N
1 i
iii
dydx f cyy
xx
2 cJ
D j
N
1 ii
jiji
j
Method of Ritz for minimising functionalsElectrostatic potential problem• Functional minimised when
• Linear equations to be solved for ci Aij.cj = bi where
dydx yy
xx
AD
jijiij
dydx y)(x,y)f(x,- bD ii
0 cJ
j
4.4 Weighted residual methods
• For some pde’s no corresponding functional can be found
• Define a residual (solution error) and minimise this
• Let L be a differential operator containing spatial derivatives D is the region of interest bounded by surface S
• An IBVP is specified by
BC S x t)(x,f t)u(x,IC D x(x) u(x,0)PDE 0 t D x u Lu
s
t
Weighted residual methodsTrial solution and residuals
•Define pde and IC residuals
n
1 iiisI
tTTE
(x)u (0)c - (x,0)u - (x) (x)R
t))(x,(u - t)(x,Lu t)(x,R
•Trial solution
n
1 iiisT (x)u (t)c t)(x,u t)(x,u
S x 0 (x)ut)(x,f t)(x,u
i
ss
• RE and RI are zero if uT(x,t) is an exact solution
ui(x) are basis functions
• The weighted residual method generates and approximate solution in which RE and RI are minimised
• Additional basis set (set of weighting functions) wi(x)
• Find ci which minimise residuals according to
• RE and RI then become functions of the expansion coefficients ci
Weighted residual methodsWeighting functions
0 (x)dx(x)Rw
0 t)dx(x,(x)Rw
D Ii
D Ei
Weighted residual methodsWeighting functions
• Bubnov-Galerkin methodwi(x) = ui(x) i.e. basis functions themselves
• Least squares method
i
Ei c
R2(x)w
0 c
)(cJ
0 c
)(cJ
0 (x)dxR)(cJ
0 t)dx(x,R)(cJ
i
iI
i
iE
D2IiI
D2EiE
Positive definite functionals u(x) real
Conditions for minima
4.5 The Finite Element Method
• Variational methods that use basis functions that extend over the entire region of interest are
•not readily adaptable from one problem to another•not suited for problems with complex boundary shapes
• Finite element method employs a simple, adaptable basis set
The finite element methodComputational fluid dynamics websites
• Gallery of Fluid Dynamics• Introduction to CFD• CFD resources online• CFD at Glasgow University
Vortex Shedding around a Square CylinderCentre for Marine Vessel Development and ResearchDepartment of Mechanical EngineeringDalhousie University, Nova Scotia
Computational fluid dynamics (CFD) websitesVortex shedding illustrations by CFDnet
The finite element method Mesh generation
Local coordinate axes andnode numbers
Global coordinate axes
1
23
Finer mesh elements in regions where the solution varies rapidly
Meshes may be regular or irregular polygons
Definition of local and global coordinate axes and node numberings
The finite element method Example: bar under stress
• Define mesh• Define local and global node numbering• Make local/global node mapping• Compute contributions to functional from each element• Assemble matrix and solve resulting equations
1F2FiT 1iT
The finite element method Example: bar under stress
• Variational principle
• W = virtual work done on system by external forces (F) and load (T)
• U = elastic strain energy of bar
• W = U or (U – W) = = 0
dxx
xdxdu
2AE
x
xT(x)u(x)dxuFuFΠ
2
1
22
1
1122
The finite element method Example: bar under stress
dxx
xdx
)d(u2
AEx
x)dxT(x)(u
)(uF)(uF)Π(u
2
1
22
1
222111
dxx
x
dxd
dxduAE
x
xdx TFF
ddΠ 2
1
2
1
2211
• Eliminate d/dx using integration by parts
The finite element method Example: bar under stress
dxx
x
dxduAE
dxd
dxduAE
dx x
x
dxduAE
dxdx
xdxduAE dx
x
x
dxd
dxduAE
2
1
12
2
1
21
2
1
|
0 T(x)dxduAE
dxd
0 xdxduAEF 0 xdx
duAEF2
21
1 ||
Differential equation being solved
Boundary conditions
The finite element method Example: bar under stress
• Introduce a finite element basis to solve the minimisation problem [u(x)] = 0
• Assume linear displacement function
u(X) = + X
ui(X) = + Xi
uj(X) = + Xj•Solve for coefficients
ij
ijji1 X - X
Xu - Xu
ij
ij2 X - X
u - u X is the local
displacement variable
u(X)
i jX
The finite element method Example: bar under stress•Substitute to obtain finite elements
u(X) = u1 + u2
ij
j1 X - X
X - X N
ij
i2 X - X
X - X N
• u1 and u2 are coefficients of the basis functions N1 and N2
N1
N2
u(X) = [N1 N2] (u)
The finite element method Example: bar under stress
• Potential energy functional Grandin pp91ff
dx T(x)u(x) dxdxdu
2AE uF - uF- [u(x)]
2x
1x
22x
1x
2211
1-1
u u X - X
1 uu
1 1- X - X
1 X - X
u - u
dxdu
jiijj
i
ijij
ij
j
ij
i2
ij
2
ij
ij2
uu
11-1-1
u u
X - X
1 X - X
u - u
dxdu
The finite element method Example: bar under stress
matrix stiffnessElement 11-1-1
X - X
1 2
EA [k]
q [k]. . q 21
uu
11-1-1
]u u [ X - X
1 2
EA
dX uu
11-1-1
]u u [ X - X
1 2
EA U
ij
T
j
iji
ij
jX
iXj
iji2
ij
• Strain energy dxdxdu
2AE energy train
22x
1x
s
per element
The finite element method Example: bar under stress
j
ijiNF u
u ]F [F - Venergy potential force Node
• Node force potential energy
dx T(x)u(x) Venergy potential load dDistribute2
x
1x
T
• Distributed load potential energy
dX uu
X - XX - X
X - X
X - XT(X)- V
j
i
ij
i
ij
jjX
iXT
The finite element method Example: bar under stress• Energy functional for one element
0 u i
j
ijX
iX21
j
iji
j
iji u
u . ]N [N T(X) dX u
u . ]F F [ u
u .k . ]u u [
21
• Equilibrium condition for all i
01
. ]N [N T(X) dX
01
. ]F F [ 01
.k . ]u [u 21 u
u .k . 0] 1 [
21
u
jX
iX
21
jijij
i
i
The finite element method Example: bar under stress
• Equilibrium condition for one element
2
1jX
iXj
i
j
iNN
T(X) dX FF
uu
.k
• Assemble matrix for global displacement vector
TFu .k
The finite element method Example: bar under stress
element labelsn NN
)T(X dX
...00F
...
uuu
...1001210
01210011
K
2n
1njX
iXnnn
1
3
3
1
TF
u
• Solve resulting linear equations for u
Top Related