galerkin’s method for differential equation
DESCRIPTION
Galerkin’s Method for Differential Equation. (I). In order to make the the residue a minimum at least at few selected nodal points, we use orthogonality condition. (II). Integrating the first term of equation II. Equation II becomes. - PowerPoint PPT PresentationTRANSCRIPT
Galerkin’s Method for Differential Equation
d 2y
dx2+ B y + Q =0
Consider a DE
A
With a initial boundary condition dy/dx = y = 0 at x =0
1 2 3 4 5
y1 y2 y3 y4 y5
1 2
y1 y2L
If we have a exact solution then RHS of equation I will be zeroIn the FEM scheme we assume a displacement function for ywhich is approximate
y = a1 + a2 x
or { y } = [ N1 N2 ]y1y2
Since y is approximate, RHS will not be zero, it will have some error or residue
d 2y
dx2 + B y + Q =RA
In order to make the the residue a minimum at least at few selected nodal points, we use orthogonality condition fi fj = 0
fi = [ N ]T fj = Rand
(I)
1 2
where
x xN 1 , N =
L L
d 2 y
d x 2+ B y + QA[ N ]T dx = o
= 0[ N ]T R dx
(II)
Taking u = , du = , dv = , v =[ N ]T[ N ]Tddx
ddx
ddx
y ddx
y
Integrating the first term of equation II
[ N ]Tddx
ddx
[ N ]T ydx
0
L
[ N ]Td y
d xd 2 y
d x 2A = Adx A
[ N ]TB dxyddx
ddx
[ N ]T ydx
0
L
[ N ]Td y
d xA A [ N ]TQ dx = 0
0
L
0
L
0
L
Equation II becomes
y1y2
{ y } = [ N1 N2 ] , N1 = ( 1 - x/L) N2 = x/L
ddx
ddx
[ N ]T y y1y2
-1
1
1L
= , 1L
= { -1 1 }
The first term is based on initial boundary conditions. For the given problem dy/dx is known only at x = o, and at subsequent points at x = l, 2L …. is not known and hence subsequent terms are ignored.
AN1
N20
Ld y
d xA
-1
1
1L
{ -1 1 } dx1L
y1y2
B1 - x/L
x/L
{ (1 - x/L) (x/L) } dx
1 - x/L
x/LQ dx = 0
0
L
0
L
0
L
y1y2
A
0
d y
d xA
L
-1
12
QLy1y2
B L
6
1
0
1
-1
1
2
2
1
y1y2
1
1
= 0
A
L
-1
12
QLy1y2
B L
6
1
-1
1
2
2
1
y1y2
1
1
= 0
For Element 1
For subsequent elements
A
0
d y
d x
1
0
0
0
A
L
-1
2
-1
y1
y2
y3
y4
1
-1 -1
2
-1
-1
1
2QLB L
6
1
2
2
1
For 3 Element assembyy1
y2
y3
y4
1
4
1
2
1 1
4
1
1
2
Using the conditions dy/dx = y1 = 0 and solving the system of equations, y2, y3, and y4 can be solved
Heat & Mass Transfer
• Basic DE for one dimesion
in generate outE E U E
-Change in stored energyU
-Energy generated(source or sink) inside the control volumegeneratedE
-Energy output from control volumeoutE
xq x dxq
x dx x dx
Q
S1S2
S3 (area around the perimeter)
Heat & Mass Transfer
- heat conducted(heat influx) into the control volume at surface edge x (kW/m2 or Btu/h-ft2)
xq
- heat conducted out of control volume at surface edge x+dxx dxq
-the internal heat source(heat generated/unit volume) or a sink (heat drawn out of volume) (kW/m3 or Btu/h-ft3)
Q
-Area of control volume surfaceA
x x dxq Adt QAdx dt U q Adt
From Fourier’s law of heat conduction
x xx
dTq k
dx
-thermal conductivity in x direction xxk
-temperature; T - Temperature gradientdT
dx
Using Taylor expansion:
The change in stored energy:
Specificheat×mass×change in temperature U
c -specific heat in kWh/kg
......x dx x
dff f dx
dx
| [ ( ) ]x dx xx x dx xx xx
dT dT d dTq k k k dx
dx dx dx dx
( )U c Adx dT
( ) [ ( ) ]xx xx xx
dT dT d dTk Adt QAdx dt c Adx dT k k dx Adtdx dx dx dx
For steady state condition:
For 2 dimension case:
0T
t
( ) 0xx
d dTk Q
dx dx
2
20xx
d Tk Qdx
( ) ( ) 0xx yy
T Tk k Q
x x y y
xq x dxq
yq
y dyq
Q
Simplify the equation:
( )xx
d dT Tk Q c
dx dx t
Boundary Conditions
Heat transfer with conduction
For a conducting solid in contact with fluid, there will be a heat transfer between solid and fluid.
in generate out transferE E U E E
( )xx x dx h
dTk Adt QAdx dt c Adx dT q Adt q Pdxdtdx
Heat flow by convection: ( )hq h T T h -Heat transfer or convection coeffient
T -Temperature of solid surfaceT -Temperature of liquid
( ) ( )xx
T T hPk Q c T T
x x t A
One dimensional Problem
11 1 2 2 1 2
2
( ) [ ]t
T x N t N t N Nt
1 21t 2tL
x
1 21 ,
where
x xN N
L LThe temperature gradient matrix
g{ } { } [ ][ ]
dTg B t
dx
1 2 1[ ] [ ] [ 1 1]
dN dNB
dx dx L
The heat flux/temperature gradient relationship is given by
[ ]{ }xq D g [ ] [ ]xxwhere D k
Casting the governing DE into integral form using Galcerkin approach.
( ) 0 Txx
v
d dT dTN k Q c dv I
dx dx dt
0 can be written (using integration by parts u dv = uv )
( ) [ ] [ ]
L
TT T
xx
v v s
The first term vdu
d dT dN dT dTN k dv D dv N D dxds
dx dx dx dx dx
equation I becomes
[ ] [ ] 0 T
T T T
v v v s
The
dN dT dT dTD dv N Qdv N c dv N D dxds
dx dx dt dx
The last integrand [ ] T
s
dTN D dxds
dxcan be written as
2 3
2 3( ) T T
s s
N qdS N h T T dS
[ ] T
T T
v v v
dN dT dTI D dv N Qdv N c dv
dx dx dt
2 3 3
2 3 3 0 T T T
s s s
N qdS N hTdS N hT dS
3 3
3 3{ } [ ]{ } { } T T T
v s s
B DB dv t N h N t dS cN N t dS
3 2
3 2 T T T
s v s
N hT dS N Qdv N qdS
1 1 1
2 2 2
1 1 2 1 2 1
1 1 1 2 1 26 6
xxt t tAk hPL cA
t t tL
1 1 1
1 1 12 2 2
hT PL QAL qPL
t1t2
{T} = [ N1 N2 ] N1 = ( 1 - x/L)
N2 = x/L
ddx
[ N ]T -1
1
1L
= ,BT=dx
1L
= { -1 1 }t1t2
dT,,
In case the surface S2 convects heat in addition to heat flux, additional boundaryCondition is required for the last element
2
00 0( )
0 1
iT
jjs
TN h T T hA
T hAT
1 1 1
2 2 2
1 1 2 1 2 1 0 0
1 1 1 2 1 2 0 16 6
ixx
j
Tt t tAk hPL cAhA
Tt t tL
01 1 1
1 1 12 2 2
hT PL QAL qPL
hAT
For the last element
Structural vs Heat Transfer
Structural Analysis Thermal Analysis
•Assume displacement function
•Stress/strain relationships
•Derive element stiffness
•Assemble element equations
•Solve nodal displacements
•Solve element forces
•Select element type
•Assume temperature function
•Temperature relationships
•Derive element conduction
•Assemble element equations
•Solve nodal temperatures
•Solve element gradient/flux
•Select element type
Finite Element 2-D ConductionAssume (Choose) a Temperature Function
3 Nodes 1 Element
2 DOF: x, y
Assume a linear temperature function for each element as:
3
2
1
321
321
y x 1
),(
a
a
a
yaxaa
yaxaayxt
where u and v describe temperature gradients at (xi,yi).
Finite Element 2-D ConductionAssume (Choose) a Temperature Function
re temperatunodalt
function shapeN
function etemperaturT
m
j
i
mji
mmjjii
t
t
t
NNNT
tNtNtNT
Finite Element 2-D ConductionDefine Temperature Gradient Relationships
ji mi
jji m
m
i j m
i j m
NT N N t x x x x
g tT NN N
ty y y y
β β β1B N
γ γ γx 2A
Analogous to strain matrix: {g}=[B]{t}
[B] is derivative of [N]
gDgq
q
y
x
yy
xx
K 0
0 K
:Gradient ratureflux/TempeHeat
Derive Element Conduction Matrix and Equations
3
TT
V S
i i i j i mT
j i j j j m
Sm i m j m m
Conduction Convection
k B D B dV h N N dS
N N N N N N
tA B D B h N N N N N N ds
N N N N N N
i
jm
h
i i i i i j i j i m i m
i mj i j i j j j j j m j m
m i m i m j m j m m m m
2 0 1htLtK
0 0 04A 6
1 0 2
Finite Element 2-D Conduction
T
Q
V
1QV
f Q N dV 1 for constant heat source3
1
elementeach for
tkf
Stiffness matrix is general term for a matrix of known coefficients being multiplied by unknown degrees of freedom, i.e., displacement OR temperature, etc. Thus, the element conduction matrix is often referred to as the stiffness matrix.
2
*T* i mq
S
1q tL
f q N ds 0 on side i-m2
1