Cell-Centered Discretization Methods For 2nd Order Elliptic Problems
Cell-Centered Discretization Methods For 2nd Order Elliptic Problems
q
2
(x)dx
H
1
() = {q L
2
();
grad q (L
2
())
2
}
q
2
1,
= q
2
0,
+|q|
2
1,
|q|
2
1,
=
_
|
grad q|
2
(x)dx
The trace q|
of q H
1
() is in H
1/2
().
The trace
q
n
|
of q H
1
() is in H
1/2
(), the dual space of H
1/2
().
9
Weak primal formulation
Assume K L
(), f L
2
().
Neumann boundary conditions: g H
1/2
().
Find p H
1
() such that
_
K
grad p
grad q =
_
fq < g, q >, q H
1
().
Dirichlet boundary conditions: p H
1/2
().
Find p V
p
= {q H
1
(), q = p on } such that
_
K
grad p
grad q =
_
fq, q V
0
.
10
An example with a discontinuous K
In one dimension, =]0, 2[, f = 0, p(0) = 0, p(2) = 1.
0 1 2
K = 10 K = 100
~ ~ ~
u
x
= 0 = u constant thus very smooth.
p continuous, piecewise linear,
p
x
discontinuous at x = 1 = p is not smooth.
u has a physical meaning and is a good mathematical and numerical unknown.
11
APPROXIMATION WITH MIXED FINITE ELEMENTS
12
Mixed formulation
Write the elliptic problem as a system of rst order equations:
div u = f, u = K
grad p, in
p = p on
D
, u n = g on
N
,
N
D
= = .
Assume that f L
2
() so divu L
2
().
Therefore we take u H(div, ) = {v (L
2
())
2
; div v L
2
()}.
Multiply the second equation by K
1
, then by v, integrate over and by parts.
We obtain
_
(K
1
u) v
_
grad q v +
_
q divv =
_
qv n.
It is sucient to take p L
2
(), u H(div, ).
13
Properties of H(div, )
H(div, ) = {v (L
2
())
2
; div v L
2
()} is an Hilbert space with norm
v
H(div,)
= v
L
2
()
+divv
L
2
()
.
Traces (v n)|
(K
1
u) v,
b : W M R, b(v, q) =
_
q divv,
l
W
: W R, l
W
(v) =
_
D
p v n,
l
M
: M R, l
M
(v) =
_
fq.
15
Mixed formulation
The problem is
P
m
_
_
Find u W
g
and p M such that
a(u, v) b(v, p) = l
W
(v), v W
0
,
b(u, q) = l
M
(q), q M.
16
Discretization of the domain
1. Let T
h
be a discretization of . Card(T
h
) = ne = number of cells.
A
h
be the set of edges. Card(A
h
) = na = number of edges
h the largest diameter of the cells.
a rectangular mesh a triangular mesh
t
t
t
t
t
t
t
t
t
t
t
tt
t
t
t
t
t
t
t
t
t
t
t
tt
t
t
t
t
t
t
t
t
t
t
t
tt
t
t
t
t
t
tt
2. Dene
an approximation p
h
of p in M
h
, a nite dimensional subset of M
an approximation u
h
of u in W
h
, a nite dimensional subset of W.
17
Approximation space for the scalar unknown
M
h
= the space of functions q
h
in M which are
constant over each triangle
$
$
$
$
$
$
$
$
$
$
$
$$
d
d
d
d
d
d
d
dim M
h
= ne = number of elements
The degrees of freedom are
p
T
an approximation of the average value of p over the cell T, T T
h
.
A basis is {
T
}
TT
h
such that
T
(x) =
_
_
_
1 if x T
0 otherwise
Then p
h
=
TT
h
p
T
T
18
Approximation of the vector unknown
W
h
= {v
h
W; v
h
|T W
T
, T T
h
}.
on each triangle
W
T
= {v
h
; v
h|T
= a
_
_
x
1
x
2
_
_
+
_
_
b
c
_
_
}
on each rectangle
W
T
= {v
h
; v
h|T
=
_
_
ax
1
+b
cx
2
+d
_
_
}
Functions v W
T
are uniquely dened by
_
E
v n
T
, E T.
19
On remarque que divW
h
= M
h
.
dimW
h
= na = number of edges.
The degrees of freedom for W
h
are
u
E
an approximation of the ow rate of u across E,
_
E
u n
E
, E A
h
,
n
E
a chosen unit normal to E.
A basis of W
h
is {v
E
}
EA
h
such that
_
F
v
E
n
F
=
E,F
, F A
h
.
Then, u
h
=
EA
h
u
E
v
E
.
20
Basis functions of W
h
For rectangles v
E
is:
E
For triangles v
E
is:
E
21
The approximation problem
Assume the data p, g are piecewise constant on the edges E .
Introduce W
hg
= {v W
h
; v = g on
N
}
The approximation problem is
P
mh
_
_
Find u
h
W
hg
and p
h
M
h
such that
a(u
h
, v
h
) b(v
h
, p
h
) = l
W
(v
h
), v
h
W
h0
,
b(u
h
, q) = l
M
(q
h
), q
h
M
h
.
22
Discrete equations
The unknowns are the degrees of freedom:
Find {p
T
}
TT
h
, {u
E
}
EA
h
such that
_
K
1
FA
h
u
F
v
F
v
E
_
TT
h
p
T
T
divv
E
=
_
D
pv
E
n, E A
h
, E
N
_
div
EA
h
u
E
v
E
T
=
_
f
T
, T T
h
u
E
= g|E|, E
N
(assuming n
E
= n)
Find {p
T
}
TT
h
, {u
E
}
EA
h
such that
FA
h
u
F
_
K
1
v
F
v
E
TT
h
p
T
_
T
divv
E
=
_
D
pv
E
n, E A
h
, E
N
EA
h
u
E
_
divv
E
T
=
_
f
T
, T T
h
u
E
= g|E|, E
N
.
23
Algebraic system
This leads to the linear system
_
_
A
t
D
D 0
_
_
_
_
U
P
_
_
=
_
_
F
v
F
q
_
_
with P = {p
T
}
TT
h
, U = {u
E
}
EA
h
,E
N
.
This linear system is not positive-denite.
For triangles A has 5 nonzero entries per row
For quadrilaterals A has 7 nonzero entries per row
24
On a rectangular mesh
A rectangular
mesh for
i, j + 1
ij i + 1, j
j + 1/2
j 1/2
j
i + 1/2 i 1/2 i E
n
1
T
n
2
h
1i
h
2j
E '
T
c
We take n
E
= n
1
if E is vertical, n
E
= n
2
if E is horizontal.
Note that
EA
h
u
E
_
divv
E
T
=
ET
u
E
_
T
divv
E
.
Thus the second discrete equation gives
u
i+1/2,j
u
i,j1/2
+u
i,j+1/2
u
i1/2,j
=
_
T
ij
f
25
Consider now the rst discrete equation.
Denote N(E) the set of the 2 cells adjacent to E if E
1 cell adjacent to E if E
If E = E
i+1/2,j
, E
D
:
TT
h
p
T
_
T
divv
E
=
TN(E)
p
T
_
T
divv
E
= p
ij
p
i+1,j
.
If E = E
i+1/2,j
, E
D
:
TT
h
p
T
_
T
divv
E
= p
ij
assuming E lies on the right of the domain,
TT
h
p
T
_
T
divv
E
= p
i+1,j
assuming E lies on the left of the domain.
26
If E = E
i+1/2,j
, E :
FA
h
u
F
_
K
1
v
F
v
E
=
TN(E)
FT
u
F
_
K
1
v
F
v
E
=
u
i+1/2,j
_
T
ij
K
1
v
i+1/2,j
v
i+1/2,j
+u
i1/2,j
_
T
ij
K
1
v
i1/2,j
v
i+1/2,j
+
u
i,j+1/2
_
T
ij
K
1
v
i,j+1/2
v
i+1/2,j
+u
i,j1/2
_
T
ij
K
1
v
i,j1/2
v
i+1/2,j
+
u
i+1/2,j
_
T
i+1,j
K
1
v
i+1/2,j
v
i+1/2,j
+u
i+3/2,j
_
T
i+1,j
K
1
v
i+3/2,j
v
i+1/2,j
+
u
i+1,j+1/2
_
T
i+1,j
K
1
v
i+1,j+1/2
v
i+1/2,j
+u
i+1,j1/2
_
T
i+1,j
K
1
v
i+1,j1/2
v
i+1/2,j
If E , say for instance i = 0 (left boundary):
FA
h
u
F
_
K
1
v
F
v
E
=
TN(E)
FT
u
F
_
K
1
v
F
v
E
=
u
1/2,j
_
T
1,j
K
1
v
1/2,j
v
1/2,j
+u
3/2,j
_
T
1,j
K
1
v
3/2,j
v
1/2,j
+
u
1,j+1/2
_
T
1,j
K
1
v
1,j+1/2
v
1/2,j
+u
1,j1/2
_
T
1,j
K
1
v
1,j1/2
v
1/2,j
27
Denote K
1
=
_
_
1
12
12
2
_
_
,
with
1
= k
2
/,
2
= k
1
/,
12
= k
12
/, = k
1
k
1
(k
12
)
2
.
_
T
ij
K
1
v
i+1/2,j
v
i+1/2,j
=
1
ij
3
h
1i
h
2j
_
T
ij
K
1
v
i1/2,j
v
i+1/2,j
=
1
ij
6
h
1i
h
2j
_
T
ij
K
1
v
i,j+1/2
v
i+1/2,j
=
12
ij
4
28
When K is diagonal
Products of basis functions for vertical edges by basis functions for horizontal
edges vanish.
If E = E
i+1/2,j
, E :
FA
h
u
F
_
K
1
v
F
v
E
=
TN(E)
FT
u
F
_
K
1
v
F
v
E
=
u
i+1/2,j
_
_
T
ij
1
k
1
ij
v
i+1/2,j
v
i+1/2,j
+
_
T
i+1,j
1
k
1
i,j+1
v
i+1/2,j
v
i+1/2,j
_
+
u
i1/2,j
_
T
ij
1
k
1
ij
v
i1/2,j
v
i+1/2,j
+u
i+3/2,j
_
T
i+1,j
1
k
1
i,j+1
v
i+3/2,j
v
i+1/2,j
If E , say for instance i = 0 (left boundary):
FA
h
u
F
_
K
1
v
F
v
E
=
TN(E)
FT
u
F
_
K
1
v
F
v
E
=
u
1/2,j
_
T
1,j
1
k
1
1j
v
1/2,j
v
1/2,j
+u
3/2,j
_
T
1,j
1
k
1
1,j+1
v
3/2,j
v
1/2,j
29
Using V, H as indices for the vertical and the horizontal edges we can write the
linear system as
_
_
A
V
0
t
D
V
0 A
H
t
D
H
D
V
D
H
0
_
_
_
_
U
V
U
H
P
_
_
=
_
_
F
vV
F
vH
F
q
_
_
Matrices A
V
et A
H
are tridiagonal.
30
FINITE VOLUMES
31
The PDE as a conservation law.
divu = f is a conservation law.
This equation is obtained in two steps:
1. Write mass balance in a small volume T
_
T
u n
. .
echange
=
_
T
f
..
exterior
contribution
_
_
> 0 source
< 0 well
= 0 what goes in goes out
2. Make T innitely small
32
Finite volumes as a method which models the physics
In a nite volume method:
1. skip step 2
2. T is a triangle or a rectangle
3. p is constant over T
4. give a rule to calculate u n on the edges
33
Classical formulation of cell-centered nite volumes
divu = f, u = K
grad p dans
p = p sur
A rectangular
mesh for
i, j + 1
ij i + 1, j
j + 1/2
j 1/2
j
i + 1/2 i 1/2 i E
n
1
T
n
2
h
1i
h
2j
E '
T
c
The unknowns :
p
T
an approximation of the average value of p over the cell T.
u
E
an approximation of
_
E
u n
E
, n
E
= n
1
if E vertical
n
E
= n
2
if E horizontal
34
Rectangular nite volumes
Integrate over the cell T
ij
:
_
T
ij
divu =
_
T
ij
u n =
_
T
ij
f
T
ij
Tn
%
E
i+1/2,j
_
E
i,j1/2
u n +
_
E
i+1/2,j
u n +
_
E
i,j+1/2
u n +
_
E
i1/2,j
u n =
_
T
ij
f
This equation is approximated by
u
i+1/2,j
u
i,j1/2
+u
i,j+1/2
u
i1/2,j
=
_
T
ij
f
A nite volume consists in specifying
how to calculate the u
i+1/2,j
s in terms of the p
ij
s.
35
Assume K is diagonal: K =
_
_
k
1
0
0 k
2
_
_
.
It is natural to approximate u = K
grad p
by u
i+
1
2
,j
= k
1
i+
1
2
,j
p
i+1,j
p
i,j
h
1i
+h
1,i+1
2
h
2j
T
i,j
T
i+1,j
E
i+
1
2
,j
How to choose k
1
i+
1
2
,j
?
k
1
i+
1
2
,j
=
_
_
1
2
(k
1
i,j
+k
1
i+1,j
) the arithmetic average
1
1
2
(
1
k
1
i,j
+
1
k
1
i+1,j
)
the harmonic average
36
Arithmetic average:
1
2
(s +r)
For a xed s:
_
_
_
r
r0
s
2
0 5 10 15 20 25 30 35 40 45 50
0
5
10
15
20
25
30
Harmonic average:
1
1
2
(
1
s
+
1
r
)
For a xed s:
_
_
_
r
2s
r0
0
0 5 10 15 20 25 30 35 40 45 50
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
The harmonic average is better
since it allows no ow to enter a cell with 0 permeability.
37
Combining
u
i+
1
2
,j
u
i
1
2
,j
+u
i,j+
1
2
u
i,j
1
2
=
_
T
ij
f
with
u
i+
1
2
,j
= k
1
i+
1
2
,j
p
i+1,j
p
i,j
h
1,i+1
+h
1i
2
h
2j
we obtain
k
1
i+
1
2
,j
p
i+1,j
p
i,j
h
1,i+1
+h
1i
2
h
2j
+k
1
i
1
2
,j
p
ij
p
i1,j
h
1i
+h
1,i1
2
h
2j
k
2
i,j+
1
2
p
i,j+1
p
i,j
h
2,j+1
+h
2j
2
h
1i
+k
2
i,j
1
2
p
ij
p
i1,j
h
2j
+h
2,j1
2
h
1i
=
_
T
ij
f
38
We divide by h
1i
h
2j
and that gives the ve point scheme:
p
i+1,j
k
1
i+
1
2
,j
h
1i
h
1,i+1
+h
1i
2
p
i1,j
k
1
i
1
2
,j
h
1i
h
1,i
+h
1i1
2
p
i,j+1
k
2
i,j+
1
2
h
2j
h
2,j+1
+h
2j
2
p
i,j1
k
2
i,j
1
2
h
2j
h
2,j
+h
2,j1
2
+p
ij
_
_
k
1
i+
1
2
,j
h
1i
h
1,i+1
+h
1i
2
+
k
1
i
1
2
,j
h
1i
h
1i
+h
1,i1
2
+
k
2
i,j+
1
2
h
2j
h
2,j+1
+h
2j
2
+
k
2
i,j
1
2
h
2j
h
2j
+h
2,j1
2
_
_
=
1
h
1i
h
2j
_
T
ij
f
When h = h
1
= h
2
and K are constant, with k = k
1
= k
2
, this equation results
in the standard equation:
k
h
2
[p
i+1,j
p
i1,j
p
i,j+1
p
i,j1
+ 4p
i,j
] =
1
h
1i
h
2j
_
T
ij
f
39
On the Dirichlet boundary
D
: p = p.
Say for instance for the left boundary:
u1
2
,j
= k
1
1
2
,j
p
1,j
p
j
1
2
h
1,1
h
2j
with k
1
1
2
,j
= k
1
1,j
j
1
The corresponding equation is now
p
2,j
k
1
3
2
,j
h
1,1
h
1,2
+h
1,1
2
p
1,j+1
k
2
1,j+
1
2
h
2,j
h
2,j+1
+h
2,j
2
p
1,j1
k
2
1,j
1
2
h
2j
h
2,j
+h
2,j1
2
+p
1,1
_
_
k
1
3
2
,j
h
1,1
h
1,2
+h
1,1
2
+
k
1
1,j
h
2
1,1
2
+
k
2
1,j+
1
2
h
2,j
h
2,j+1
+h
2,j
2
+
k
2
1,j
1
2
h
2,j
h
2,j
+h
2,j1
2
_
_
=
1
h
1,1
h
2,j
_
T
ij
f +p
j
k
1
1,j
h
2
1,1
2
40
On the Neumann boundary
N
: u n = g.
Say for instance for the left boundary:
u1
2
,j
= gh
2j
j
1
Then we obtain
p
2,j
k
1
3
2
,j
h
1,1
h
1,2
+h
1,1
2
p
1,j+1
k
2
1,j+
1
2
h
2j
h
2,j+1
+h
2j
2
p
1,j1
k
2
1,j
1
2
h
2j
h
2,j
+h
2,j1
2
+p
1,1
_
_
k
1
3
2
,j
h
1,1
h
1,2
+h
1,1
2
+
k
2
1,j+
1
2
h
2j
h
2,j+1
+h
2j
2
+
k
2
1,j
1
2
h
2j
h
2j
+h
2,j1
2
_
_
=
1
h
1,1
h
2j
_
T
ij
f
g
h
1,1
41
Mixed nite elements vs nite volumes
Assume still that K is diagonal.
Use trapezoidal rule to calculate the coecients of A. Then
_
_
T
ij
1
k
1
ij
v
i+1/2,j
v
i+1/2,j
+
_
T
i+1,j
1
k
1
i,j+1
v
i+1/2,j
v
i+1/2,j
_
=
1
2h
2j
_
h
1i
k
1
ij
+
h
1,i+1
k
1
i+1
_
_
T
ij
1
k
1
ij
v
i1/2,j
v
i+1/2,j
= 0
_
T
i+1,j
1
k
1
i,j+1
v
i+3/2,j
v
i+1/2,j
= 0
42
Therefore the matrix A
V
becomes diagonal. Its rows correspond to the
equations:
u
i+
1
2
,j
=
_
k
1
h
1
_
i+
1
2
,j
(p
i+1,j
p
i,j
)h
2j
with
_
k
1
h
1
_
i+
1
2
,j
=
1
1
2
_
h
1i
k
1
ij
+
h
1,i+1
k
1
i,j+1
_
= the harmonic average of
k
1
h
1
.
This formula for u
i+
1
2
,j
is slightly dierent from that given before for a standard
nite volume method.
It is natural since one can realize that the coecient in front of (p
i+1,j
p
i,j
)h
2j
is actually like k
1
/h
1
(and not just k
1
).
It gives better results in cases where there is also a sharp change in h
1
.
43
What did we actually do to obtain nite volumes from mixed
nite elements ?
We approximated a by a
h
such that
a(u
h
, v
h
) =
_
K
1
u
h
v
h
=
TT
h
_
T
K
1
u
h
v
h
a
h
(u
h
, v
h
) =
TT
h
_
T
K
1
u
h
v
h
where
_
T
is an approximate integral over T calculated with the trapezoidal rule in
x
1
for the vertical edges and in x
2
for horizontal edges.
44
The bilinear form a
h
can be rewritten as
a
h
(u
h
, v
h
) =
TT
h
FT
T,F
_
F
u
h
n
F
_
F
v
h
n
F
.
with
T(E),E
=
1
2|E|
h
1
T
(E)
k
1
T
(E)
for a vertical edge E.
This gives a matrix A
h
corresponding to a
h
which is diagonal.
a
h
(v
E
, v
E
) =
T
1
(E),E
+
T
2
(E),E
, T
1
(E), T
2
(E) N(E), if E ,
a
h
(v
E
, v
E
) =
T(E),E
if E ,
a
h
(v
E
, v
F
) = 0 if E = F.
45
The new approximate formulation is
P
mh
_
_
Find u
h
W
hg
and p
h
M
h
such that
a
h
(u
h
, v
h
) b(v
h
, p
h
) = l
W
(v
h
), v
h
W
h0
,
b(u
h
, q
h
) = l
M
(q
h
), q
h
M
h
.
which is equivalent to the cell-centered nite volume formulation on rectangles.
46
The algebraic system is now
_
_
A
h
t
D
D 0
_
_
_
_
U
_
_
=
_
_
F
v
F
q
_
_
.
The row equation associated with v
h
= v
E
reads now
(
T
1
(E),E
+
T
2
(E),E
)u
E
p
T
1
(E)
+p
T
2
(E)
= 0, E ,
T,E
u
E
p
T
1
(E)
+p
E
= 0, E .
One can know eliminate U
(DA
1
h
t
D) P = F
q
DA
1
h
F
v
where DA
1
h
t
D is still a sparse matrix (5 diagonals).
Did we lose accuracy by replacing a by a
h
?
47
Le cas des triangles
Base de
W
T
:
v
T,E
i
=
1
2|T|
_
_
x
1
S
i
1
x
2
S
i
2
_
_
=
1
2|T|
S
i
M,
i = 1, 2, 3
Les v
T,E
i
verient
_
E
j
v
T,E
i
n
T
j
=
ij
.
e
e
e
e
e
e
e
e
e
e
e
e
e
e
B
r
r
r
c
S
1
S
3
S
2
E
2
E
3
E
1
n
T
2
n
T
3
n
T
1
M
y
S
i
_
S
i
1
S
i
2
_
M
_
x
1
x
2
_
48
Base de W
h
:
v
E
(x) =
_
_
v
T
1
(E),E
(x) si x T
1
(E)
v
T
2
(E),E
(x) si x T
2
(E)
0 ailleurs
E
49
Volumes nis triangulaires
Comme pour les rectangles on approche a par a
h
de sorte que
a(u
h
, v
h
) =
TT
h
_
T
K
1
u
h
v
h
. .
a
T
(u
h
,v
h
)
a
h
(u
h
, v
h
) =
TT
h
3
i=1
T,E
i
_
E
i
u
h
n
E
i
_
E
i
v
h
n
E
i
.
. .
a
T
h
(u
h
,v
h
)
La matrice de a
h
est diagonale.
50
Trouver u
h
W
h
et p
h
M
h
tels que
a
h
(u
h
, v
h
) b(p
h
, v
h
) = g(v
h
), v
h
W
h
,
b(u
h
, q
h
) = f(q
h
), q
h
M
h
.
Le syst`eme algebrique secrit maintenant
_
_
A
h
t
B
B 0
_
_
_
_
U
_
_
=
_
_
F
F
_
_
.
La ligne du syst`eme correspondant `a q
E
secrit maintenant
(
T
1
(E),E
+
T
2
(E),E
)u
E
p
T
1
(E)
+p
T
2
(E)
= 0,
E ,
T,E
u
E
p
T
1
(E)
+p
E
= 0, E .
51
On peut donc maintenant eliminer U
.
Reste `a choisir les coecients
T,E
i
de sorte que la precision ne soit pas aectee.
52
Estimations derreur
a et b sont comme avant, veriant les hypoth`eses de continuite, de V-ellipticite,
et la condition inf-sup .
Theor`eme : Hypoth`eses sur a
h
: il existe A
u
h
W
v
h
W
, u
h
, v
h
W
h
(H2) a
h
(v
h
, v
h
)
v
h
2
W
, v
h
V
h
= {v
h
W
h
| b(v
h
, q
h
) = 0, q
h
M
h
}.
Alors il existe C telle que
u u
W
+p p
M
C
_
inf
v
h
W
h
_
u v
h
W
+ sup
h
W
h
a(v
h
,
h
) a
h
(v
h
,
h
)
W
_
+ inf
q
h
M
h
(p q
h
M
)
_
.
53
On connait dej`a les erreurs dinterpolation :
inf
q
h
M
h
pq
h
M
Chp
H
1
()
, inf
v
h
W
h
(uv
h
W
) Ch(u
H
1
()
+divu
H
1
()
).
Il reste `a verier les hypoth`eses (H1) et (H2) pour appliquer le theor`eme, et `a
evaluer lerreur a a
h
.
54
Verication de lhypoth`ese (H2)
Les coecients
T,E
1
=
1
4|T|
(K
1
T
S
1
S
3
)
S
2
S
1
,
T,E
2
=
1
4|T|
(K
1
T
S
2
S
1
)
S
3
S
2
,
T,E
3
=
1
4|T|
(K
1
T
S
3
S
2
)
S
1
S
3
.
sont choisis de sorte que
Lemme :
a
T
(u
h
, v
h
) = a
T
h
(u
h
, v
h
), u
h
, v
h
V
T
= {v W
T
; divv = 0} = (P
0
(T))
2
. (1)
Corollaire : lhypoth`ese (H2) est veriee.
En eet, pour v
h
V
h
,
a
h
(v
h
, v
h
) =
TT
h
a
T
h
(v
h
, v
h
) =
TT
h
a
T
(v
h
, v
h
) = a(v
h
, v
h
) v
h
2
W
.
55
Verication de lhypoth`ese (H1)
On va montrer que
|a
T
h
(u
h
, v
h
)| Cu
h
0,T
v
h
0,T
, u
h
, v
h
W
h
(2)
ce qui implique (H1).
Passage `a lelement de reference : etc...
56
Estimation de lerreur a a
h
Lemme :
inf
v
0
(P
0
(T))
2
v
h
v
0
0,T
Chdivv
h
0,T
, v
h
W
h
. (3)
En eet, soit v
0
V
T
tel que v
h
= v
0
+(v
T,1
+v
T,2
+v
T,3
) avec =
|T|divv
h
3
.
v
h
v
0
2
0,T
=
2
1
4|T|
2
_
T
(
S
1
M +
S
2
M +
S
3
M)
2
=
2
1
12|T|
i=1,2,3
(
S
1
M
1
+
S
2
M
2
+
S
3
M
3
)
2
o` u M
1
, M
2
, M
3
sont les milieux des aretes opposees aux sommets S
1
, S
2
, S
3
.
57
etc...
Donc
v
h
v
0
2
0,T
=
1
144
(
3
i=1
|E
i
|
2
)divv
h
2
0,T
ce qui implique le lemme.
58
On peut maintenant estimer a a
h
.
Proposition :
inf
v
h
W
h
sup
h
W
h
a(v
h
,
h
) a
h
(v
h
,
h
)
W
Chu
W
. (4)
Preuve : Pour tout v
h
,
h
W
T
, il existe v
0
,
0
V
T
veriant
v
h
v
0
0,T
Chdivv
h
0,T
,
h
0,T
Chdiv
h
0,T
. (5)
Alors
a
T
(v
h
,
h
) a
T
h
(v
h
,
h
) = a
T
(v
h
,
h
0
) +a
T
(v
h
v
0
,
0
) +a
T
(v
0
,
0
)
[a
T
h
(v
h
,
h
0
) +a
T
h
(v
h
v
0
,
0
) +a
T
h
(v
0
,
0
)]
59
Legalite (1) et les inegalites (2),(5) impliquent
|a
T
(v
h
,
h
) a
T
h
(v
h
,
h
)| C(v
h
0,T
0,T
+v
h
v
0
0,T
0,T
)
Ch
T
(v
h
W
T
W
T
).
Donc, pour tout v
h
,
h
W
h
on a
a(v
h
,
h
) a
h
(v
h
,
h
)| Ch(v
h
W
),
sup
h
W
h
a(v
h
,
h
) a
h
(v
h
,
h
)
W
Chv
h
W
.
Si v
h
=
h
u alors
sup
h
W
h
a(
h
u,
h
) a
h
(
h
u,
h
)
W
Ch
h
u
W
Chu
W
et linegalite (4) est vraie.
60
Fin des estimations derreur
Grace aux estimations dinterpolation et `a lestimation (4), le theor`eme 1 nous
permet de conclure :
u u
W
+p p
M
Ch(p
1,
+u
1,
+divu
1,
).
Remarque : Pour que lanalyse ci-dessous fonctionne il faut que les coecients
T,E
i
, i = 1, 2, 3 soient strictement positifs
= les angles des triangles de T
h
doivent etre tous aigus.
61
Qualities and diculties of the nite volume method
On rectangles it is simple, leads to a positive-denite matrix, and satises
the maximum principle
Dicult to formulate for diormed rectangles and triangles
For triangles restriction on the meshes
Complicated formulation when K is not diagonal
62
OTHER CELL-CENTERED DISCRETIZATION METHODS
63
Mixed-hybrid nite elements
Instead of calculating u
h
W
h
, we now calculate
u
h
W
h
= {v
h
(L
2
())
2
; v
h
|T W
T
, T T
h
}
Functions of W
h
are not required to have their ux continuous across the edges.
Continuity of the ux will now be written explicitely.
We need also
N
h
= {
h
EA
h
E
,
E
R}.
64
The mixed-hybrid formulation is
Find u
h
W
hg
, p
h
M
h
,
h
N
h
such that
_
T
K
1
u
h
v
h
_
T
p
h
divv
h
+
ET
_
E
h
v
h
n
T
=
_
D
pv
h
n
T
,
v
h
W
h
, T T
h
_
T
div u
h
q
h
=
_
T
f q
h
, q
h
M
h
, T T
h
TT
h
,TE
u
h
n
T
h
= 0, E A
h
, E ,
h
N
h
u
h
n|
E
= g|E|, E
N
,
h
|
E
= p, E
D
.
h
represents a trace of the pressure on the edges E A
h
.
We check easily that p
h
= p
h
, u
h
|
T
= u
h
|
T
, T T
h
.
65
The linear system
_
_
A
t
D
t
B
D 0 0
B 0 I
D
_
_
_
_
U
_
=
_
_
F
v
F
q
F
_
A
= A
(1)
(F
v
+
t
DP +
t
B) to get
_
_
DA
(1) t
D DA
(1) t
B
BA
(1) t
D BA
(1) t
B +I
D
_
_
_
_
P
_
_
=
_
_
F
q
DA
(1)
F
v
F
BA
(1)
F
v
_
_
The matrix DA
(1) t
D is diagonal, so we can eliminate P:
P = (DA
(1) t
D)
1
[F
q
DA
(1)
F
v
(DA
(1) t
B)] to obtain
H = G (H sparse)
66
where H = BA
(1) t
B +I
D
(BA
(1) t
D)(DA
(1) t
D)
1
(DA
(1) t
B)
G = F
BA
(1)
(BA
(1) t
D)(DA
(1) t
D)
1
(F
q
DA
(1)
F
v
)
67
Properties of the matrix H
H is sparse
The number of nonzeros in the line E is equal to the number of neighbouring
edges + 1 (for E itself) (7 for a rectangular mesh).
H is positive denite
To prove it, assuming (H, ) = 0 we have to show that this implies = 0.
Then
((BA
(1) t
B+I
D
), ) ((BA
(1) t
D)(DA
(1) t
D)
1
(DA
(1) t
B), ) = 0
Introduce P = (DA
(1) t
D)
1
((DA
(1) t
B)). We obtain
(A
(1) t
B,
t
B) + (I
D
, ) (A
(1) t
DP, B) = 0
68
But equation for P implies that
((DA
(1) t
D)P, P) + ((DA
(1) t
B), P) = 0.
Adding to the previous equation gives
(A
(1)
(
t
DP +
t
B),
t
DP +
t
B) + (I
D
, ) = 0
Since A
(1)
is positive denite and I
D
is positive semi-denite, this implies that
t
DP +
t
B = 0 and
E
= 0, E
D
.
Equation
t
DP +
t
B = 0 says actually that
P
T
E
= 0, E T, T T
h
which means that the pressure is constant over .
But from
E
= 0, E
D
it follows that P = 0 and = 0.
69
A PROJECT
70
The problem
div u = f, u = K
grad p, in = (0.1) (0, 1)
p = 100 on
1
, u n = 0 on
2
, u n = 10 on
3
.
3/4
3
2
2
1
1/4
1/4
3/4
1. Solve for K =
_
_
10 0
0 10
_
_
, K =
_
_
10 0
0 100
_
_
, K =
_
_
10 9
9 10
_
_
2. Solve for K =
_
_
1 0
0 1
_
_
in the shaded area, K =
_
_
10 0
0 10
_
_
outside the
shaded area.
3. Calculate the errors p p
h
0
, u u
h
0
.
71
A remark on checking the program
One check of the program follows from choosing u W
h
.
Since W
h
W, M
h
M problem P
m
implies
_
_
_
a(u, v
h
) b(v
h
, p) = l
W
(v
h
), v W
h0
,
b(u, q
h
) = l
M
(q
h
), q
h
M
h
.
Denoting
h
p the L
2
-projection of p, since div is a mapping from W
h
onto M
h
,
we have
_
divv
h
(p
h
p) = 0 for all v
h
W
h
.
Therefore u W
h
,
h
p M
h
is the unique solution to the equations :
_
_
_
a(u, v
h
) b(v
h
,
h
p) = l
W
(v
h
), v W
h0
,
b(u, q
h
) = l
M
(q
h
), q
h
M
h
.
72
Thus, to check the program,
1. choose u W
h
2. calculate directly
_
E
u n
E
, E A
h
as well as
1
|T|
_
T
p, T T
h
.
These numbers should be equal to u
E,EA
h
, p
T,TT
h
calculated by the program
up to the machine accuracy.
73