Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
f 2
f s x, t
Or, 2
, thermal diffusivity; s.t. f x, t 0 F x .
t t cp
I
Evaluating the mass matrix, we find the i-th equation of the Galerkin finite element
system takes the form
NE
hi 1 dfi 1 hi 1 hi dfi hi dfi 1
Dij f j bi
6 dt 3 dt 6 dt j 1
The first three terms on LHS contribute a weighed average of the time derivative at
three nodes.
If h1 h2 ... hN E h
1 dfi 1 2 dfi 1 df i 1 fi 1 2 fi fi 1
bi .
6 dt 3 dt 6 dt h2 h
Solution procedure:
II
if y n is known, yn 1 can be computed by evaluating f, multiplying by h, and adding the
called explicit.
Error:
1 2
y xn 1 y xn hy ' xn h y '' xn .....
2
If yn y xn , that is, if the solution at xn is exact, then
1 2
y xn 1 yn hf xn , yn h y '' xn .....
2
1 2 1
y xn 1 yn 1 h y ''n : error introduced in a single step is approximately h 2 y ''n : 1st
2 2
order method. Why?
If we wish to compute the solution from x=x0 to x=xf, the number of steps of size h
required is proportional to 1/h. The error in y(xf) will be the product of the number of
steps and the error per step, and thus be proportional to h.
Mass lumping
ri
Ideal case: fi t t
M ii
dfi fi 1 2 fi fi 1
bi , for i=1,2,…,Ne.
dt he h
Explicit Euler
fi n 1
fi n fi n1 2 fi n fi n1
bi
t h2 h
III
t t
fi n 1
fi n1 1 2 fi n fi n1 bi , where , is the dimensionless
h h2
diffusion number. At steady state, fi n 1
fi n , and the solution, denoted by F , satisfies
fˆi n 1
fˆi n1 1 2 fˆi n fˆi n1 , in vector form fˆ n 1
P fˆ n .
1 2
1 2
Note: Each time we make a step, we effectively multiply the current solution vector, fˆ n
fˆ n 1
P fˆ n P P fˆ n 1
.... Pn 1
fˆ 0
Assume that P has N linearly independent eigenvectors and express the initial deviation
from the steady state as a linear combination of them,
IV
N
fˆ 0 cm u m , where cm is appropriate coefficient. The first projection yields
m 1
N N
P fˆ 0 cm P u m cm m um repeating this
m 1 m 1
N
fˆ n 1
Pn 1
fˆ 0 cm n 1
m um an arbitrary initial condition will grow in time if the
m 1
Max m 1.
m mj
m 1 4 sin 2 and eigenvector um j sin .
2 N 1 2 N 1
h2
Requiring m 1 , we derive the stability criterion. 1/ 2 t
2
This stability constraint is extremely restrictive.
Consistent formulation
(element with equal size)
1 ˆn 1 2 ˆn 1 2 ˆn 1 1 2 1
fi 1 fi 1
fi 1 fˆi n1 2 fˆi n fˆi n1
6 3 63 6 3 6
And the counterpart of vector equation
Q fˆ n 1
P Q I fˆ n
where
V
4 1
1 4 1
1 4 1
1
Q
6
1 4 1
1 4
fˆ n 1
fˆ n , where P Q 1
P Q I is a new projection matrix.
Q 2 2 m
m 1 sin
3 2 N 1
Since the eigenvalues of the inverse of a matrix are equal to the inverses of the
eigenvalues
Q 1 1
m
2 2 m
1 sin
3 2 N 1
Because matrices P 1 and P+Q-I share eigenvectors, the eigenvalues of their product is
equal to the product of their eigenvalues,
1
Q P Q
m m m m 1 then
2 m
1 4 sin 2
P
3 2 N 1
m
2 2 m
1 sin
3 2 N 1
1 h2
t
6 6
Example: 1/ 6 0.1667
VI
fn 1
fn
M D fn fn 1
bn bn 1
t 2 2
Rearranging
1 1 1
C fn 1
r, C M tD , and r M tD f n t bn bn 1
.
2 2 2
1.5 One-dimensional convection
f f
u 0 ; u(x,f,t) is a prescribed convection velocity. The solution is to be found
t x
over a specified interval of the x axis, a<x<b, subject to a given initial conditions
f(x,t=0)=F(x), and a suitable boundary condition. If u(x,t) is a function of x and t explicitly
but not implicitly through f(x,t), the convection equation is quasi-linear, and we say that
the field f(x,t) is advected with the specified position- and time-dependent advection
velocity. In the special case where u is a constant, the convection equation is linear.
NG
b df j NG
b j
i j dx u x, t i dx f j 0
j 1
a dt j 1
a x
NG
df j NG
M ij Nij f j 0 , where
j 1 dt j 1
b
i
Nij u x i dx is the global advection matrix.
a x
df
M N f 0.
dt
To evaluate the global advection matrix, we express the convection velocity in the
isoparametric form
NG
u x, t uk t k x
k 1
VII
NG NG
b j
Nij uk k i dx uk kij , where kij is a three-index global advection
k 1
a dx k 1
df
tensor. M u f 0 . In practice, the tensor is assembled from the individual
dt
element advection matrices.
d j 1
, for x j x xj 1
dx hj
only nonzero components of the matrix N ij are the tridiagonal elements N i 1, j , Ni, j ,
Ni 1, j
1 xi 1 xi 1
Nii ui 1 i 1 ui i i dx ui i ui 1 i 1 i dx
hi 1 xi 1 hi xi
1 xi
Ni 1,i ui 1 i 1 ui i i dx
hi 1 xi 1
1 xi 1 xi 1
Nii ui 1 i 1 ui i i dx ui i ui 1 i 1 i dx
hi 1 xi 1 hi xi
1 1
A11 A12 0 0 ... 0 0 0
1 1 2 2
A21 A22 A 11 A 12 0 ... 0 0 0
2 2 3 3
0 A21 A22 A11 A12 ... ... ... ...
0 0 ... ... ... ... ... 0
N
... ... ... ... ... ... ... ...
N 3 N 3 N 2 N 2
... ... ... ... A21 e A22 e A12 e A21 e 0
Ne 2 Ne 2 Ne 1 Ne 1
0 0 0 ... 0 A 21 A 22 A 11 A 12
Ne 1 Ne 1 N
0 0 0 ... 0 0 A 21 A 22 A11 e
VIII
The contribution of the advection term to the ith Galerkin projection is
NG
1 fi 1 fi 1
Nij f j ui 1 fi fi 1 4ui ui 1 fi 1 fi
j 1 6 2
Linear advection
1 1
1 0 1
U 1 0 1
N independent of mesh size!!
2 1 0 1
1 0 1
1 1
Apart from the first and last diagonal elements, the global advection matrix is skew-
symmetric, that is, it is equal to the negative of its transpose. A skew-symmetric matrix
has zeros along the diagonal.
l U 1 1
C cancellation of the alternating 1 and -1 diagonal entries during the
2 1 1
IX
Consider a solution in the form of a periodic wave with period , and assume that the
solution of the discrete system is given by the real or imaginary part of the function
kc .
Let’s assume that the length of the domain L=hNe is a multiple of the wavelength ,
L/ n . Substituting f x, t A exp ik x ct or f t i
A exp ik xi ct ,
f t i 1
A exp ik xi h ct , f t i 1
A exp ik xi h ct
c sin kh 3
U kh 2 cos kh
The corresponding angular frequency kc reduced by the time scale U/L, is given by
L kcL c 2 n 3
2 n sin kh
U U U kh 2 cos kh
2 n
Since h L / NE , h / n / NE kh 2 h/ kh , thus
NE
L 3
1) N E sin kh When the ratio n/Ne is small, we may perform
U 2 cos kh
X
3
In the lumped mass approximation, the fractions are replaced by unity.
2 cos kh
Note: The exact solution of the linear convection equation states that the initial
distribution travels with the specified velocity U, which means c=U, and L /U 2 n.
Expression 1) reveals that the spatial discretization modifies the exact phase velocity by
an amount that depends on the reduced wave number, kh, thereby introducing
numerical dispersion.
Fig. 1.5.1 Graph of the reduced angular frequency plotted against the wavenumber.
coefficient matrix on the left-hand side, we recover the explicit forward-time, centered-
space (FTCS) fdm equation. In linear element with uniform size h, the ith equation takes
the form
f f 2
f s x, t
u 2
( k / cp
t x x cp
XI
Galerkin finite element method with linear elements (Ne * Ne linear algebraic system)
1
Q f c M s
k
1 1
1 Pec 1 Pec 0 0 ... 0 0 0
2 2
1 1
1 Pec 2 1 Pec 0 ... 0 0 0
2 2
1 1
0 1 Pec 2 1 Pec ... ... ... ...
2 2
1 0 0 ... ... ... ... ... 0
Q
h
... ... ... ... ... ... ... ...
... ... ... ... 0
1 1
0 0 0 ... 0 1 Pec 2 1 Pec
2 2
1 1
0 0 0 ... 0 0 1 Pec 2 Pec
2 2
c p hU hU
Where Pec is called cell peclet number
k k
q0 / k
0
0
c .
0
1
1 Pec f L / hNe
2
1
As Pec becomes large, the coefficient matrix Q tends to the skew-symmetric form N,
XII