Anda di halaman 1dari 10

NUMERICAL METHODS FOR PARTIAL DIFFERENTIAL EQUATIONS

Master in Applied Mathematics and Mathematical Engineering 2013-2014


Dr. M. Discacciati

Final Exam
January 14th, 2014

INSTRUCTIONS
Solve three out of four problems.
Read carefully the questions and answer in a pertinent, clear and concise way.
Write in a clear and readable way: illegible texts will not be corrected and will be graded 0
points.
You may write your answers in English, Spanish or Catalan.
Books and/or personal notes are not allowed during the exam.
The use of mobile phones, tablets, notebooks and calculators is strictly forbidden.
Time allowed: 2 hours.

NAME:

FAMILY NAME:

CHOSEN PROBLEMS:

1
2
Problem 1 [50 points]
Let Rd (d = 2, 3) be an open bounded domain and consider the boundary value problem:

u + u = f in
(1)
u n = g on

where f L2 () and g L2 () are given functions.


1. [10 points] The bilinear form associated to problem (1) is
Z Z
a(u, v) = u v + uv u, v V.

How should the space V be defined?


2. [15 points] It can be proved that the bilinear form a(, ) and the linear functional associated
to problem (1) are continuous in H 1 () with respect to the H 1 -norm. Can we conclude that
the weak form of problem (1) is well-posed?
3. [15 points] Assume that the solution u of problem (1) is such that u H 3 (). Which
polynomial degree r 0 would you suggest to use for the finite element approximation of
this problem? Why?
4. [10 points] Provide an estimate of the condition number of the stiffness matrix of the linear
system in terms of the space discretization parameter h.

3
Problem 2 [50 points]
Let Rd (d = 2, 3) be an open bounded domain with boundary = D N , int(D )
int(N ) = . Consider the steady Stokes problem:

u + p = f in
div u = 0 in
(2)
u = 0 on D
u n pn = 0 on N ,

where f [L2 ()]d is an assigned forcing term and the viscosity > 0 is assumed to be constant.
1. [10 points] For the finite elements approximation, we consider P1 elements for the velocity
and P0 elements for the pressure. Write the definition of the finite dimensional spaces V h
and Qh . Will the discrete pressure be continuous or discontinuous? Why?
2. [20 points] Suppose that = (0, 1)2 R2 with D and N as shown in the following figure:

N D

Consider a structured uniform triangulation obtained by subdividing each side in k 1


intervals with k > 1 (an example with k 1 = 4 is shown in the figure).
Let N and M be, respectively, the dimensions of the finite elements spaces V h and Qh to
approximate the velocity and the pressure.
Knowing that a necessary condition to ensure the inf-sup stability of the discrete velocity
and pressure spaces is that N M , prove that the pair P1 P0 does not satisfy the inf-sup
condition for the problem that we are considering.
(Hint: if M > N , the inf-sup condition will not be satisfied.)
3. [20 points] To use the proposed finite elements spaces, we consider the Galerkin/Least-
Squares (GLS) stabilization: find uh V h , qh Qh such that

a(uh , vh ) + b(vh , ph ) = F (vh ) h (vh ) vh V h


(3)
b(uh , qh ) = G(qh ) + h (qh ) qh Qh ,

where
X Z
h (vh ) = h2K (uh + ph f ) (vh )
KTh K
X Z
h (qh ) = h2K (uh + ph f ) qh
KTh K

and > 0 is a suitable stabilization parameter.


Write the linear system that corresponds to the GLS formulation (3) taking P1 P0 elements.
Do you expect that the proposed GLS stabilization will be effective? Why?

4
Problem 3 [50 points]
Let Rd (d = 2, 3) be an open bounded domain. Consider the following parabolic problem:
find u = u(x, t) such that

u
u + b u = f in , t > 0
t (4)
u = 0 on , t > 0
u = u0 in , t = 0,

where > 0, u0 L2 (), and f and b are suitable known functions.

1. [20 points] Consider a discretization in space using the finite elements method and a dis-
cretization in time using a finite difference scheme. Write the semi-discrete problem in space
and the associated system of ordinary differential equations.
2. [15 points] Use the -method to perform the time discretization of the obtained system of
ordinary differential equations. For which values of the parameter do we obtain an explicit
scheme? And when an implicit method?
3. [15 points] If we use the forward Euler scheme or the backward Euler scheme, which restric-
tions do we have on the choice of the time step t? Which of these two methods is more
attractive from the computational point of view?

5
Problem 4 [50 points]
Let Rd (d = 2, 3) be an open bounded domain and consider the diffusion-transport problem:
find u such that
u + b u = f in = (0, 1) (0, 1)
(5)
u = 0 on .

1. [10 points] To compute the finite element approximation of problem (5) we use Lagrangian
elements of degree r 0. Will the stiffness matrix be symmetric? Why?
2. [20 points] A finite element code has been implemented to compute the numerical approx-
imation of problem (5). For = 1, b = 0 and a suitable f , the following error estimates
have been obtained with respect to a smooth exact solution u C ():

h = 0.1 h = 0.05 h = 0.025 h = 0.0125


P1 6.436364 102 1.647080 102 4.361876 103 1.063665 103
P2 1.449035 103 1.790226 104 2.403307 105 2.892609 106
Errors in L2 -norm: ||u uh ||L2 () for elements P1 and P2 .

h = 0.1 h = 0.05 h = 0.025 h = 0.0125


P1 1.150195 100 5.712616 101 2.926054 101 1.443058 101
P2 9.194743 102 2.307941 102 6.068649 103 1.480645 103
Errors in the H 1 norm: ||u uh ||H 1 () for elements P1 and P2 .

May we assume that the implementation is correct? Why?


3. [20 points] For = 102 , kbk = 1, a suitable f and grid size h = 101 the following solution
has been computed with P1 elements at y = 0.5:

Are these (unphysical) oscillations due to a bug in the code?

6
NUMERICAL METHODS FOR PARTIAL DIFFERENTIAL EQUATIONS
Master in Applied Mathematics and Mathematical Engineering 2013
Dr. M. Discacciati

Final Exam Solution

Problem 1

1. The space is V = H 1 ().


2. To ensure the well-posedness of the weak problem we can use the Lax-Milgram lemma. Since
we know that the bilinear form and the functional are continuous in V , we must only check
the coercivity of the bilinear form in this space. We have

a(v, v) = kvk2L2 () + kvk2L2 () = kvk2H 1 () v V.

Thus, the bilinear form is coercive with coercivity constant 1.


The hypotheses of the Lax-Milgram lemma are satisfied and we can conclude that the given
problem is well-posed.
3. Assuming that the domain is polygonal and that the triangulation Th is uniform, we know
that the following error estimates hold:

ku uh kL2 () C0 hs+1 |u|H s+1 ()


ku uh kH 1 () C1 hs |u|H s+1 ()

for suitable positive constants C0 and C1 , independent of h, and where s = min{p, r}


supposing that u H p+1 () for some p 1.
In our case, u H 3 () so that p = 2. Thus, it is not worth using polynomials of degree
larger than 2, since this will not increase the convergence rate of the method. We will choose
r = 2 to guarantee an optimal convergence rate.
4. We know that the condition number of the stiffness matrix A is proportional to h2 , h being
the grid size.

Problem 2

1. Let Th be a suitable triangulation of depending on a positive parameter h > 0.


The finite dimensional spaces can be defined as follows:

V h = {vh [C 0 ()]d : v = 0 on D and vh|K P1 K Th }


2
Qh = {qh L () : qh|K P0 K Th }.

The pressure will be discontinuous since it will approximated by a constant value in each
element K of the triangulation and there are no continuity conditions between such values
in adjacent elements K.
2. Let N = dim(V h ) and M = dim(Qh ).
The dimensions N and M correspond to the number of degrees of freedom for velocity and
pressure, respectively.

1
M coincides with the number of triangles of the triangulation:

M = 2(k 1)(k 1).

Lets compute the number of degrees of freedom for each component of the velocity. In total,
we have k 2 nodes. We notice that on three edges of the domain we impose a Dirichlet
boundary condition, thus we have to remove these nodes from the degrees of freedom. The
nodes in which we impose a Dirichlet boundary condition are k + k + (k 2). Thus, for each
component of the velocity we have

k 2 (k + k + (k 2)) = k 2 3k + 2 = (k 1)(k 2)

degrees of freedom.
The problem is two-dimensional, so that we have two components of the velocity and N =
2(k 1)(k 2).
We can easily see that M > N and we can conclude that the inf-sup condition cannot be
satisfied.
3. If we consider the proposed finite element spaces, we can see that

uh|K = vh|K = 0 for uh , vh V h

because the functions in V h are polynomials of degree 1 on each K. Moreover,

ph|K = qh|K = 0 for ph , qh Qh

because the functions in Qh are polynomials of degree 0 on each K.


Thus, h (vh ) = 0 for all vh V h and h (qh ) = 0 for all qh Qh .
The linear system associated to the Stokes problem with the proposed finite elements dis-
cretization and GLS stabilization becomes
    
A BT U F
=
B 0 P 0

where
Z
Aij = i : j i, j = 1, . . . , N
Z

Bji = j div i i = 1, . . . , N, j = 1, . . . , M
Z
Fi = f i i = 1, . . . , N

and {i }i=1,...,N and {j }j=1,...,M are suitable basis functions for the spaces V h and Qh ,
respectively.
The linear system that we have obtained coincides with the one that we would obtain without
stabilization. Thus, the proposed stabilization method gives no contribution for the finite
elements spaces that we are using and it will not be effective. Other stabilization techniques
should be considered.

2
Problem 3
1. Let V = H01 () and Vh V a suitable finite dimensional approximation. The semi-discrete
problem in space becomes: for each t > 0, find uh (t) Vh such that
Z Z Z Z
uh (t)
vh + uh (t) vh + (b uh (t))vh = f vh vh Vh
t

with uh (0) = u0h . The corresponding system of ordinary differential equations reads:
du(t)
M + Au(t) = f (t).
dt
Here, M is the mass matrix, A is the stiffness matrix associated to the bilinear form involving
the diffusion and convection terms, while u(t) = (u1 (t), . . . , uNh (t))T is the vector of the
unknown nodal values.
2. Using the -method for the time discretization we finally obtain
un+1 un
M + A(un+1 + (1 )un ) = f n+1 + (1 )f n .
t
If = 0 the scheme is explicit (and it corresponds to the forward Euler method), otherwise
it is implicit.
3. The backward Euler scheme ( = 1) is unconditionally stable, while for the forward Euler
method the following restriction holds:
t Ch2
for a suitable positive constant C > 0. At each time step, the forward Euler method
is cheaper than the backward Euler one, since one has to solve a linear system with mass
matrix (that, possibly, can be diagonalized). If the stability condition of this scheme does not
become too restrictive for the problem at hand, the forward Euler method is then generally
cheaper than the backward Euler one.

Problem 4
1. The bilinear form associated to the problem is
Z Z
a(u, v) = u v + (b u)v u, v H 1 ()

which is clearly non-symmetric due to the transport term. Thus, also the corresponding
stiffness matrix will not be symmetric.
2. We must refer to the error estimates:
ku uh kL2 () C0 hs+1 |u|H s+1 ()
ku uh kH 1 () C1 hs |u|H s+1 ()
where C0 and C1 are suitable positive constants, independent of h, and s = min{p, r}
supposing that u H p+1 () for some p 1. In this case u C () so that s = r. Thus,
using elements of degree r, we expect convergence r + 1 in L2 -norm and r in H 1 -norm.
For P1 elements, the L2 error is divided roughly by 4 when halving h denoting quadratic
convergence, while the H 1 error is divided by 2 indicating a linear convergence.
For P2 elements, the L2 error is reduced by a factor 8, while the H 1 error by 4.
The numerical convergence rates fit the theoretical estimates. Thus, we may assume that
the implementation is correct.

3
3. We have a transport-diffusion problem. Unphysical oscillations may be due to a Peclet
number larger than 1. In this case,

kbkh 1 101
Pe = = = 5 > 1.
2 2 102
Thus, the oscillations are due to a dominating transport term. A suitable stabilization
technique should be applied.

Anda mungkin juga menyukai