giorgio bornia tesi

giorgio bornia tesi
Alma Mater Studiorum - Università di Bologna
Dottorato di Ricerca in Ingegneria Energetica,
Nucleare e del Controllo Ambientale
Ciclo XXIV
Settore concorsuale di afferenza: 09/C3
Settore scientifico-disciplinare: ING-IND/19
ANALYSIS OF OPTIMAL CONTROL PROBLEMS
FOR THE INCOMPRESSIBLE MHD EQUATIONS
AND IMPLEMENTATION IN A FINITE ELEMENT
MULTIPHYSICS CODE
Presentata da: GIORGIO BORNIA
Coordinatore del Dottorato:
Prof. ANTONIO BARLETTA
Relatore:
Dott.Ing. SANDRO MANSERVISI
Esame finale anno 2012
Contents
Introduction
1 Abstract setting for optimal control problems
1.1 Normed spaces . . . . . . . . . . . . . . . . . .
1.2 Sobolev spaces . . . . . . . . . . . . . . . . . .
1.3 Abstract frameworks for mixed problems . . . .
1.3.1 Abstract linear mixed problem . . . . . .
1.3.2 Abstract nonlinear mixed problem . . . .
1.4 Constrained nonlinear optimal control problems
5
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
7
7
9
16
16
20
22
2 Lifting function approach for boundary optimal control
2.1 Optimal control of the MHD equations . . . . . . . . . . .
2.2 Description of the optimal control problem . . . . . . . . .
2.3 Weak formulation of the MHD state problem . . . . . . . .
2.4 Existence of a solution to the state equations . . . . . . . .
2.4.1 Reduction to homogeneous boundary conditions . .
2.4.2 Coercivity property . . . . . . . . . . . . . . . . . .
2.4.3 Existence . . . . . . . . . . . . . . . . . . . . . . .
2.5 Optimal control problem . . . . . . . . . . . . . . . . . . .
2.5.1 Existence of an optimal solution . . . . . . . . . . .
2.5.2 First-order necessary condition . . . . . . . . . . .
2.5.3 Optimality system . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
27
27
30
34
39
39
41
43
45
45
47
52
.
.
.
.
55
55
64
67
69
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3 Finite element approximation of the optimality system
3.1 Finite element method . . . . . . . . . . . . . . . . . . .
3.2 Finite element multigrid algorithm . . . . . . . . . . . .
3.3 Approximation of the optimality system . . . . . . . . .
3.4 Gradient algorithm for the optimality system . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4 Computational implementation of the optimality system
73
4.1 The FEMuS library . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
iv
Contents
4.2
4.3
4.4
Configuration of the FEMuS library . . . . . .
4.2.1 External libraries . . . . . . . . . . . .
4.2.2 Internal configuration . . . . . . . . . .
Library main classes . . . . . . . . . . . . . .
4.3.1 The EquationsMap class . . . . . . . .
4.3.2 The EqnBase class . . . . . . . . . . .
4.3.3 The Quantity class . . . . . . . . . . .
4.3.4 The Vect class . . . . . . . . . . . . . .
4.3.5 The Mesh, GeomEl and Domain classes
4.3.6 The GenCase class . . . . . . . . . . .
4.3.7 The FEElemBase and FEGauss classes
4.3.8 The RunTimeMap class . . . . . . . .
4.3.9 The Physics class . . . . . . . . . . . .
4.3.10 The Utils and Files classes . . . . . . .
Multiphysics application structure . . . . . . .
4.4.1 Basic structure . . . . . . . . . . . . .
4.4.2 Main function . . . . . . . . . . . . . .
4.4.3 Equation implementation . . . . . . . .
5 Numerical results
5.1 Code verification test for the lifting function
5.2 Two-dimensional optimal control case . . . .
5.3 Three-dimensional results . . . . . . . . . .
5.3.1 Hartmann flow optimal control case .
5.3.2 Flow inversion optimal control case .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
76
76
78
80
81
83
85
86
87
88
90
92
92
93
93
93
100
102
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
105
105
111
118
118
122
Conclusions
137
List of Figures
142
List of Tables
143
Bibliography
148
Introduction
This thesis deals with the study of optimal control problems for the incompressible
Magnetohydrodynamics (MHD) equations. Particular attention to these problems
arises from several applications in science and engineering, such as fission nuclear
reactors with liquid metal coolant, aluminum casting in metallurgy and crystal
growth in semiconductor industry. In such applications it is of great interest to
achieve the control on the fluid state variables through the action of the magnetic
Lorentz force. In this thesis we investigate a class of boundary optimal control
problems, in which the flow is controlled through the boundary conditions of the
magnetic field. We consider a systematic mathematical treatment for the analysis,
discretization and numerical solution of these problems, which are expressed in
terms of the constrained minimization of a cost functional. Due to their complexity,
boundary optimal control problems present a wide variety of challenges in the
definition of an adequate solution approach, both from a theoretical and from a
computational point of view. In this thesis we propose a new boundary control
approach, based on lifting functions of the boundary conditions, which yields both
theoretical and numerical advantages. With the introduction of lifting functions,
boundary control problems can be formulated as extended distributed problems.
The work is organized in five chapters as follows. In Chapter 1 we introduce
the basic mathematical concepts for the analysis of the optimal control problems
considered in this work. After recalling some general definitions about normed
spaces, we illustrate the Sobolev function spaces and we quote some fundamental
properties related to them. Then, we report two standard abstract results about
the existence of solutions to linear and nonlinear mixed variational problems. The
MHD equations we consider in this thesis fall within the nonlinear abstract framework. Furthermore, we describe an abstract formulation of constrained nonlinear
optimal control problems upon which our subsequent analyses are built.
In Chapter 2 the lifting function approach proposed in this work for the treatment of boundary optimal control problems is illustrated. The optimal control
problem is formulated in terms of the minimization of a cost functional with the
nonlinear constraints of the MHD equations. A weak formulation of these equations is given and the existence of a solution is proved. Then, the existence of
6
Introduction
a solution to the optimal control problem is shown. By means of the Lagrange
multiplier principle, a first-order necessary condition is derived from which an optimality system is obtained. A solution of the optimality system is a candidate
solution for the original optimal control problem.
Chapter 3 describes the main principles about the finite element method that is
used for the discretization of the optimality system. It also illustrates the multigrid
algorithm for the solution of linear systems arising from finite element approximation. In order to solve the optimality system in a robust and accurate manner, a
gradient algorithm is described.
Chapter 4 is devoted to the description of the finite element object-oriented
library that has been implemented for the numerical solution of the optimality
system. A description of the library structure, functionalities and main classes is
given. The library can perform the solution of the optimality system for parallel
architectures and multigrid solvers. A particular attention in the library development was given to a modular and flexible implementation of a set of coupled
equations in a multi-physics framework, such as the optimality system here considered.
In Chapter 5 we show the results of numerical solutions of the optimality system
for two- and three-dimensional cases. These results show that a candidate solution
of the optimal control problem here considered can be computed in a robust and
effective manner.
Chapter 1
Abstract setting for optimal
control problems
1.1
Normed spaces
We use the terminology normed vector space or more concisely normed space to
indicate a vector space endowed with a norm. The definitions we provide here
regarding normed spaces are consistent with their underlying counterparts in the
context of topology.
A set V is a neighborhood of a point p of a normed space if there exists an
open ball with center p and radius r > 0 that is contained in V . Given a subset
S of a normed space X, a neighborhood of a subset is a neighborhood of all of its
points. We say that a point x ∈ X is an accumulation point (or limit point) of
S in X if every neighborhood of x contains at least one element m ∈ S different
from x. Note that x need not belong to S. We define the closure of S in X as
the set given by the union of S and all the accumulation points of S in X. We
denote it as S̄ X or simply S̄ if no ambiguity arises. The subset S is said to be
closed in X if it contains all its accumulation points, namely, S = S̄. A subset S
of X is said to be dense in X if S̄ = X. In this case, each x ∈ X is the limit of a
sequence of elements of S. Furthermore, a subset S is convex if, for all x, y ∈ S
and all α ∈ [0, 1], one has that αx + (1 − α)y ∈ S. Note that both closed and
convex subsets are not vector spaces in general. The normed space X is separable
if it contains a countable dense subset.
A normed space is said to be a complete if every Cauchy sequence is convergent
in the norm of the space. A complete normed space is commonly referred to as
Banach space. Every normed space X is either a Banach space or a dense subset of
a Banach space Y , called the completion of X, whose norm satisfies kxkY = kxkX
for all x ∈ X. If an inner product (·, ·) is defined on a vector space, a norm
8
Abstract setting for optimal control problems
p
induced by this inner product can always be defined as kxk = (x, x). If the
space endowed with such a norm is complete, it is said to be a Hilbert space.
Given two normed spaces X and Y with norms k · kX and k · kY respectively,
we say that an operator f : X → Y is continuous if, for any sequence {xn } in X
such that kxn − xkX → 0 as n → ∞, one has kf (xn ) − f (x)kX → 0. When f
is linear, it can be shown that the continuity of f is equivalent to the existence
of a constant C such that kf (x)kY ≤ CkxkX for all x ∈ X. This last property
is referred to by saying that f is a bounded linear operator. A linear continuous
bijection between two spaces with a continuous inverse is called an isomorphism.
We now give some notions of compactness. A subset A of X is said to be
compact if every sequence in A has a subsequence converging to some element of
A for the norm of X. The set A is called precompact in X if its closure Ā in the
norm topology of X is compact. An operator f between X and Y is said to be
compact if f (B) is precompact whenever B is bounded in X (i.e., whenever B is
contained in a ball with some finite radius R centered in the zero element of X).
Given a vector space V , we define the dual space V 0 of V as the space of all linear
functionals g : V → R that are continuous with respect to the topology induced
by the norm of V . The dual space is itself a vector space under straightforward
definitions of pointwise addition and scalar multiplication. We denote with < ·, · >
the duality pairing between V 0 and V . If V is endowed with a norm k · kV , a norm
can be defined on the dual space V 0 as
kf kV 0 = sup | < f, v > | .
(1.1)
kvkV ≤1
It can be shown that this definition is well posed due to the continuity and linearity
of the functionals. The topology induced by this norm or by equivalent norms turns
V 0 into a Banach space, whether or not V is Banach. Then, V 0 is called the normed
dual of V .
Given the definition of dual space, we may define the concept of weak convergence. A sequence {vn } in V is said to converge weakly to some element v ∈ V
if the sequence {< f, vn >} converges to < f, v > for all f ∈ V 0 . The corresponding underlying topology is the weakest topology (i.e., the topology with the
fewest open sets) that still renders continuous each element of the normed dual
V 0 . We denote weak convergence as vn * v, while the usual convergence in the
norm k · kV is also called strong convergence and is denoted as vn → v. Since by
the continuity of the dual elements we have | < f, vn > | ≤ kf kV 0 kvn kV , strong
convergence implies weak convergence. The converse is generally not true, unless
V is finite-dimensional.
Let us also endow normed spaces with a definition of reflexivity. Consider a
normed space V and its second dual V 00 = (V 0 )0 , consisting in the space of linear
functionals f : V 0 → R that are continuous with respect to the topology induced
1.2. Sobolev spaces
9
by the norm of V 0 . Let us denote with < ·, · >V the duality pairing between V 0 and
V and with < ·, · >V 0 the duality pairing between V 00 and V 0 . A linear injection
J : V → V 00 can be defined by associating to every element v0 ∈ V an element of
the second dual Jv0 ∈ V 00 , given by the evaluation at the point v0 of any v 0 ∈ V 0 ,
namely
< Jv0 , v 0 >V 0 = < v 0 , v0 >V , v 0 ∈ V 0 .
(1.2)
It can be shown via the Hahn-Banach extension theorem that J is an isometric
isomorphism of V into V 00 . If the range of J is the entire space V 00 , then the space
V is said to be reflexive.
Finally, we provide the notion of embedding between two normed spaces. We
say that X is embedded into Y if X is a vector subspace of Y , and the operator
I : X → Y defined by Ix = x for all x ∈ X is continuous. The operator I is
called embedding and it is evidently linear by definition. Therefore, embeddings
are bounded operators. An embedding I is said to be dense if X is dense in Y ,
and compact if the embedding operator I is compact.
1.2
Sobolev spaces
In order to establish the mathematical formulation of an optimal control problem,
the definition of appropriate function spaces is in order. The Sobolev spaces and
some of their properties that will be used in the following are briefly introduced in
this section. For a thorough discussion on these spaces we refer to [1]. We assume
that the reader is familiar with the following definitions concerning subsets of the
Euclidean space Rn . Unless otherwise stated, we consider a Lipschitz continuous
simply connected convex open bounded domain Ω ⊂ Rn . Lack of convexity typically brings to a lack of regularity in the solution of differential problems defined
on such domains. Since we are interested in boundary optimal controls, the regularity properties of the boundary are also important for the statement of some
results and the Lipschitz continuous hypothesis is often necessary.
We denote by D(Ω) or C0∞ (Ω) the vector space of infinitely differentiable functions with compact support in Ω. In particular we define the set D(Ω) by
D(Ω) = {u|Ω ; u ∈ D(RN )} = {u|Ω ; u ∈ D(O)} ,
(1.3)
where O is any open subset of RN such that Ω ⊂ O. The space of linear functionals
on D(Ω) that are continuous with respect to the usual definition of convergence in
D(Ω) is denoted as D0 (Ω) and is called the space of distributions on Ω. We denote
by < ·, · > the duality pairing between D0 (Ω) and D(Ω). In order to define the
derivative of a distribution, we introduce a multi-index α = (α1 , . . . , αN ) ∈ NN
10
Abstract setting for optimal control problems
together with the notation
N
X
|α| =
αi .
(1.4)
i=1
We define for α ∈ NN the derivative of a distribution u ∈ D0 (Ω) as the distribution
∂ α u ∈ D0 (Ω) such that
< ∂ α u, φ >= (−1)|α| < u, ∂ α φ >
∀ φ ∈ D(Ω) .
(1.5)
Let us now define Lebesgue spaces or Lp spaces, upon which lies the construction
of Sobolev spaces. For every real number p such that 1 ≤ p < ∞, we indicate
with the usual notation Lp (Ω) the vector space whose elements are the equivalence
classes of Lebesgue integrable functions u : Ω → R such that
Z
p1
p
< ∞,
(1.6)
|u| dΩ
Ω
with respect to the following equivalence relation: two functions are identified
if they are equal almost everywhere in Ω, namely, up to any subset of Ω with
Lebesgue measure zero. The space L∞ (Ω) is defined as the vector space of Lebesgue
integrable functions such that
ess sup |u(x)| < ∞ ,
(1.7)
x∈Ω
where “ess sup” denotes the essential supremum, i.e. the supremum up to a set of
measure zero. Hence, these functions are said to be essentially bounded.
For 1 ≤ p < ∞, Lp (Ω) is a Banach space for the norm
kukLp =
Z
Ω
p
|u| dΩ
p1
.
(1.8)
Also L∞ (Ω) is a Banach space with the norm
kukL∞ = ess sup |u(x)| .
(1.9)
x∈Ω
The space L2 (Ω) is also a Hilbert space for the inner product
Z
(u, v)L2 =
u v dΩ .
(1.10)
Ω
Now we recall some fundamental results concerning Lebesgue spaces. The
following inequalities are often used for proving important properties of variational
problems, such as those considered in this thesis. We begin with the Minkowski
inequality, which is a necessary condition for k · kLp to be a norm for Lp spaces.
11
1.2. Sobolev spaces
Theorem 1. Let u, v ∈ Lp (Ω). Then
ku + vkLp ≤ kukLp + kvkLp .
(1.11)
The Minkowski inequality is proved by using the well-known Hölder’s inequality, which yields a characterization of the product of two functions belonging to
different Lebesgue spaces. In the following, we say that two indices p, q ∈ N are
Hölder conjugate provided that
1 1
+ = 1.
p q
(1.12)
When either p or q are taken as infinity, 1/∞ means zero.
Theorem 2 (Hölder’s inequality). Let p, q ∈ N, 1 ≤ p, q ≤ ∞ be Hölder conjugate
indices. If u ∈ Lp (Ω) and v ∈ Lq (Ω), then u v ∈ L1 (Ω) and
ku vkL1 ≤ kukLp kvkLq .
(1.13)
For p = q = 2 Hölder’s inequality is referred to as Cauchy-Schwarz inequality,
namely
|(u, v)L2 | ≤ kukL2 kvkL2 .
(1.14)
Hölder’s inequality can be generalized to more than two functions as follows.
Theorem 3 (Generalized
Let the numbers p1 , . . . , pn ∈ N be
Pn 1 Hölder’s inequality).
pi
chosen such that i=1 pi = 1. Let ui ∈ L (Ω), i = 1, . . . , n. Then
n Y ui i=1
L1
≤
n
Y
i=1
kui kLpi .
(1.15)
Also, let us recall an embedding property concerning Lp spaces.
Theorem 4. Suppose that Ω has a finite measure. Then, if 1 ≤ p ≤ q ≤ ∞, the
space Lq (Ω) is continuously embedded in Lp (Ω).
It can be shown that the Lp spaces are separable for 1 ≤ p < ∞ and reflexive
for 1 < p < ∞.
The transition from Lebesgue spaces towards Sobolev spaces goes through the
notion of weak derivative or distributional derivative of Lp (Ω) functions. This
stems from the previous definition of derivative of a distribution. We say that a
function u is locally integrable on Ω if u ∈ L1 (U ) for every open set U such that its
closure Ū is contained in Ω and Ū is compact. We denote as L1loc (Ω) the space of
12
Abstract setting for optimal control problems
locally integrable functions on Ω. To every function u ∈ L1loc (Ω) we can associate
a distribution indicated as Tu ∈ D0 (Ω), which is defined as
Z
< Tu , φ > =
u φ dΩ ∀ φ ∈ D(Ω) .
(1.16)
Ω
It can be easily shown that this definition is well posed. A function u ∈ L1loc (Ω)
is then said to have a weak derivative of order α if there exists a function v ∈
L1loc (Ω) whose associated distribution Tv is equal to the derivative of order α of
the distribution Tu associated to u, i.e., Tv = ∂ α Tu ∈ D0 (Ω). If the weak derivative
of u exists, it is unique up to a set of measure zero and it will be denoted again
as ∂ α u. Since for 1 ≤ p ≤ ∞ we have Lp (Ω) ⊂ L1loc (Ω), the definition of weak
derivative also holds for Lp (Ω) functions.
We are now ready to define the Sobolev space W m,p (Ω) for every integer m ≥ 0
and every real 1 ≤ p < ∞ as
W m,p (Ω) = {u ∈ Lp (Ω) | ∂ α u ∈ Lp (Ω) ∀ |α| ≤ m} .
If we equip W m,p (Ω) with the norm

1/p

1/p
X Z
X
kukm,p = 
|∂ α u|p dΩ
= 
k∂ α ukpLp  ,
|α|≤m
Ω
(1.17)
(1.18)
|α|≤m
it can be proved to be a Banach space for all p < ∞. When p = 2 the Sobolev
space W m,2 (Ω) will be denoted as H m (Ω) and its norm as k · km as a shorthand
for k · km,2 . This is a Hilbert space with the inner product defined by
X Z
(u, v)m =
(∂ α u) (∂ α v) dΩ .
(1.19)
|α|≤m
Ω
For p = ∞ the space W m,p is still a Banach space when the norm is defined as
α
kukm,∞ = max ess sup |∂ u(x)| = max k∂ α ukL∞ .
(1.20)
|α|≤m
|α|≤m
x∈Ω
As D(Ω) ⊂ W m,p (Ω), we can define the closure of D(Ω) in W m,p (Ω) with
respect to the norm k · km,p . We write
W m,p
W0m,p (Ω) = D(Ω)
.
(1.21)
We denote H0m (Ω) = W0m,2 (Ω).
The spaces W0m,p (Ω) are endowed with a number of interesting properties. An
important inequality that involves them is the Poincaré-Friedrichs inequality. It
13
1.2. Sobolev spaces
comes in handy especially when proving the coercivity of variational forms. We
consider the seminorm | · |m,p in W m,p (Ω) given by

1/p
X Z
|u|m,p = 
|∂ α u|p dΩ .
(1.22)
|α|=m
Ω
Clearly, all the multi-indices with |α| = m are considered. We immediately have
that |u|m,p ≤ kukm,p . On the space W0m,p (Ω) the following theorem yields an
inequality in the opposite sense, so that the seminorm is also a norm.
Theorem 5 (Poincaré-Friedrichs inequality). Let Ω be connected and bounded in
at least one direction. Then, for each integer m ≥ 0, there exists a constant
K = K(m, Ω) such that
kukm,p ≤ K|u|m,p
∀ u ∈ W0m,p (Ω) .
(1.23)
As for Lebesgue spaces, it can be shown that W m,p (Ω) is separable for 1 ≤ p <
∞ and reflexive for 1 < p < ∞. The separability property is important for the
analysis of the nonlinear problems that will be considered in this thesis.
Some fundamental properties of the Sobolev function spaces can be stated
through the Sobolev Embedding Theorem. This is a fundamental result in the
analysis of partial differential equations and often a crucial point in the analysis of
m,p
nonlinear problems. In the following, we denote by Wloc
(Ω) the space of functions
m,p
belonging to W (Ω) for any open set U such that Ū ⊂ Ω and Ū is compact. The
symbol C n (Ω) indicates the space of functions with continuous derivatives up to
order n.
Theorem 6 (Sobolev Embedding Theorem). Let Ω be an open Lipschitz-continuous
subset of RN and let p ∈ R with 1 ≤ p < ∞ and m and n ∈ N with n ≤ m. The
following embeddings hold algebraically and topologically:

m−n
1
1
n,q

W (Ω) if p − N = q > 0 ,
n,q
(1.24)
W m,p (Ω) ⊂ Wloc
(Ω) if p1 = m−n
∀ q ∈ [1, ∞) ,
N

 n
1
m−n
C (Ω)
if p < N .
Moreover, if Ω is bounded, the last inclusion holds in C n (Ω̄) and the embedding of
0
W m,p (Ω) into W n,q (Ω) is compact for all real q 0 that satisfy
1 ≤ q0 <
or
Np
N − (m − n)p
whenever N > (m − n)p
1 ≤ q 0 < ∞ when N = (m − n)p .
In addition, these compact embeddings are also valid for negative n or m.
(1.25)
(1.26)
14
Abstract setting for optimal control problems
We know that the existence of an embedding (which is a linear continuous
operator) between two spaces X and Y implies the simple containment X ⊂ Y .
In the case of Sobolev spaces, it can be shown that the converse holds as well, as a
consequence of the completeness of Lp spaces and of the closed graph theorem of
functional analysis. Hence, the simple containment is also said to be an embedding
in the algebraic sense, in order to distinguish it from the topological embedding
given by the existence of a continuous embedding operator. We also observe that
in the framework of the Sobolev Embedding Theorem we can retrieve as a special
case the embedding of Lp spaces given by Theorem 4.
We also introduce Sobolev spaces for vector-valued functions. The vector valued Sobolev space W m,p (Ω) can be defined simply as the Cartesian product of the
previously defined Sobolev space W m,p (Ω), i.e. W m,p (Ω) = W m,p (Ω)N where N
is the spatial dimension. A vector valued function u : Ω → RN belongs to this
space if each component belongs to the corresponding Sobolev space with the same
indices m and p. The vector valued Sobolev space is a Banach space for the norm
(p < ∞)
!1/p
N
X
p
kukm,p =
kui km,p
.
(1.27)
i=1
For p = ∞ the standard norm is defined by
kukm,∞ = max kui km,∞ .
1≤i≤N
(1.28)
Like in the scalar case, for p = 2 we have the Hilbert space W m,2 (Ω) which will be
denoted as H m (Ω). Consistently, we also adopt the boldface notation for vectorvalued function spaces whose components are in W0m,p (Ω).
The most important dual spaces of Sobolev spaces are the dual spaces of
0
W0m,p (Ω). The dual space of W0m,p (Ω) is denoted by W −m,p (Ω) with p1 + p10 = 1.
0
W −m,p (Ω) is a Banach space when endowed with the norm
kf k−m,p0 =
< f, v >
.
06=v∈W0m,p (Ω) kvkm,p
sup
(1.29)
When p = p0 = 1/2, we drop the p and p0 indices in the notations of the spaces
and norms. The reason for the notations with Hölder conjugate indices p and p0
0
lies in the fact that the functionals in W −m,p (Ω) can be given a characterization
0
in terms of derivatives of Lp (Ω) functions.
Theorem 7. Let p and p0 be Hölder conjugate with 1 ≤ p < ∞. A distribution f
0
0
belongs to W −m,p (Ω) if and only if there exist functions fα ∈ Lp (Ω), for |α| ≤ m,
such that
X
f=
∂ α fα .
(1.30)
|α|≤m
15
1.2. Sobolev spaces
As a particular case of the previous theorem, one also retrieves that when Ω ⊂ R
the well-known Dirac delta function δ ∈ H −1 (Ω) is the distributional derivative of
the Heaviside unit step function belonging to L2 (Ω).
We will also make use of the trace spaces of Sobolev spaces. These spaces
provide a generalization for functions in W m,p (Ω) of the concept of restriction to
boundary values that is straightforward for smooth functions. As we know, the
value of a function in a Lebesgue space on a set with measure zero is not determined. However, one can define a notion of trace of a function u by approximating
it with a sequence of functions in D(Ω̄) and by restricting these functions to the
boundary. More precisely, let us consider u ∈ D(Ω) and let us define the linear
mapping u → γ0 u that yields the boundary values of u. This mapping has a unique
linear continuous extension as can be stated in the following theorem. We precise
that the following statement requires a definition of the Sobolev spaces W m,p (Ω)
or W m,p (Γ) in cases when m is a real-valued index. We refer the reader to [1, 13]
for a definition of these spaces.
Theorem 8. Let Ω be a bounded open subset of RN with boundary Γ of class C k,1
for some integer k ≥ 0. Let p ≥ 1 and s ≥ 0 be two real numbers such that
s ≤ k + 1, s −
1
=l+σ
p
(1.31)
where l ≥ 0 is an integer and 0 < σ < 1. The mapping u → γ0 u defined on
D(Ω) has a unique linear continuous extension from W s,p (Ω) onto W s−1/p,p (Γ).
Furthermore, for s = 1 one has
ker(γ0 ) = W01,p (Ω) .
(1.32)
In order to prove this result one can use the fact that the space D(Ω) is dense
in W m,p (Ω) for all integers m ≥ 0 and real p with 1 ≤ p < ∞. Thanks to Theorem
8, we can endow the space W s−1/p,p (Γ) with a Banach norm of the type
kuks−1/p,p,Γ =
inf
v∈W s,p (Ω), γ0 v=u
kvks,p,Ω
(1.33)
When s = p1 , the space W 0,p (Γ) = Lp (Γ) can be endowed with a more familiar
norm
Z
1/p
p
kuk0,p,Γ =
|u| dΓ
.
(1.34)
Γ
Boldface notation will be adopted for trace spaces of vector-valued functions. We
also recall a generalized form of Theorem 5 which can be formulated for functions
with vanishing trace only on part of the boundary. The following result can be
useful in the analysis of problems with Dirichlet boundary conditions enforced only
on a portion of the boundary.
16
Abstract setting for optimal control problems
Theorem 9 (Generalized Poincaré inequality). Let Γ0 be a portion of Γ with
strictly positive measure. Then, for any real r > 1, | · |1,r and k · k1,r are two
equivalent norms on the space
WΓ1,r
(Ω) = {u ∈ W 1,r (Ω); u|Γ0 = 0} .
0
1.3
(1.35)
Abstract frameworks for mixed problems
In this section we outline two general abstract frameworks for the analysis of
linear and nonlinear mixed problems. These abstract settings are often used for
studying problems like the Stokes and Navier-Stokes equations. The MHD system
considered in this thesis fits into the nonlinear abstract framework described in
the following.
1.3.1
Abstract linear mixed problem
Let us first introduce an abstract linear problem of mixed type. Mixed problems
occur when the unknown functions belong to different function spaces. They often
arise in conjunction with the enforcement of constraints on the unknowns by the
use of Lagrange multipliers. Let X and M be two Hilbert spaces with norms k · kX
and k·kM respectively. Let X 0 and M 0 be their corresponding dual spaces endowed
with the dual norms
kf kX 0 = sup
u∈X
< f, u >
,
kukX
kf kM 0 = sup
u∈M
< f, u >
,
kukM
(1.36)
where < ·, · > denotes the duality pairing between each space and the corresponding dual. We define the bilinear forms a(·, ·) and b(·, ·) as
a(u, v) : X × X → R ,
b(u, λ) : X × M → R .
(1.37)
(1.38)
We recall that the bilinear property of a form f : X1 × X2 → R means that
f (α1 u1 + α2 u2 , v) = α1 f (u1 , v) + α2 f (u2 , v) ∀ u1 , u2 ∈ X1 , v ∈ X2 , α1 , α2 ∈ R ,
f (u, β1 v1 + β2 v2 ) = β1 f (u, v1 ) + β2 f (u, v2 ) ∀ v1 , v2 ∈ X2 , u ∈ X1 , β1 , β2 ∈ R .
Thanks to the continuity property, there exist two positive constants Ca and Cb
such that
|a(u, v)| ≤ Ca kukX kvkX ,
|b(u, p)| ≤ Cb kukX kpkM .
(1.39)
(1.40)
17
1.3. Abstract frameworks for mixed problems
Hence, the following definitions of norm for the forms a(·, ·) and b(·, ·) are wellposed:
kak =
kbk =
sup
(u,v)∈X×X
a(u, v)
,
kukX kvkX
sup
(u,µ)∈X×M
(1.41)
b(u, v)
.
kukX kµkM
(1.42)
We now state the mixed linear problem that we call Problem Ql as
Problem 1. (Problem Ql ). Given l ∈ X 0 and χ ∈ M 0 , find a pair (u, λ) ∈ X × M
satisfying
∀v ∈ X ,
∀µ ∈ M .
a(u, v) + b(v, λ) = < l, v >
b(u, µ) = < χ, µ >
(1.43)
(1.44)
We can now introduce the linear operators A ∈ L(X, X 0 ) and B ∈ L(X, M 0 )
(the symbol L(X, Y ) denoting the space of linear operators from X to Y ) such
that
∀ u, v ∈ X ,
∀ u ∈ X, µ ∈ M .
< Au, v > = a(u, v)
< Bu, µ > = b(u, µ)
(1.45)
(1.46)
We indicate with B 0 the adjoint operator of B, i.e. the operator such that
< Bu, µ > = < u, B 0 µ > .
(1.47)
The problem can be restated in operator form as
Au + B 0 p = l
Bu = χ
in X 0
in M 0 .
(1.48)
(1.49)
Let Φ ∈ L(X × M, X 0 × M 0 ) be the operator given by
Φ(u, p) = (Au + B 0 p, Bp).
(1.50)
We say that Problem Ql is well-posed if the operator Φ is an isomorphism from
X × M to X 0 × M 0 . In this case, the solution to Problem Ql exists, is unique and
depends continuously the data l and χ.
Now we introduce the affine space
V (χ) = {u ∈ X | b(u, µ) = < χ, µ >
∀ µ ∈ M} .
(1.51)
We denote V = V (0) = ker(B). We can associate to Problem Ql the following
Problem Pl :
18
Abstract setting for optimal control problems
Problem 2. (Problem Pl ). Given l ∈ X 0 , find u ∈ V (χ) satisfying
a(u, v) = < l, v >
∀v ∈ V .
(1.52)
Clearly, if (u, λ) ∈ X × M satisfies Problem Ql , then u is also solution of Problem Pl . We intend to determine under which conditions the converse statement
holds.
If we introduce the operator π ∈ L(X 0 , V 0 ) such that
∀ f ∈ X 0,
< πf, v >= < f, v >
∀v ∈ V ,
(1.53)
the corresponding operator form for Problem Pl is
πAu = πl
in V 0 .
(1.54)
We can now state the well-posedness result for Problem Ql . It can be considered
as a generalization of the well-known Lax-Milgram existence theorem concerning
bilinear elliptic forms.
Theorem 10. Problem Ql is well-posed if and only if the following conditions
hold:
i) the operator πA is an isomorphism from V onto V 0 ;
ii) the inf-sup condition holds, i.e.
inf sup
µ∈M u∈X
b(u, µ)
≥β.
kukX kµkM
(1.55)
When Problem Ql is well-posed, its solution (u, λ) depends continuously on the
data, namely
kukX + kλkM ≤ C(klkX 0 + kχkM 0 ) .
(1.56)
Property i) in Theorem 10 can be equivalently claimed in terms of the ellipticity
or coercivity of the bilinear form a(·, ·) on the space V . Therefore, we have the
following alternative statement of well-posedness for Problem Ql .
Corollary 1. Assume that the bilinear form a(·, ·) is V -elliptic, i.e. there exists
a constant α > 0 such that
a(u, u) ≥ αkuk2X
∀u ∈ V .
(1.57)
Then, Problem Ql is well posed if and only if the bilinear form b(·, ·) satisfies the
inf-sup condition (1.55).
19
1.3. Abstract frameworks for mixed problems
Therefore, the inf-sup condition determines the equivalence between Problem
Ql and Problem Pl .
By way of example, we see how the Stokes equations fit within the abstract
linear mixed framework previously outlined. The Stokes equations are often encountered in practice to describe the motion of an incompressible fluid in the case
of negligible convection. If u and p denote the velocity and pressure of the fluid respectively and we enforce homogeneous Dirichlet boundary conditions for velocity,
the strong form of the Stokes equations is given by:
−ν∆u + grad p = f
div u = 0
u=0
in Ω ,
in Ω ,
on Γ .
Here, ν is a parameter which is equal, in the nondimensional form of the equations,
to the inverse of the Reynolds number. The term f represents a general body force.
A variational form of this problem can be obtained in the framework of Problem
Ql . To this end, we set the choices
X = H 10 (Ω) , M = L20 (Ω) ,
k · kX = | · |1 , k · kM = k · k0 ,
Z
a(u, v) = ν
grad u : grad v dΩ ,
ΩZ
q div v dΩ ,
b(v, q) =
(1.58)
(1.59)
(1.60)
(1.61)
Ω
l=f,
χ = 0.
Here L20 denotes the subspace of L2 with zero mean over Ω, namely
Z
2
2
L0 (Ω) = {p ∈ L (Ω) |
p dx = 0} .
(1.62)
(1.63)
Ω
Owing to these choices, the space V is given by
Z
1
V = {v ∈ H 0 (Ω) |
q div v dΩ = 0 ∀ q ∈ L20 (Ω)} .
(1.64)
Ω
The variational Ql form of the Stokes problem can be given as follows:
Problem 3. Given f ∈ H −1 (Ω), find a pair (u, p) ∈ H 10 (Ω) × L20 (Ω) such that
a(u, v) + b(v, p) = < f , v >
b(u, q) = 0
∀ v ∈ H 10 (Ω) ,
∀ q ∈ L20 (Ω) .
(1.65)
(1.66)
20
Abstract setting for optimal control problems
The corresponding Pl form is
Problem 4. Find u ∈ V such that
a(u, v) = < f , v >
∀v ∈ V .
(1.67)
Given the assumed definitions, it can be shown that all the hypotheses invoked
for the abstract existence Theorem 10 are fulfilled [13]. Hence, the variational
Stokes problem is well posed and the following existence theorem can be claimed.
Theorem 11. Let Ω be a bounded and connected open subset of RN with Lipschitz
continuous boundary. There exists a unique pair (u, p) ∈ H 10 (Ω) × L20 (Ω) which is
solution of Problem 3. This solution depends continuously on the data, i.e.
kuk1 + kpk0 ≤ Ckf k−1 .
1.3.2
(1.68)
Abstract nonlinear mixed problem
Let us now introduce a general nonlinear mixed problem. We assume the same
definitions for the Hilbert spaces X and M and for the bilinear form b(·, ·) as in
Section 1.3.1. The idea is to replace the bilinear form a(·, ·) with the continuous
trilinear form
d(u, v, w) : X × X × X → R .
(1.69)
Then we can define the following nonlinear mixed problem:
Problem 5. (Problem Qn ). Given l ∈ X 0 , find a pair (u, λ) ∈ X × M satisfying
d(u, u, v) + b(v, λ) = < l, v >
b(u, µ) = 0
∀v ∈ X
∀µ ∈ M .
(1.70)
(1.71)
Hence, Problem Qn is a nonlinear extension of Problem Ql . We underline that,
unlike (1.44), the right-hand side in (1.71) is homogeneous.
We can now introduce two linear operators D(w) ∈ L(X, X 0 ) with w ∈ X and
B ∈ L(X, M 0 ) such that
< D(w)u, v > = d(w, u, v) ∀ u, v ∈ X
< Bu, µ > = b(u, µ) ∀ u ∈ X, µ ∈ M .
(1.72)
(1.73)
The problem can then be restated in operator form as
D(u)u + B 0 p = l in X 0
Bu = 0 in M 0 .
(1.74)
(1.75)
21
1.3. Abstract frameworks for mixed problems
As usual, we indicate with B 0 the adjoint operator of B, i.e. the operator such
that
< Bu, µ > = < u, B 0 µ > .
(1.76)
By using the set V = V (0) from (1.51), the problem can be formulated in another
form, i.e.
Problem 6. (Problem Pn ). Given l ∈ X 0 , find u ∈ V satisfying
d(u, u, v) = < l, v >
∀v ∈ V .
(1.77)
In operator form, we can write this problem as
D(u)u = l
in X 0 .
(1.78)
The next classical abstract result (see [13]) is a useful tool for studying the
existence of solutions to nonlinear variational problems. Its proof relies on the
construction of a sequence of finite-dimensional Galerkin approximations of the
original problem. Moreover, compactness arguments and fixed point theorems
play an essential role for nonlinear problems.
Theorem 12. Consider Problem Pn . Suppose that:
• the space V is separable;
• d(u, v, w) is continuous, i.e. there exists a constant C such that
|d(u, v, w)| ≤ CkukV kvkV kwkV
∀ u, v, w ∈ V ;
(1.79)
• d(u, u, v) is V-elliptic, i.e. there exists a constant α > 0 such that
d(u, u, u) ≥ αkuk2V
∀u ∈ V ;
(1.80)
• d(u, v, w) is weakly sequentially continuous on V, i.e. if for any sequence un
in V such that
lim < g, un > = < g, u >
n→∞
∀g ∈ V 0
(1.81)
then
lim d(un , un , v) = d(u, u, v)
n→∞
∀v ∈ V .
(1.82)
22
Abstract setting for optimal control problems
Then, Problem Pn has at least one solution u ∈ V . Any solution depends continuously on the data by the stability bound
kukV ≤ α−1 klkV 0 .
(1.83)
Furthermore, if the smallness condition Cα−2 klkV 0 < 1 is satisfied, Problem Pn
has a unique solution u ∈ V .
Theorem 12 claims the existence of a solution for Problem Pn . If Problem Pn
has a solution, then it can proved that the initial mixed form given by Problem
Qn has a solution.
Theorem 13. If the bilinear form b(·, ·) satisfies the condition
inf sup
µ∈M u∈X
b(u, µ)
≥β
kukX kµkM
(1.84)
for some constant β > 0, then Problem Qn has at least one solution (u, λ), where
u is a solution of Problem Pn .
The variational form of the Navier-Stokes and MHD equations considered in
this thesis can be cast in a form which fits into the above nonlinear abstract
framework, as will be illustrated in Chapter 2.
1.4
Constrained nonlinear optimal control problems
The analysis of optimal control problems for nonlinear partial differential equations
is a nontrivial task. In order to point out some of the most important concepts and
ideas about the study of optimal control problems, we report an abstract analysis
proposed in [17]. The analysis of the optimal control problems considered in this
thesis is based on a similar formulation.
Let G, X and Y be reflexive Banach spaces whose norms are denoted by k · kG ,
k · kX and k · kY respectively. Let < ·, · > denote the duality pairing between any
of the previous spaces and their corresponding dual. Let Θ, the control set, be a
closed convex subset of G. Let Z be a subspace of Y with compact embedding.
We remark that the compactness of the embedding Z ⊂ Y plays an important
role.
An optimal control problem is usually characterized by the minimization of
a cost functional under the presence of constraints. Here we assume that the
functional to be minimized has the form
J (v, z) = λF(v) + λE(z) ∀ (v, z) ∈ Z × Θ .
(1.85)
23
1.4. Constrained nonlinear optimal control problems
The quantity v is the state variable, z is the control variable, F is a functional on
X, E is a functional on Θ and λ is a given parameter that is assumed to belong to
a compact interval Λ ⊂ R+ .
The constraint equation M (v, z) = 0 relating the state and control variables
is defined as follows. Let N : X → Y be a (possibly nonlinear) differentiable
mapping, K : Θ → Y and T : Y → X be two continuous linear operators. For
any λ ∈ Λ, we define the mapping M : X × Θ → X by
M (v, z) = v + λT N (v) + λT K(z) ∀ (v, z) ∈ X × Θ .
(1.86)
With these definitions we now consider the constrained minimization problem
min
(v,z)∈X×Θ
J (v, z) subject to
M (v, z) = 0 .
(1.87)
We seek a global minimizer (v ∗ , z ∗ ) with respect to the set
C = {(v, z) ∈ X × Θ : M (v, z) = 0} .
(1.88)
Although we can show that a global minimizer for (1.87) exists, in practice one
can only determine local minima, i.e. points (u, g) ∈ X × Θ such that, for some
> 0,
J (u, g) ≤ J (v, z) ∀ (v, z) ∈ C and ku − vkX ≤ .
(1.89)
The first step in the analysis of an optimal control problem is to prove the existence
of a solution to the problem, i.e. the existence of a so-called optimal solution. Let
us introduce a first set of hypotheses that will be invoked to this purpose. We
have (the symbol * denotes weak convergence):
(H1) inf v∈X F(v) > −∞;
(H2) there exist constants α, β > 0 such that E(z) ≥ αkzkβ ∀ z ∈ Θ;
(H3) there exists a (v, z) ∈ X × Θ satisfying M (v, z) = 0;
(H4) if u(n) * u ∈ X and g (n) * g ∈ G where {(u(n) , g (n) )} ∈ X × Θ, then
N u(n) * N u ∈ X and Kg (n) * Kg ∈ Y ;
(H5) J (·, ·) is weakly lower semicontinuous on X × Θ, i.e., for every sequence
{(u(n) , g (n) )} that is weakly convergent to some (u, g) ∈ X × Θ, one has
J (u, g) ≤ lim inf J (u(n) , g (n) ) ;
n→∞
(1.90)
(H6) if {(u(n) , g (n) )} ∈ X × Θ is such that {F(u(n) )} is a bounded set in R and
M (u(n) , g (n) ) = 0, then {u(n) } is a bounded set in X.
24
Abstract setting for optimal control problems
A second set of hypotheses can be introduced in order to justify the use of Lagrange
multiplier principles and to derive an optimality system from which optimal states
and controls can be determined. This second set is as follows:
(H7) for each z ∈ Θ, J (v, z) and M(v, z) are Fréchet differentiable with respect
to v;
(H8) the mapping z 7→ E(z) is convex, i.e.
E(γz1 +(1−γ)z2 ) ≤ γE(z1 )+(1−γ)E(z2 ),
∀ z1 , z2 ∈ Θ, ∀ γ ∈ [0, 1] ; (1.91)
(H9) for v ∈ X, N 0 (v) maps X into Z (i.e., Range(N 0 ) = Z).
Let us use hypotheses (H1)-(H6) to establish that optimal solutions exist.
Theorem 14. Given the minimization problem (1.87) for the functional (1.85) and
the constraint defined by (1.86), assume that hypotheses (H1)-(H6) hold. Then,
there exists a solution to this minimization problem.
Proof. We follow the proof as in [17]. By assumption (H3), there exists at least one
element of X × Θ that satisfies the constraint. Thus, we may choose a minimizing
sequence {(u(n) , g (n) )} in C for J (·, ·), i.e. a sequence such that
lim J (u(n) , g (n) ) = inf J (v, z) .
n→∞
(v,z)∈C
By (H1) and (H2), the boundedness of {J (u(n) , g (n) )} implies the boundedness of
the sequences kg (n) kG and {F(u(n) )}. Then, by (H6), we deduce that ku(n) kX is
bounded. Thus, we may extract a weakly convergent subsequence {(u(n) , g (n) )}
to some element (u, g) ∈ X × G. Since Θ is convex, we have that g ∈ Θ. We
now have to pass the limit inside the functional J (·, ·) in order to show that (u, g)
satisfies the constraint. By (H4), we have that, for all f ∈ X ∗ ,
lim < T N u(n) , f > = lim < N u(n) , T ∗ f >=< N u, T ∗ f > =< T N u, f >
n→∞
n→∞
lim < T Kg
n→∞
(n)
, f > = lim < Kg (n) , T ∗ f >=< Kg, T ∗ f > =< T Kg, f > .
n→∞
Thus, we have
0 = lim < M (u(n) , g (n) ), f > = < u + λT N (u) + λT K(g), f >
n→∞
∀ f ∈ X∗ ,
i.e. M (u, g) = 0. Therefore, the subsequence whose elements satisfy the constraint
has a weak limit that also satisfies the constraint. Finally, we can show that (u, g)
minimizes the functional. In fact, by the weak lower semicontinuity of J , given
by (H5), we conclude that
inf J (v, z) ≤ J (u, g) ≤ lim inf J (u(n) , g (n) ) = inf J (v, z) .
(v,z)∈C
Indeed, (u, g) is a minimizer.
n→∞
(v,z)∈C
25
1.4. Constrained nonlinear optimal control problems
Now let us consider the additional hypotheses (H7)-(H9) to show that the
Lagrange multiplier rule can be used to turn the constrained minimization problem
into an unconstrained one. We remark that the existence of an optimal solution
required by the following result is guaranteed by Theorem 14. Also, we denote by
σ(−T N 0 (v)) the spectrum of the operator −T N 0 (v).
Theorem 15. Let λ ∈ Λ be given. Assume that hypotheses (H1)-(H9) hold. Let
(u, g) ∈ X × Θ be an optimal solution satisfying (1.89). Then there exists k ∈ R
and µ ∈ X ∗ not both equal to zero such that
k < Ju (u, g), w > − < µ, Mu (u, g) · w > = 0 ∀ w ∈ X
min L(u, z, µ, k) = L(u, g, µ, k) ,
z∈Θ
where L(u, z, µ, k) = kJ (u, z)− < µ, M (u, z) >. Furthermore, if
we may choose k = 1, so that there exists µ ∈ X ∗ that satisfies
1
λ
(1.92)
(1.93)
∈
/ σ(−T N 0 (u)),
< Ju (u, g), w > − < µ, Mu (u, g) · w > = 0 ∀ w ∈ X
min L(u, z, µ, 1) = L(u, g, µ, 1) .
z∈Θ
(1.94)
(1.95)
Proof. See [17] and [36].
So far, no specific assumptions were made on the control variable g in the
functional or in the constraint and the control set Θ was only assumed to be a
closed and convex subset of G without any topological structure. If we now turn
to the case Θ = G, we can also consider differentiation of the functional E(z). An
additional hypothesis may then be assumed, namely
(H10) Θ = G and the mapping z 7→ E(z) is Fréchet differentiable on G.
In this case, we can give a more practical expression than (1.93) for the variation
with respect to the control variable.
Theorem 16. Let λ ∈ Λ be given. Assume that hypotheses (H1)-(H10) hold. Let
(u, g) ∈ X × G be an optimal solution satisfying (1.89). Then there exists k ∈ R
and µ ∈ X ∗ not both equal to zero such that
k < Ju (u, g), w > − < µ, (I + λT N 0 (u)) · w > = 0 ∀ w ∈ X
k < E 0 (g), z > − < µ, T Kz > = 0 ∀ z ∈ G .
Furthermore, if
that satisfies
1
λ
(1.96)
(1.97)
∈
/ σ(−T N 0 (u)), we may choose k = 1, so that there exists µ ∈ X ∗
< Ju (u, g), w > − < µ, (I + λT N 0 (u)) · w > = 0 ∀ w ∈ X
< E 0 (g), z > − < µ, T Kz > = 0 ∀ z ∈ G .
(1.98)
(1.99)
26
Abstract setting for optimal control problems
Equation (1.98) is the so-called adjoint equation of the optimal control problem, while Equation (1.99) is usually referred to as the optimality condition. These
equations represent a first-order necessary condition for an optimal solution. Together with the state equation given by M (u, g) = 0, they form the so-called optimality system. A solution of the optimality system is then a candidate solution
for the original optimal control problem.
Chapter 2
Lifting function approach for
boundary optimal control
We illustrate in this chapter the mathematical formulation of the optimal control
problem considered in this thesis. First, we give a survey on the literature concerning the MHD equations and related optimal control problems in Section 2.1.
Section 2.2 describes the lifting function approach that we propose for the study of
boundary optimal control problems for the MHD equations. In Section 2.3, a weak
formulation of the MHD state equations suitable for our purposes is discussed. The
existence of a solution to these equations is proved in Section 2.4. Section 2.5 deals
with the mathematical formulation of the optimal control problem. Existence of
a solution for this problem is shown in Section 2.5.1. The technique of Lagrange
multipliers, the first-order necessary condition and the resulting optimality system
are illustrated in Sections 2.5.2 and 2.5.3. A solution of the optimality system is a
candidate solution for the optimal control problem. Section 3.3 is devoted to the
finite element approximation of the optimality system. A gradient algorithm for a
robust numerical solution of this system is illustrated in Section 3.4.
2.1
Optimal control of the MHD equations
The study of control problems for fluid flows interacting with magnetic fields is
a very attractive feature in many science and engineering settings such as fusion
technology, fission nuclear reactors cooled using liquid metals, aluminum casting
in metallurgy and crystal growth in semiconductor industry [9, 27]. Since the
magnetic field can provide a very effective means for obtaining flow control in
applications involving electrically conductive fluids, it is very interesting to study
such a possibility in order to achieve desired flow configurations. An externally
imposed magnetic field may interact with the fluid and modify the Lorentz force,
28
Lifting function approach for boundary optimal control
so that one can achieve practical goals such as steering the velocity profile to a
desired one or minimizing quantities of physical interest, like drag or vorticity.
The behavior of fluid flows interacting with magnetic fields is described by
the equations of Magnetohydrodynamics (MHD). Numerous formulations are proposed and analyzed in literature for these equations [14, 20, 30, 34, 32]. Attention
is focused on various aspects such as physical modeling, mathematical formulation, numerical approximation and computational procedures. It is well-known
that the MHD problems can be formulated in terms of different sets of unknowns.
The mechanical behavior of the fluid flow is often described by the Navier-Stokes
equations in the velocity and pressure unknowns [20, 34, 30, 23]. A greater variety
occurs in the choice of the electromagnetic variables, for which one combination or
another of quantities such as the magnetic field, the current density, the electric
field, and the electric potential is used [14]. In [20] and [34], two analyses on the
existence, uniqueness and finite element approximation of the MHD equations are
carried out. The paper [20] is based on a formulation involving the commonly used
velocity, pressure and magnetic field variables. An H 1 -conforming finite element
approximation for the magnetic field is considered, which is convergent on standard convex domains or with C 1,1 boundary smoothness assumption. An analysis
for the case of general Lipschitz polyhedron is given in [34], accounting for possible
low regularity of the magnetic field on non-convex domains. This generalization
is performed with the introduction of an auxiliary Lagrange multiplier variable
for the divergence-free constraint on the magnetic field, together with the use of
the H(curl)-conforming family of Nédélec finite element spaces. In [23], convergent finite element approximations on non-convex domains are instead obtained
with a modification of the magnetic bilinear form in the weak formulation via a
weighted regularization approach, and no auxiliary multiplier is introduced. Another particular choice in the weak formulation leads to stabilized finite element
methods, analyzed in [11], which permit to circumvent the requirements of the
inf-sup condition.
Although the literature on optimal control problems for the equations of Magnetohydrodynamics is not particularly broad to our best knowledge, a heterogeneous range of approaches and methodologies is covered. Amongst the variety of
possibilities, some general classifications can be typically made. In particular, stationary and non-stationary problems can be distinguished, as well as distributed
and boundary problems. The former distinction is clearly related to the dependency on time of the state variables, while the latter identifies situations in which
the control variable is applied either in the interior or on the boundary of the
domain, respectively. In [14], a stationary optimal control problem is taken into
account following a velocity-current formulation proposed in [31], which allows
to consider the MHD problem on a bounded domain without enforcing artificial
2.1. Optimal control of the MHD equations
29
shielding boundary conditions. External or injected currents are considered along
with magnetic fields as control physical mechanisms; these control quantities are
assumed in lumped parameter form for a more direct link with applications. The
convergence of an operator splitting scheme for the numerical solution of the MHD
state equations is also studied. In [25] and [24], two analyses of boundary optimal control problems for the stationary MHD equations with infinite-dimensional
controls are carried out. Focus is given on the theoretical formulation but no
computational algorithms are considered nor results given. In [25] an optimal control problem is studied with a desired electrical current as target and a boundary
electrical potential as control. Both the magnetic field and the electric potential
are considered as electromagnetic variables. In [24], the normal magnetic field
on part of the boundary is taken as control and the objectives are desired velocity and magnetic field volume distributions. As a common practice, the cost
functional is of the tracking type; a penalty term is added in order to limit the
size of controls and avoid the use of inequality constraints. Some computational
results for different objective functionals are reported in [26] in the case of boundary normal electrical current as control. Time-dependent analyses are treated in
[21, 22, 32]. In [21], a theoretical formulation of a control problem for the timeperiodic MHD equations with volume periodic control inputs is considered, and
semidiscrete time approximations are defined. The paper [22] considers a modified form of the Navier-Stokes equations due to Ladyzhenskaya, which guarantees
global unique solvability for three-dimensional domains. In [32], focus is devoted
to a fast and reliable real-time algorithm using a reduced order POD model of an
MHD flow controlled with boundary potential.
In this work we consider a boundary optimal control problem for the stationary
MHD equations and we propose a new approach for its solution, based on the transformation of the boundary control into an extended distributed one. Compared to
the case of distributed controls, standard approaches for treating boundary control problems are in fact not entirely straightforward to implement numerically.
For example, boundary controls involve normal or tangential components of the
magnetic field so that the direct implementation of such controls causes substantial difficulties on general domains. Furthermore, such implementations often lead
to unnecessarily smooth controls [19, 30] or involve penalization terms that can
adversely affect accuracy and also the conditioning of discretized systems. The
boundary optimal control problem under consideration is characterized by a cost
functional representing the error between the fluid velocity and a desired velocity
profile. The control variable is given by the boundary values of the magnetic field.
In order to deal with this type of boundary control, we choose to split the magnetic
field in the domain into two parts: a lifting function of the magnetic field boundary conditions and an auxiliary field with homogeneous boundary conditions. The
30
Lifting function approach for boundary optimal control
lifting function can be considered as an extension of the magnetic field from the
boundary to the interior of the domain. The optimal solution is then searched for
by exploring all possible extended functions. This approach brings several advantages from both a theoretical and a computational point of view [3, 19, 30]. The
boundary control algorithm can be solved by robust distributed control techniques
over the inner part of the domain. Furthermore, the optimal boundary controls
can be determined in natural half-integer Sobolev spaces as traces of the optimal
extended functions. Also, both Dirichlet and Neumann boundary conditions can
be taken into account with this approach.
In the following sections, we provide a mathematical description of the optimal
control problem at hand and we illustrate the proposed lifting function approach.
2.2
Description of the optimal control problem
The optimal control problem we consider consists of a cost or objective functional,
a set of control functions, and a set of state equations that act as constraints.
Let Ω ⊂ R3 denote an open bounded connected domain with C 1,1 boundary Γ.
We denote by Γ1 a subset of Γ with positive surface measure. For the constraint
or state equations, we have the steady-state MHD model given in nondimensional
form by [10, 29, 33]

1

∆u + (u · ∇)u + ∇p − S1 (∇ × B) × B − f = 0
−



Re


∇ · u = 0
1


∇ × (∇ × B) − ∇ × (u × B) + ∇σ = 0


Rem



∇·B =0
on Ω.
(2.1)
Here, u and p denote the fluid velocity and pressure, respectively, B the magnetic
field, σ the Lagrange multiplier associated to the divergence-free constraint of the
magnetic field, Re = ρU L/µ the viscous
p Reynolds number, Rem = µ0 σc U L the
magnetic Reynolds number, Hm = BL σc /µ the Hartmann number, and S1 =
2
Hm
/Re Rem . We denote by U , B and L the reference values for velocity, magnetic
field and length. The fluid density, dynamic viscosity, magnetic permeability and
electrical conductivity are indicated as ρ, µ, µ0 , and σc , respectively. The MHD
system (2.1) is completed with appropriate boundary conditions for the velocity
and magnetic fields which are discussed below.
31
2.2. Description of the optimal control problem
By using the well-known vector identities
1
(∇ × B) × B = (B · ∇)B − ∇B 2 ,
2
∇(A · B) = (A · ∇)B + (B · ∇)A + A × (∇ × B) + B × (∇ × A) ,
∇ × (A × B) = A(∇ · B) − B(∇ · A) + (B · ∇)A − (A · ∇)B ,
the system (2.1) takes the form

1

−
∆u + (u · ∇)u + ∇r − S1 (B · ∇)B − f = 0



Re


∇ · u = 0
1


∇ × (∇ × B) + (u · ∇)B − (B · ∇)u + ∇σ = 0


Rem



∇·B =0
on Ω,
(2.2)
where the modified pressure r is defined as
r =p+
S1
|B|2 .
2
(2.3)
To the system (2.2) we append the boundary conditions
u=g
τ (u, r) = t
B = Φ0
on Γ1 ,
on Γ \ Γ1 ,
on Γ ,
(2.4)
(2.5)
(2.6)
where
1 ∂u
1
+ rn + (u · n)u .
(2.7)
Re ∂n
2
Due to the divergence-free constraints on the velocity and magnetic fields, the data
g and Φ0 must satisfy the compatibility conditions
Z
Z
g · n dΓ = 0 ,
Φ0 · n dΓ = 0 .
(2.8)
τ (u, r) = −
Γ
Γ
The boundary conditions (2.4) and (2.5) are standard velocity and stress boundary conditions, respectively, for the velocity u and modified pressure r. The definition (2.7) can be physically interpreted as a generalized stress at the boundary that
takes into account both dissipative (due to viscous dissipation) and conservative
energy (due to mechanical pressure, magnetic energy and kinetic energy) contributions at the boundary. The boundary condition (2.6) is not the most commonly
32
Lifting function approach for boundary optimal control
used boundary condition for the magnetic field B. Instead, one of the pairs of
boundary conditions
B · n = Φ1
and E × n = Ψ1
on Γ
(2.9)
E · n = Ψ2
and B × n = Φ2
on Γ,
(2.10)
or
where
E=
1
∇×B−u×B
Rem
(2.11)
denotes the electric field, is usually applied on Γ. However, (2.6) (or equivalently,
boundary conditions on the pair B ·n and B ×n) is, for us, an expedient boundary
condition to use in the boundary optimal control problem we consider; its use does
not engender any loss of generality, as will become evident later.
The controls in the optimal control problem we consider can be chosen to be
the data pair Φ1 and Ψ1 in (2.9) or the data pair Φ2 and Ψ2 in (2.10) or even
the data Φ0 in (2.6). However, we do not deal with these control choices directly.
Instead, we determine an optimal distributed magnetic field control from which
any and all of the possible boundary controls can be determined by restriction. To
this end, we introduce the decomposition of the magnetic field given by
B = b + Be
on Ω ,
(2.12)
with
∇ · B e = 0 in Ω
and
B e = B = Φ0
on Γ ,
(2.13)
so that b is solenoidal and satisfies homogeneous boundary conditions on Γ, i.e.,
we have ∇ · b = 0 in Ω and b = 0 on Γ. The function B e is the so-called lifting
function of the Dirichlet boundary conditions Ron the magnetic field. Note that the
fourth equation in (2.1) or (2.2) implies that Γ B · n dΓ = 0 so that, from (2.12)
and (2.13), the compatibility condition on the boundary datum Φ0 , namely
Z
Γ
Φ0 · n dΓ =
Z
Γ
B e · n dΓ =
Z
Ω
∇ · B e dx = 0 ,
(2.14)
is automatically satisfied thanks to the divergence-free condition.
In view of the previous decomposition, we can say that u, r, b and σ are the
state functions in our control problem and B e is the distributed magnetic field
control function. Substitution of (2.12) into (2.2) results in the final form of the
33
2.2. Description of the optimal control problem
constraint or state equations

1

−
∆u + u · ∇ u + ∇r



Re




− S1 (b + B e ) · ∇ (b + B e ) = f



∇ · u = 0
1


∇ × ∇ × (b + B e ) + u · ∇ (b + B e )


Rem





− (b + B e ) · ∇ u + ∇σ = 0



∇·b=0
on Ω
(2.15)
along with
u = g on Γ1 ,
τ (u, r) = t on Γ \ Γ1 ,
b = 0 on Γ ,
(2.16)
(2.17)
(2.18)
which candidate optimal states u, r, b and σ and optimal controls B e are required
to satisfy. Here, f and t are given data functions, although, using well-known
approaches [15], these could be used as control functions as well.
Clearly, for every solution (u, r, B, σ) of the MHD state problem (2.2), one
can find a lifting function B e as above and a quadruple (u, r, b, σ) that solves
the problem (2.15). Of course, the lifting function is not uniquely defined, so
that different lifting functions will produce different solutions (u, r, b, σ) of (2.15).
However, the sum B = b + B e is uniquely determined and, along with r and σ,
solves (2.2).
The goal of the optimal control problem we consider is to match, as well as
possible, the velocity u to a prescribed velocity ud . To this end, we define the cost
or objective functional
Z
Z
Z
α
β
γ
2
2
J (u, B e ) =
|u − ud | dx +
|B e | dx +
|∇B e |2 dx ,
(2.19)
2 Ω
2 Ω
2 Ω
where α, β and γ denote positive constants. The first term in (2.19) embodies the
objective of the control problem. The other terms are added to limit the cost of
control and regularize it. The values of the constants α, β and γ can be chosen to
adjust the relative importance of the terms in the functional. Large values of α
compared to β and γ allow for better velocity matching whereas small values of
α result in poorer velocity matching. The presence of the γ-term is motivated by
the need to have a sufficiently smooth control function so that the optimal control
problem is well posed.
Now that we have defined all its ingredients, we can state the optimal control
problem we intend to study.
34
Lifting function approach for boundary optimal control
Problem 7. Find an optimal control B ∗e and an optimal state {u∗ , r∗ , b∗ , σ ∗ }
such that the functional J (·, ·) given in (2.19) is minimized and the state system
(2.15)–(2.18) is satisfied.
Once the optimal state and control functions have been determined, optimal
controls of other types can be determined. For example, if we wish to know the
optimal boundary control of type (2.9), we have, from (2.11), (2.12), (2.16), and
(2.18),
 ∗
∗
∗
 Φ1 = B · n = B e · n
1
∗
∗
∗
∗
 Ψ∗1 = E ∗ × n =
∇ × (b + B e ) − u × B e × n
Rem
on Γ ,
(2.20)
whereas optimal boundary controls of the type (2.10) would be determined as
 ∗
∗
∗
 Ψ2 = B × n = B e × n
1
 Φ∗2 = E ∗ · n =
∇ × (b∗ + B ∗e ) − u∗ × B ∗e · n
Rem
on Γ.
(2.21)
Of course, optimal boundary controls of the type (2.6) are simply determined as
Φ∗0 = B ∗ = B ∗e on Γ. Thus we see that obtaining the single optimal distributed
control B ∗e along with the optimal state variables enables one to determine optimal
controls of other types.
We also remark that in practical situations the boundary control given by Φ0
(or by the pairs (Φ1 , Ψ1 ) or (Φ2 , Ψ2 )) acts only on part of the boundary Γc ⊂ Γ
[15]. In those cases, the corresponding distributed control function B e is fixed on
the remaining portion Γd = Γ \ Γc . Thus, we distinguish the control and fixed
parts of the boundary condition for the magnetic field as Φ0,c on Γc and Φ0,d on
Γd (and similarly for the other boundary conditions).
2.3
Weak formulation of the MHD state problem
In order to formulate the optimal control problem under consideration we introduce
some function spaces. We denote with H m (Ω) = W m,2 (Ω) and H m (Ω) = W m,2 (Ω)
the usual scalar and vector-valued Sobolev spaces endowed with the standard norm
k · km and by H 0 (Ω) the space of square-integrable functions L2 (Ω) with norm
k · k = k · k0 . The scalar product in L2 (Ω) will be denoted by (·, ·). Let H m
0 (Ω)
−m
∞
denote the closure of C0 (Ω) with respect to the norm k · km and H (Ω) denote
1
1
∗
the dual space of H m
0 (Ω). The dual space of H (Ω) is denoted by H (Ω) . We
2.3. Weak formulation of the MHD state problem
35
define the spaces V (Ω), V 0 (Ω) and L20 (Ω) as
V (Ω) = {u ∈ H 1 (Ω) | ∇ · u = 0} ,
V 0 (Ω) = {u ∈
H 10 (Ω)
(2.22)
| ∇ · u = 0} ,
Z
2
2
L0 (Ω) = {p ∈ L (Ω) |
p dx = 0} .
(2.23)
H 1Γs (Ω) = {u ∈ H 1 (Ω) | u = 0 on Γs } .
(2.25)
(2.24)
Ω
Also, given any subset Γs ⊂ Γ, we denote the space H 1Γs (Ω) as
The trace operator acting on a function or on a function space is denoted by
γ0 , i.e. γ0 f := f |Γ . For smooth functions, the trace operator simply restricts the
function to its boundary values. The trace space of H 1 (Ω) is denoted by H 1/2 (Γ)
and its dual by H −1/2 (Γ).
For all functions u, v, w ∈ H 1 (Ω) and q ∈ L20 (Ω) we introduce the bilinear
forms
Z
∇u : ∇v dx ,
(2.26)
a(u, v) =
ZΩ
am (u, v) =
(∇ × u) · (∇ × v) dx ,
(2.27)
ΩZ
(2.28)
d(v, q) = − q∇ · v dx ,
Ω
and the trilinear forms
c̃(u, v, w) =
Z
(u · ∇)v · w dx ,
(2.29)
ΩZ
Z
1
1
(u · ∇)v · w dx −
(u · ∇)w · v dx =
c(u, v, w) =
2 Ω
2 Ω
1
= (c̃(u, v, w) − c̃(u, w, v)) .
(2.30)
2
The form c is the usual anti-symmetric form for the nonlinear term of the NavierStokes equations [34, 35]. We recall the following result.
Lemma 1. Let u, v, w ∈ H 1 (Ω). Then
c(u, v, w) = −c(u, w, v)
and
c̃(u, v, w) = −c̃(u, w, v) +
Z
Γ
(u · n)(w · v)ds .
(2.31)
(2.32)
Let u ∈ H 1 (Ω) with ∇ · u = 0 and u · n = 0 on Γ, v, w ∈ H 1 (Ω). Then
c̃(u, v, w) = −c̃(u, w, v) .
(2.33)
36
Lifting function approach for boundary optimal control
Proof. Equation (2.31) is obvious. For (2.32) we have
Z
Ω
(u · ∇)v · w dx =
N X
N Z
X
i=1 j=1
w i uj
Ω
∂vi
dx
∂xj
Z
N X
N Z
X
∂wi uj
vi dx + wi uj vi nj ds
=
−
∂x
j
Ω
Γ
i=1 j=1
Z
Z
N X
N Z
X
∂wi
∂uj
=
− vi uj
dx − vi wi
dx + uj nj wi vi ds
∂xj
∂xj
Ω
Ω
Γ
i=1 j=1
Z
Z
= − (u · ∇)w · vdx + (u · n)(w · v)ds .
Ω
Γ
Eq. (2.33) follows from the definition of c and from (2.32).
The operators a and am have the following properties:
a) continuity: there exist Ca , Cm > 0 such that
|a(u, v)| ≤ Ca kuk1 kvk1
|am (u, v)| ≤ Cm kuk1 kvk1
∀ (u, v) ∈ H 1 (Ω) × H 1 (Ω) ,
∀ (u, v) ∈ H 1 (Ω) × H 1 (Ω) ;
(2.34)
(2.35)
b) coercivity: there exist αa , αm > 0 such that, with meas(Γ1 ) > 0,
a(u, u) ≥ αa kuk21 ∀ u ∈ H 1Γ1 (Ω) ,
am (u, u) ≥ αm kuk21 ∀ u ∈ V (Ω) .
(2.36)
(2.37)
The bilinear form d satisfies the following properties:
a) continuity: there exists D > 0 such that
|d(u, q)| ≤ Dkuk1 kqk ∀ (u, q) ∈ H 1 (Ω) × L20 (Ω) ;
(2.38)
b) weak coercivity or the inf-sup condition: there exists β1 > 0 such that
d(u, q)
≥ β1 .
06=q∈L0 (Ω) 06=u∈H 1 (Ω) kuk1 kqk0
inf2
sup
(2.39)
The trilinear form c(u, v, w) satisfies the following properties (see [13, 12, 35]):
a) continuity: there exists K > 0 independent of the functions u, v and w such
that
|c(u, v, w)| ≤ Kkuk1 kvk1 kwk1
∀ u, v, w ∈ H 1 (Ω) ;
(2.40)
2.3. Weak formulation of the MHD state problem
37
b) antisymmetric property with respect to the last two arguments:
c(u, v, w) = −c(u, w, v) ∀ u, v, w ∈ H 1 (Ω) .
(2.41)
An obvious consequence of (2.41) is that
c(w, u, u) = 0
∀ u, w ∈ H 1 (Ω) .
(2.42)
The advantage that using the form c(·, ·, ·) has over using the form e
c(·, ·, ·) is that
the latter satisfies (2.41) and (2.42) only if ∇ · w = 0 on Ω and one of w · n = 0
or u = 0, or, for (2.41), v = 0 hold on Γ.
Given the previous framework, (u, r, B, σ) ∈ H 1 (Ω) × L2 (Ω) × H 1 (Ω) × L20 (Ω)
is called a weak solution for the MHD equations if it satisfies the weak form of the
steady MHD system (2.2) given by
1
a(u, v 1 ) + c(u, u, v 1 ) − S1 c(B, B, v 1 ) + d(v 1 , r)
Re
=< f , v 1 > − < t, v 1 >Γ\Γ1 ,
d(u, q1 ) = 0 ,
1
am (B, v 2 ) + c(u, B, v 2 ) − c(B, u, v 2 ) + d(v 2 , σ) = 0 ,
Rem
d(B, q2 ) = 0 ,
(2.43)
along with boundary conditions
u=g
B = Φ0
on Γ1 ,
on Γ ,
(2.44)
(2.45)
for all test functions (v 1 , q1 , v 2 , q2 ) ∈ H 1Γ1 (Ω) × L2 (Ω) × H 10 (Ω) × L20 (Ω).
The choice of these boundary conditions is of interest for our boundary optimal
control problem. From a physical point of view, a portion of the domain can have
non-homogeneous velocity boundary conditions while the remaining part can have
stress type boundary conditions. The magnetic field on the boundary can act
either as a known, fixed quantity or as a control variable and in both cases it may
assume non-homogeneous values.
Clearly, if (u, r, B, σ) is a solution of the strong problem, then it is also a
solution of the weak formulation (2.43), while the converse may or may not be
true.
Now, with the decomposition of the magnetic field B given by (2.12), the
weak form of the MHD equations can be recast as follows: given a lifting function
B e ∈ V (Ω) such that B e = Φ0 on Γ, we seek (u, r, b, σ) ∈ H 1 (Ω) × L2 (Ω) ×
38
Lifting function approach for boundary optimal control
H 10 (Ω) × L20 (Ω) such that
1
a(u, v 1 ) + c(u, u, v 1 ) − S1 c(b + B e , b + B e , v 1 )+
Re
d(v 1 , r) =< f , v 1 > − < t, v 1 >Γ\Γ1 ,
d(u, q1 ) = 0 ,
1
am (b + B e , v 2 ) + c(u, b + B e , v 2 ) − c(b + B e , u, v 2 ) + d(v 2 , σ) = 0 ,
Rem
d(b, q2 ) = 0 ,
(2.46)
along with boundary conditions
u=g
b=0
on Γ1 ,
on Γ ,
(2.47)
(2.48)
for all test functions (v 1 , q1 , v 2 , q2 ) ∈ H 1Γ1 (Ω) × L2 (Ω) × H 10 (Ω) × L20 (Ω).
Note that the boundary condition (2.17) does not have to be explicitly enforced;
it is, in fact, a natural boundary condition imposed weakly through the boundary
integral appearing in the first equation in (2.46). On the other hand, (2.16) and
(2.18) are essential boundary conditions for the weak formulation (2.46) so that
they must be explicitly imposed on candidate solutions. Also note that the third
equation in (2.46) does not contain any boundary integrals because an essential
boundary condition for the magnetic field variable b is imposed on all of Γ, i.e.,
see (2.18).
It is a straightforward matter to verify that if (u, r, b, σ) is a solution of (2.15)–
(2.18), then it satisfies (2.46), (2.16), and (2.18). On the other hand, the converse
is true only for solutions of (2.46), (2.16), and (2.18) that are sufficiently smooth,
i.e., the weak formulation (2.46), (2.16), and (2.18) admits solutions that are not
sufficiently regular to satisfy (2.15)–(2.18). For this reason, solutions (u, r, b, σ) of
(2.46), (2.16), and (2.18) are not only referred to as weak solutions of the MHD
system (2.15)–(2.18), but are also referred to as generalized solutions.
Note that our indirect approach towards finding optimal boundary controls
allows for those controls to belong to weaker spaces than would be practical in a
direct boundary approach. In the latter case, one would replace the regularization
term in the functional (2.19) by the square of a norm of the boundary controls. For
this purpose, one would want to use the weakest norms possible that still result in
well posedness; these norms are fractional Sobolev space norms, i.e., H 1/2 (Γ) for
components of the magnetic field B and H −1/2 (Γ) for components of the electric
field E; see [19]. In our approach we instead find a distributed control B e for
which the square of the H 1 (Ω) norm is appropriate for regularization; see (2.19).
39
2.4. Existence of a solution to the state equations
Thus, one does not have to deal with fractional Sobolev space norms. Moreover,
with B e , b, u ∈ H 1 (Ω), we have, from (2.20) and (2.21), that the components
of the corresponding optimal boundary magnetic and electric field controls do
belong to the appropriate trace spaces H 1/2 (Γ) and H −1/2 (Γ), respectively, so that
our approach results in boundary controls that are optimal with respect to larger
function spaces.
2.4
2.4.1
Existence of a solution to the state equations
Reduction to homogeneous boundary conditions
Before stating the existence theorem for the state equations, some technical lemmas
are required in substitution to standard results. It is well-known that the global
solvability (i.e., without any smallness condition on the data) of the Navier-Stokes
equations in the case of nonhomogeneous Dirichlet boundary conditions can be
proved by the Hopf’s lemma also known as Leray’s inequality (see [13, 35]). For the
MHD equations, local solvability was proved in [20] with a smallness assumption
on the boundary velocity but no bound on the boundary magnetic field. This
smallness requirement was removed in [39], where a continuation of the boundary
data for the velocity field was constructed whose L3 − norm can be made arbitrarily
small. We recall the result.
R
Lemma 2. For any given g ∈ H 1/2 (Γ) with Γ g · n = 0 and for any > 0 there
exists a function u ∈ H 1 (Ω) such that
u = g
on Γ ,
∇ · u = 0 ,
ku kL3 (Ω) ≤ kgk1/2,Γ .
(2.49)
Proof. See [39].
We will use this result to prove the global solvability of our problem. This allows
us to avoid having a priori bounds on the boundary conditions and controls. A
generalization of this for the case of nonhomogeneous mixed Dirichlet-Neumann
boundary conditions is straightforward and similar results can be found in [7, 2].
Remark 1. For the proof of existence, we will need to perform splittings of the type
u = û + u0 and B = b̂ + B 0 where u0 and B 0 are lifting functions of the Dirichlet
boundary conditions whose existence for sufficiently small values of is guaranteed
by Lemma 2. The set of boundary conditions given by (2.47) - (2.48) does not
assure that û is homogeneous over the whole boundary Γ. Therefore, the property
û · n = 0 is fulfilled only on Γ1 : this is the reason for the use of the trilinear form
c(u, v, w) which is antisymmetric for any u, v, w ∈ H 1 (Ω), independent of their
values at the boundary Γ (see Lemma 1).
40
Lifting function approach for boundary optimal control
The proof of existence requires the transformation of the non-homogeneous
boundary problem into a problem with homogeneous boundary conditions. Therefore let us split the velocity and magnetic fields as
u = û + u0 ,
B = b̂ + B 0 ,
(2.50)
with
∇ · u0 = 0
∇ · B0 = 0
u0 = g
B 0 = Φ0
on Γ1 ,
on Γ .
After the splitting of the lifting functions, we note that the MHD problem can be
put in the framework of the abstract setting for nonlinear mixed problems like the
Navier-Stokes equations as described in Section 1.3 ([13]). In order to see this let
us consider the bilinear forms
a0 ((u, B), (v 1 , v 2 )) =
S1
1
a(u, v 1 ) +
am (B, v 2 )
Re
Rem
and
ˆ 1 , v 2 ), (r, σ)) = d(v 1 , r) + S1 d(v 2 , σ) .
d((v
We also define the trilinear forms
a1 ((u, B), (w, C), (v 1 , v 2 )) =
c(u, w, v 1 ) − S1 c(B, C, v 1 ) + S1 c(u, C, v 2 ) − S1 c(B, w, v 2 )
such that
a1 ((u, B), (u, B), (v 1 , v 2 )) =
c(u, u, v 1 ) − S1 c(B, B, v 1 ) + S1 c(u, B, v 2 ) − S1 c(B, u, v 2 )
and
â((u, B), (w, C), (v 1 , v 2 )) :=
a0 ((w, C), (v 1 , v 2 )) + a1 ((u, B), (w, C), (v 1 , v 2 )) .
For a given (u0 , B 0 ) we set
< F̂ , (v 1 , v 2 ) >=< f , v 1 > −â((u0 , B 0 ), (u0 , B 0 ), (v 1 , v 2 ))
and
ã((u, B), (w, C), (v 1 , v 2 )) := â((u, B), (w, C), (v 1 , v 2 ))+
a1 ((u0 , B 0 ), (w, C), (v 1 , v 2 )) + a1 ((w, C), (u0 , B 0 ), (v 1 , v 2 )) .
41
2.4. Existence of a solution to the state equations
After multiplying the MHD equation by S1 , summing the equations and bringing
the lifting functions to the right hand side, the homogenized MHD problem in
the so-called Q form [13] becomes: seek (û, b̂) ∈ H 1Γ1 (Ω) × H 10 (Ω) and (r, σ) ∈
L2 (Ω) × L20 (Ω) so as to satisfy the equation
ˆ 1 , v 2 ), (r, σ)) =
ã((û, b̂), (û, b̂), (v 1 , v 2 )) + d((v
< F̂ , (v 1 , v 2 ) > − < t, v 1 >Γ\Γ1
∀(v 1 , v 2 ) ∈ H 1Γ1 (Ω) × H 10 (Ω) ,
ˆ
d((û,
b̂), (z1 , z2 )) = 0
∀(z1 , z2 ) ∈ L2 (Ω) × L2 (Ω) ,
0
û = 0
on Γ1 ,
b̂ = 0
on Γ .
ˆ namely,
Let Z be the kernel of d,
ˆ
Z = {(u, B) ∈ H 1Γ1 (Ω) × H 10 (Ω) | d((u,
B), (z1 , z2 )) = 0
∀(z1 , z2 ) ∈ L2 (Ω) × L20 (Ω)} , (2.51)
with the norm naturally inherited by its parent space (see [20])
k(u, B)kZ = (kuk21 + kBk21 )1/2 .
(2.52)
We can rewrite the above problem in P form as
ã((û, b̂), (û, b̂), (v 1 , v 2 )) =< F̂ , (v 1 , v 2 ) > − < t, v 1 >Γ\Γ1
∀ (v 1 , v 2 ) ∈ Z .
(2.53)
It is well-known that the P and Q forms are equivalent and the former is used
for the proof of existence in the abstract nonlinear framework described in Section
1.3.2.
2.4.2
Coercivity property
We formulate the coercivity property of the form ã((u, B), (w, C), (v 1 , v 2 )) on the
space Z. Note that unlike [20] the coercivity will be proved without any conditions
on the data (see [39]).
Lemma 3. For all (u, B) ∈ Z there exists a constant K > 0 such that
ã((u, B), (u, B), (u, B)) ≥ Kk(u, B)k2Z .
(2.54)
42
Lifting function approach for boundary optimal control
Proof. We have
ã((u, B), (u, B), (u, B))
:= a0 ((u, B), (u, B)) + a1 ((u, B), (u, B), (u, B))
+ a1 ((u0 , B 0 ), (u, B), (u, B)) + a1 ((u, B), (u0 , B 0 ), (u, B))
1
=
a(u, u) + c(u, u0 , u) − S1 c(B, B 0 , u)
Re
S1
am (B, B) + S1 c(u, B 0 , B) − S1 c(B, u0 , B) ,
+
Rem
where some of the terms vanish due to the antisymmetry property of the form c
with respect to the last two arguments for all functions in H 1 (Ω). The coercivity
of the forms yields
a(u, u) ≥ αkuk21
am (B, B) ≥ αm kBk21 .
On the other hand, we can bound the remaining terms with arbitrarily small
coefficients. By using the generalized Hölder inequality, the embedding of H 1 into
L6 , the generalized Poincaré inequality for u and Lemma 2, we have that
|c(u, u0 , u)| = |c(u, u, u0 )|
≤ kukL6 k∇ukL2 ku0 kL3
≤ 1 kuk21
for an arbitrarily small constant 1 > 0. For the second term we have
|c(B, B 0 , u)| = |c(B, u, B 0 )|
≤ kBkL6 k∇ukL2 kB 0 kL3
≤ 2 kBk1 kuk1
for an arbitrarily small constant 2 > 0. The third term can be treated in a similar
way to obtain
|c(u, B 0 , B)| = |c(u, B, B 0 )| ≤ 3 kBk1 kuk1
for an arbitrarily small constant 3 > 0. The fourth term yields
|c(B, u0 , B)| = |c(B, B, u0 )| ≤ 4 kBk21
2.4. Existence of a solution to the state equations
43
Finally, gathering all the terms and using Young’s inequality ab ≤ a2 /γ + γb2 /4
we have
ã((u, B), (u, B), (u, B)) =
1
a(u, u) + c(u, u0 , u) − S1 c(B, B 0 , u)
Re
S1
+
am (B, B) + S1 c(u, B 0 , B) − S1 c(B, u0 , B)
Rem
Rem
≥ Reαkuk21 +
αm kBk21 − |c(u, u0 , u)|
S1
− |S1 c(B, B 0 , u)| − |S1 c(u, B 0 , B)| − |S1 c(B, u0 , B)|
Rem
≥ Reαkuk21 +
αm kBk21
S1
− 1 kuk21 − 2 kBk1 kuk1 − 3 kBk1 kuk1 − 4 kBk21
Rem
αm kBk21
≥ Reαkuk21 +
S1
− 1 kuk21 − (2 + 3 )kBk1 kuk1 − 4 kBk21
Rem
≥ Reαkuk21 +
αm kBk21
S1
(
+
3 )
5
2
− 1 kuk21 −
kBk21 − (2 + 3 ) kuk21 − 4 kBk21
5
4
Rem
5
(2 + 3 )
= (Reα − 1 − (2 + 3 ) )kuk21 + (
αm −
)kBk21
4
S1
5
5 Rem
(2 + 3 )
≥ min{(Reα − 1 − (2 + 3 ) ), (
αm −
)}k(u, B)k2Z ,
4
S1
5
where 1 , 2 , 3 , 4 , 5 are arbitrarily small constants that can be chosen without
any loss of generality so that
5
(Reα − 1 − (2 + 3 ) ) > 0 ,
4
(
Rem
(2 + 3 )
αm −
) > 0.
S1
5
The proof is now complete.
2.4.3
Existence
The existence theorem for Problem P (2.53) and hence Problem Q can now be
summarized in the following theorem.
Theorem 17. Given (f̂ 1 , f̂ 2 ) ∈ H 1 (Ω)∗ × H 1 (Ω)∗ and t ∈ H −1/2 (Γ \ Γ1 ) there
exists at least one solution ((û, b̂), (r, σ)) ∈ (H 1Γ1 (Ω) × H 10 (Ω)) × (L2 (Ω) × L20 (Ω))
44
Lifting function approach for boundary optimal control
of Problem Q, where (û, b̂) solves Problem P . Thus, the nonhomogeneous MHD
problem 2.43 has a solution (u, r, B, σ) ∈ (H 1Γ1 (Ω) × L2 (Ω) × H 1 (Ω) × L20 (Ω)).
Proof. Problem P has a solution. In fact we can refer to the standard abstract
setting for nonlinear mixed problems described in Section 1.3 and prove the following properties (see [13]).
i) Separability. Z is a separable Hilbert space as a subspace of H 1 (Ω) × H 1 (Ω).
ii) Weak sequential continuity. The mapping ã((u, B), (u, B), (u, B)) is weakly
sequentially continuous on Z. For a similar proof, see [13, 20].
iii) Continuity. It is an immediate consequence of the continuity of the bilinear
forms a, am , c, d.
iv) Coercivity. See Lemma 3.
This implies by standard arguments that there exists at least one solution of Problem P .
v) L.B.B. condition Following the Ladyzhenskaya-Babuska-Brezzi theory for mixed
problems (see [25, 13, 20]) one can prove that there exists a positive constant β2
such that
inf
sup
06=(r,σ)∈L2 (Ω)×L20 (Ω) 06=(û,b̂)∈H 1 (Ω)×H 1 (Ω)
0
Γ
1
ˆ
d((û,
b̂), (r, σ))
k(û, b̂)kH 1 ×H 1 k(r, σ)kL2 ×L20
≥ β2 > 0 .
(2.55)
The proof of i)-v) assures the existence of a solution to Problems P and Q. Therefore the inhomogeneous Problem (2.43) has a solution.
Remark 2. The existence can be proved by similar arguments if the Navier-Stokes
equations are supplemented with mixed boundary conditions on Γ \ Γ1 , such as
u · n = g · n, τ × n = t × n
(2.56)
u × n = g × n, τ · n = t · n.
(2.57)
or
In our analysis it is required to have full Dirichlet boundary conditions for the
velocity u = g on Γ1 and full Dirichlet boundary conditions for the magnetic
field B = Φ0 on Γ. Neumann boundary conditions for the magnetic field are not
addressed here (see [39]).
Remark 3. The two decompositions of the magnetic field B = b + B e and B =
b̂ + B 0 serve different purposes and it is evident that there is no relationship
between B e and B 0 , the former being used for the treatment of boundary conditions for the optimal control problem, the latter instead being used only for the
theoretical purpose of proving the existence of a magnetic field B satisfying the
inhomogeneous state problem. In other words, the lifting B 0 can be chosen in
45
2.5. Optimal control problem
infinite manners with respect to a smallness parameter (see Lemma 2), with the
only requirement that the coercivity property (3) holds. On the other hand, the
function B e is not chosen for theoretical purposes but it is rather a computational
tool that is used for the solution of the boundary optimal control problem at hand.
2.5
Optimal control problem
After proving the existence of a solution to the state equations, which is necessary
for the following steps, we perform here the analysis of the optimal control problem
7, much in the spirit of Section 1.4.
2.5.1
Existence of an optimal solution
We first state the optimal control problem in a more precise way by defining the
set of admissible target velocities U ad and the set of admissible solutions Aad . The
first is defined as
U ad = {u ∈ H 1 (Ω) | −
1
∆u + (u · ∇)u ∈ L2 (Ω)}
Re
(2.58)
and the set of admissible solutions as
Aad = {(u, r, b, σ, B e ) ∈ H 1 (Ω) × L2 (Ω) × H 1 (Ω) × L20 (Ω) × H 1 (Ω) |
(u, r, b, σ, B e ) satisfies (2.46) and (2.13) and J (u, B e ) < ∞} . (2.59)
We also set the restriction Āad as
Āad = {(u, B e ) | (u, r, b, σ, B e ) ∈ Aad } .
The optimal boundary control problem can then be formulated as follows.
e e ) ∈ Aad
Problem 8. Given ud ∈ U ad find a global minimum point (e
u, re, e
b, σ
e, B
of the objective functional
J (u, B e ) =
α
β
γ
ku − ud k20 + kB e k20 + a(B e , B e )
2
2
2
.
(2.60)
We now state the existence of a global minimizer in Aad .
Theorem 18. Given ud ∈ U ad , there exists a solution (u, r, b, σ, B e ) ∈ Aad of
the optimal control problem.
46
Lifting function approach for boundary optimal control
Proof. The proof follows standard techniques as those described in Section 1.4.
Theorem 17 states the existence of a solution of the state MHD system, therefore
the set of admissible solutions Aad is nonempty. We define
M :=
inf
(u,B e )∈Āad
J (u, B e )
Clearly M exists and M ≥ 0 since the set Aad is nonempty and the functional is
non-negative. Thus let {(un , rn , bn , σn , B en )} be a minimizing sequence in Aad for
the objective functional, i.e.,
lim J (un , B en ) = M .
n→∞
Now we show that the minimizing sequence {(un , rn , bn , σn , B en )} is uniformly
bounded. As every convergent sequence of real numbers, the sequence J (un , B en )
is bounded, hence the sequence {B en } is uniformly bounded in V (Ω). By the
continuous dependence of the state solutions on the data and by using the triangle
inequality, we also have that the sequences {un }, {bn }, {rn } and {σn } are uniformly bounded. Hence, we can extract a subsequence {(um , rm , bm , σm , B em )}
e e ). We write
that converges weakly to some (e
u, re, e
b, σ
e, B
e
um → u
rm → re
bm → e
b
σm → σ
e
ee
B em → B
e
um → u
bm → e
b
ee
B em → B
weakly in
weakly in
V (Ω)
L2 (Ω)
weakly in
weakly in
V (Ω)
L20 (Ω)
weakly in
V (Ω)
strongly in
L2 (Ω)
strongly in
L2 (Ω)
strongly in
L2 (Ω) .
The strong convergence in L2 (Ω) is a consequence of the compact imbedding from
H 1 (Ω) to L2 (Ω).
e e ) ∈ Aad , i.e. the
Now we pass to the limit in order to show that (e
u, re, e
b, σ
e, B
weak limit of the subsequences satisfies the constraints. We can pass to the limit
inside the linear and the nonlinear terms of the MHD equation. The result for
the nonlinear term can be proved by compactness arguments (see for example
[13, 20, 35]). Therefore the set Aad is closed in the weak topology. In order to see
e e ) ∈ Aad is a solution for the optimal control problem we finally
that (e
u, re, e
b, σ
e, B
47
2.5. Optimal control problem
e e ) ∈ Āad minimizes the functional. In fact, by the weak
e, B
have to show that ( u
lower semicontinuity of the functional, we have
e e ) ≤ lim inf J (um , B em ) ≤ lim (inf J (up , B ep )) = M .
M ≤ J (e
u, B
m→∞
k→∞ p≥k
e e ), which
Therefore the infimum M of the functional is attained at the point (e
u, B
is indeed a global minimizer.
Remark 4. The existence of a global minimizer to the optimal control problem has
been proved. In the following, the technique of Lagrange multipliers will be used in
order to turn the constrained problem into an unconstrained one. Unfortunately,
this method only allows us to search for local minima [16], i.e. to find solutions of
the local problem
e e ) ∈ Aad such that the objective
Problem 9. Given ud ∈ U ad find a (e
u, re, e
b, σ
e, B
functional
J (u, B e ) =
β
γ
α
ku − ud k20 + kB e k20 + a(B e , B e )
2
2
2
(2.61)
is locally minimized, i.e. there exists > 0 such that
e e ) ≤ J (u, B e )
J (e
u, B
2.5.2
e e k1 < .
e k1 + kB e − B
∀(u, B e ) ∈ Āad with ku − u
(2.62)
First-order necessary condition
In order to obtain the first order necessary conditions and the optimality system for
the optimal control problem let us introduce the nonlinear continuous constraint
operator M : B 1 → B 2 defined between the spaces B 1 = H 1 (Ω) × L2 (Ω) ×
H 10 (Ω) × L20 (Ω) × H 1 (Ω) and B 2 = H 1Γ1 (Ω)∗ × L2 (Ω) × H −1 (Ω) × L20 (Ω) × L20 (Ω)
so that M (u, r, b, σ, B e ) = (f 1 , q1 , f 2 , q2 , q3 ) , where
1
a(u, v 1 ) + c(u, u, v 1 ) − S1 c(b + B e , b + B e , v 1 )+
Re
d(v 1 , r)+ < t, v 1 >Γ\Γ1 ,
(q1 , z1 ) := d(u, z1 ) ,
1
am (b + B e , v 2 ) + c(u, b + B e , v 2 ) − c(b + B e , u, v 2 ) + d(v 2 , σ) ,
< f 2 , v 2 > :=
Rem
(q2 , z2 ) := d(b, z2 ) ,
(q3 , z3 ) := d(B e , z3 )
< f 1 , v 1 > :=
48
Lifting function approach for boundary optimal control
for all functions (v 1 , z1 , v 2 , z2 , z3 ) ∈ H 1Γ1 (Ω) × L2 (Ω) × H 10 (Ω) × L20 (Ω) × L20 (Ω)
and boundary conditions
u=g
b=0
B e = Φ0,d
B e = Φ0,c
on
on
on
on
Γ1 ,
Γ,
Γd ,
Γc .
With the definition of the mapping M (u, r, b, σ, B e ) the constraints can be expressed as M (u, r, b, σ, B e ) = (f , 0, 0, 0, 0). Through the usual method of Lagrange multipliers, we turn the constrained minimization problem into an unconstrained one. The new problem is then
Problem 10. Find a stationary point (ū, r̄, b̄, σ̄, B̄ e , ā, λ̄, π̄1 , ξ̄, π̄2 , π̄3 ) of the augmented functional
Jaug (u, r, b, σ, B e , a, λ, π1 , ξ, π2 , π3 ) =
aJ (u, B e )+ < (λ, π1 , ξ, π2 , π3 ), M (u, r, b, σ, B e ) > . (2.63)
Clearly, one does not know whether stationary points of Jaug , i.e. points with
vanishing Fréchet differential, yield a local minimum of the original cost functional.
In the following we will only derive a first-order necessary condition.
At every point (u, r, b, σ, B e ) ∈ B 1 we introduce the bounded linear mapping M 0 ∈ L(B 1 , B 2 ) as M 0 (u, r, b, σ, B e ) · (û, r̂, b̂, σ̂, B̂ e ) = (f̂ 1 , q̂1 , f̂ 2 , q̂2 , q̂3 ) for
(û, r̂, b̂, σ̂, B̂ e ) ∈ B 1 and (f̂ 1 , q̂1 , f̂ 2 , q̂2 , q̂3 ) ∈ B 2 if and only if
1
a(û, v 1 ) + c(û, u, v 1 ) + c(u, û, v 1 )
Re
− S1 c(b̂, b + B e , v 1 ) − S1 c(b + B e , b̂, v 1 )
< f̂ 1 , v 1 > :=
− S1 c(B̂ e , b + B e , v 1 ) − S1 c(b + B e , B̂ e , v 1 )
+ d(v 1 , r̂) ,
(q̂1 , z1 ) := d(û, z1 ) ,
1
1
< f̂ 2 , v 2 > :=
am (b̂, v 2 ) +
am (B̂ e , v 2 )
Rem
Rem
+ c(û, b + B e , v 2 ) + c(u, b̂, v 2 ) + c(u, B̂ e , v 2 )
− c(b̂, u, v 2 ) − c(B̂ e , u, v 2 ) − c(b + B e , û, v 2 )
+ d(v 2 , σ̂) ,
(q̂2 , z2 ) := d(b̂, z2 ) ,
(q̂3 , z3 ) := d(B̂ e , z3 )
49
2.5. Optimal control problem
for all functions (v 1 , z1 , v 2 , z2 , z3 ) ∈ H 1Γ1 (Ω) × L2 (Ω) × H 10 (Ω) × L20 (Ω) × L20 (Ω)
and homogeneous boundary conditions
û = 0
on
Γ1
b̂ = 0
on
Γ
B̂ e = 0
on
Γd .
We have the following result.
Theorem 19. Let (u, r, b, σ, B e ) ∈ B 1 . The operator M 0 (u, r, b, σ, B e ) has closed
range and a finite-dimensional kernel.
Proof. i) We can show that the operator M 0 (u, r, b, σ, B e ) is a compact perturbation of an isomorphism; i.e., it can be decomposed as M 0 (u, r, b, σ, B e ) =
K 0 (u, r, b, σ, B e ) + S 0 , where S 0 is an isomorphism and K 0 is a compact operator.
The operator S 0 · (û, r̂, b̂, σ̂, B̂ e ) = (f̂ 1 , q̂1 , f̂ 2 , q̂2 , q̂3 ) for (û, r̂, b̂, σ̂, B̂ e ) ∈ B 1 and
(f̂ 1 , q̂1 , f̂ 2 , q̂2 , q̂3 ) ∈ B 2 is defined as
1
a(û, v 1 ) + d(v 1 , r̂) ,
Re
(q̂1 , z1 ) := d(û, z1 ) ,
1
1
< f̂ 2 , v 2 > :=
am (b̂, v 2 ) +
am (B̂ e , v 2 ) + d(v 2 , σ̂) ,
Rem
Rem
(q̂2 , z2 ) := d(b̂, z2 ) ,
< f̂ 1 , v 1 > :=
(q̂3 , z3 ) := d(B̂ e , z3 ) ,
for all functions (v 1 , z1 , v 2 , z2 , z3 ) ∈ H 1Γ1 (Ω) × L2 (Ω) × H 10 (Ω) × L20 (Ω) × L20 (Ω)
and homogeneous boundary conditions. Given the unique solvability of the Stokes
problem, we have that S 0 is an isomorphism. The operator K 0 ∈ L(B 1 , B 2 ) is defined as K 0 (u, r, b, σ, B e ) · (û, r̂, b̂, σ̂, B̂ e ) = (f̂ 1 , q̂1 , f̂ 2 , q̂2 , q̂3 ) for (û, r̂, b̂, σ̂, B̂ e ) ∈
B 1 and (f̂ 1 , q̂1 , f̂ 2 , q̂2 , q̂3 ) ∈ B 2 if and only if
< f̂ 1 , v 1 > := +c(û, u, v 1 ) + c(u, û, v 1 )
− S1 c(b̂, b + B e , v 1 ) − S1 c(b + B e , b̂, v 1 )
− S1 c(B̂ e , b + B e , v 1 ) − S1 c(b + B e , B̂ e , v 1 ) ,
(q̂1 , z1 ) := 0 ,
< f̂ 2 , v 2 > := +c(û, b + B e , v 2 ) + c(u, b̂, v 2 ) + c(u, B̂ e , v 2 )
− c(b̂, u, v 2 ) − c(B̂ e , u, v 2 ) − c(b + B e , û, v 2 ) ,
(q̂2 , z2 ) := 0 ,
(q̂3 , z3 ) := 0 ,
50
Lifting function approach for boundary optimal control
for all functions (v 1 , z1 , v 2 , z2 , z3 ) ∈ H 1Γ1 (Ω) × L2 (Ω) × H 10 (Ω) × L20 (Ω) × L20 (Ω)
and homogeneous boundary conditions. The compactness of Sobolev embeddings
and the properties of the trilinear form c(u, v, w) imply that the operator K 0 is
compact [14, 25].
Finally, by the Fredholm alternative the operator M 0 is a semi-Fredholm operator, i.e. it has a closed range and a finite-dimensional kernel.
Let (ū, r̄, b̄, σ̄, B̄ e ) denote an optimal solution in the local sense and N : B 1 →
R × B 2 the nonlinear mapping defined by N (u, r, b, σ, B e ) = (a, f 1 , q1 , f 2 , q2 , q3 )
for (u, r, b, σ, B e ) ∈ B 1 and (a, f 1 , q1 , f 2 , q2 , q3 ) ∈ R × B 2 if and only if
a := J (u, B e ) − J (ū, B̄ e ) ,
(f 1 , q1 , f 2 , q2 , q3 ) := M (u, r, b, σ, B e ) .
As we did before, for any (u, r, b, σ, B e ) ∈ B 1 we introduce the bounded linear mapping N 0 ∈ L(B 1 , R × B 2 ) defined as N 0 (u, r, b, σ, B e ) · (û, r̂, b̂, σ̂, B̂ e ) =
(a0 , f̂ 1 , q̂1 , f̂ 2 , q̂2 , q̂3 ) for (û, r̂, b̂, σ̂, B̂ e ) ∈ B 1 and (a0 , f̂ 1 , q̂1 , f̂ 2 , q̂2 , q̂3 ) ∈ R × B 2
such that
a0 := J 0 (u, B e ) · (û, B̂ e ) ,
(f̂ 1 , q̂1 , f̂ 2 , q̂2 , q̂3 ) := M 0 (u, r, b, σ, B e ) · (û, r̂, b̂, σ̂, B̂ e ) .
Theorem 20. Let (ū, r̄, b̄, σ̄, B̄ e ) denote an optimal solution in the local sense.
i) The operator N 0 (ū, r̄, b̄, σ̄, B̄ e ) has closed range.
ii) The operator N 0 (ū, r̄, b̄, σ̄, B̄ e ) is not onto.
Proof. i) Since the kernel of a continuous linear operator is closed in its domain,
we have that Ker(M 0 ) is closed in B 1 . Clearly Ker(M 0 ) is a Banach space as it is
a closed subspace of a Banach space. It is also known that if f is a linear functional
on a Banach space X, then either f ≡ 0 or Ran(f ) = R. Applying these results,
one has that J 0 · Ker(M 0 ) is either 0 or R, therefore J 0 · Ker(M 0 ) is closed in R.
Now we recall a well-known result [36]. Let X, Y, Z be Banach spaces, A : X → Y
and B : X → Z be continuous linear operators. Let C : X → Y × Z be defined as
C(x) = (A(x), B(x)). If Ran(A) is closed in Y and B · Ker(A) is closed in Z, then
Ran(C) is closed in Y × Z. Setting A = M 0 , B = J 0 , C = N 0 , X = B 1 , Y = B 2
and Z = R we have the result.
ii) By contradiction, if the operator N 0 were onto, there would exist by the
e e ) ∈ Aad , different
implicit function theorem another optimal solution (e
u, re, e
b, σ
e, B
from the assumed optimal solution (ū, r̄, b̄, σ̄, B̄ e ), such that
e e k1 < e k1 + kB̄ e − B
kū − u
e e ) < J (ū, B̄ e ). This is in contradiction of the hypothesis that
and J (e
u, B
(ū, r̄, b̄, σ̄, B̄ e ) is an optimal solution.
51
2.5. Optimal control problem
Remark 5. We remark that the operator N 0 (u, r, b, σ, B e ) is not onto in the more
general case (u, r, b, σ, B e ) ∈ B 1 , but the previous result is sufficient for our
purposes.
Now we derive the first-order necessary condition from which an optimality
system may be derived.
Theorem 21 (First-order necessary condition). Let (ū, r̄, b̄, σ̄, B̄ e ) denote an optimal solution in the local sense. There exists a nonzero Lagrange multiplier
(a, λ, π1 , ξ, π2 , π3 ) ∈ R × B ∗2 that satisfies the Euler equations
0
Jaug
(ū, r̄, b̄, σ̄, B̄ e , a, λ, π1 , ξ, π2 , π3 ) · (û, r̂, b̂, σ̂, B̂ e , 0, 0, 0, 0, 0, 0) =
aJ 0 (ū, B̄ e ) · (û, B̂ e )+ < (λ, π1 , ξ, π2 , π3 ), M 0 (ū, r̄, b̄, σ̄, B̄ e ) · (û, r̂, b̂, σ̂, B̂ e ) >= 0
∀(û, r̂, b̂, σ̂, B̂ e ) ∈ B 1 . (2.64)
Furthermore, if the operator M 0 is onto, we have a 6= 0; thus we may choose
a = 1 so that there exists a nonzero Lagrange multiplier (λ, π1 , ξ, π2 , π3 ) ∈ B ∗2 that
satisfies the Euler equations
0
Jaug
(ū, r̄, b̄, σ̄, B̄ e , 1, λ, π1 , ξ, π2 , π3 ) · (û, r̂, b̂, σ̂, B̂ e , 0, 0, 0, 0, 0, 0) =
J 0 (ū, B̄ e ) · (û, B̂ e )+ < (λ, π1 , ξ, π2 , π3 ), M 0 (ū, r̄, b̄, σ̄, B̄ e ) · (û, r̂, b̂, σ̂, B̂ e ) >= 0
∀(û, r̂, b̂, σ̂, B̂ e ) ∈ B 1 . (2.65)
Proof. Since Ran(N 0 ) is a closed and proper subspace of R × B 2 , the HahnBanach theorem (see [40], p. 109) implies that there exists a nonzero element
of (R × B 2 )∗ that annihilates the range of N 0 (ū, r̄, b̄, σ̄, B̄ e ), i.e., there exists
(a, λ, π1 , ξ, π2 , π3 ) ∈ (R × B 2 )∗ such that
< (a, λ, π1 , ξ, π2 , π3 ), (a0 , f̂ 1 , q̂1 , f̂ 2 , q̂2 , q̂3 ) >= 0
∀(a0 , f̂ 1 , q̂1 , f̂ 2 , q̂2 , q̂3 ) ∈ Range(N 0 (ū, r̄, b̄, σ̄, B̄ e )) (2.66)
Hence the result (2.64) from the definition of N 0 . Moreover, if the operator
M 0 is onto, one has that a 6= 0; in fact, by contradiction, one would have <
(λ, π1 , ξ, π2 , π3 ), (f̂ 1 , q̂1 , f̂ 2 , q̂2 , q̂3 ) >= 0 for all (f̂ 1 , q̂1 , f̂ 2 , q̂2 , q̂3 ) ∈ Ran(M 0 ) ≡ B 2 ,
which would imply (λ, π1 , ξ, π2 , π3 ) = (0, 0, 0, 0, 0) since M 0 is onto. This contradicts the previous result stating that (a, λ, π1 , ξ, π2 , π3 ) 6= (0, 0, 0, 0, 0, 0). Without any loss of generality, we may normalize so as to have a = 1, which yields
(2.65).
Now we briefly discuss the case a = 0. Setting a = 0 in the first-order necessary
condition 21, one would have (λ, π1 , ξ, π2 , π3 ) 6= (0, 0, 0, 0, 0) such that
< (λ, π1 , ξ, π2 , π3 ), M 0 (ū, r̄, b̄, σ̄, B̄ e ) · (û, r̂, b̂, σ̂, B̂ e ) >= 0
∀(û, r̂, b̂, σ̂, B̂ e ) ∈ B 1 . (2.67)
52
Lifting function approach for boundary optimal control
This would bring to an optimality system without any contribution from the
Fréchet differential of the cost functional J 0 (ū, B̄ e ) · (û, B̂ e ). Therefore such a
system would retain no information about the objective of the control problem.
Its solution would have no physical meaning. Thus, the case a = 0 must be
avoided in practice. As we know, surjectivity of M 0 (u, r, b, σ, B e ) is a sufficient
condition for having a 6= 0. One is interested in finding whether surjectivity of
M 0 (u, r, b, σ, B e ) occurs without any “ad hoc” assumption. Unfortunately, this is
not always possible and some appropriate assumptions may be required for specific
optimal control problems [14, 25]. Here we follow an approach proposed in [14]
and derive the conditions for M 0 to be surjective.
Theorem 22. Except for a countable set of values (Re, Rem ) ⊂ R2 , the operator
M 0 (u, r, b, σ, B e ) is an isomorphism. Moreover, M 0 (u, r, b, σ, B e ) is an isomorphism whenever Re and Rem are sufficiently small.
Proof. The proof follows the same lines as in [14], Proposition 3.7. The second
result comes from a Neumann series argument.
Remark 6. If the values of Re and Rem are sufficiently small, the operator M 0 is
onto and one may choose a = 1 in the optimality system. This assumption is in
agreement with the physical model of the Navier-Stokes equations in the absence of
a turbulence model, which is known to be appropriate for small Reynolds numbers
Re.
2.5.3
Optimality system
With the assumption of small Re and Rem , one may choose a = 1. By studying
the stationary points of the augmented functional, one has a possible candidate
for the local optimal solution.
Theorem 23 (Optimality system). Let (u, r, b, σ, B e , 1, λ, π1 , ξ, π2 , π3 ) be a stationary point of the augmented functional Jaug (u, r, b, σ, B e , 1, λ, π1 , ξ, π2 , π3 ). The
variables (B e , π3 ) in H 1 (Ω) × L20 (Ω) satisfy the system
β(B e , δB e ) + γa(B e , δB e ) − S1 c(δB e , b + B e , λ) − S1 c(b + B e , δB e , λ)+
1
am (δB e , ξ) + c(u, δB e , ξ) − c(δB e , u, ξ) + d(δB e , π3 ) = 0 ,
Rem
d(B e , δπ3 ) = 0
(2.68)
for all test functions (δB e , δπ3 ) ∈ H 1Γd (Ω) × L20 (Ω) along with boundary conditions
53
2.5. Optimal control problem
B e = Φ0,d on Γd . The variables (λ, π1 ) in H 1Γ1 (Ω) × L2 (Ω) are solutions of
1
a(δu, λ) + c(δu, u, λ) + c(u, δu, λ) + d(δu, π1 ) + c(δu, b + B e , ξ)
Re
− c(b + B e , δu, ξ) + α(u − ud , δu) = 0 ,
d(λ, δr) = 0 ,
(2.69)
for all test functions (δu, δr) ∈ H 1Γ1 (Ω) × L2 (Ω). The variables (ξ, π2 ) in H 10 (Ω) ×
L20 (Ω) satisfy
1
am (δb, ξ) + c(u, δb, ξ) − c(δb, u, ξ) − S1 c(δb, b + B e , λ)
Rem
− S1 c(b + B e , δb, λ) + d(δb, π2 ) = 0 ,
d(ξ, δσ) = 0
(2.70)
for all test functions (δb, δσ) ∈ H 10 (Ω) × L20 (Ω).
Proof. It suffices to set to zero the Fréchet differential of the augmented functional
Jaug (u, r, b, σ, B e , 1, λ, π1 , ξ, π2 , π3 ) as in Theorem 21 and then split the independent variations. One has
J 0 (u, B e ) · (δu, δB e ) = α(u − ud , δu) + β(B e , δB e ) + γa(B e , δB e ) .
(2.71)
Clearly, the variations (δλ, δπ1 , δξ, δπ2 , δπ3 ) with respect to the Lagrange multipliers yield the constraints defined by M (u, r, b, σ, B e ) = (f , 0, 0, 0, 0), i.e., the
state equations (2.43) and the divergence-free constraint on the control variable
B e . For the other variables we can proceed in a standard way and obtain the
corresponding Euler equations [18, 19, 20, 24, 14].
Remark 7. From the first-order necessary condition, we know that to every local
optimal solution (u, r, b, σ, B e ) there corresponds a stationary point
(u, r, b, σ, B e , 1, λ, π1 , ξ, π2 , π3 ) of the augmented functional which satisfies the optimality system. Viceversa, a solution to the optimality system may or may not
correspond to a solution to the original optimal control problem. In order to ensure
that, one would require a second-order sufficient condition. In this work we choose
to search for an optimal solution by numerically solving the optimality system
and then by checking if the solution is a good candidate for the optimal control
problem.
The optimality system is a very complex system and its numerical solution is
a difficult and time-consuming task.
Chapter 3
Finite element approximation of
the optimality system
3.1
Finite element method
The numerical solution of the optimal control problems considered in this thesis
is very challenging. We consider a finite element method for their discretization.
Generally speaking, any finite element method for the solution of differential
problems starts from a weak formulation or variational formulation for the problem at hand. This formulation is characterized by infinite-dimensional operators
acting on infinite-dimensional function spaces. The finite element method consists
in the determination of finite-dimensional counterparts for the operators and function spaces, where the finite dimensionality is achieved with a suitable geometric
partition of the domain.
In order to illustrate the finite element approximation of a variational problem,
for the sake of simplicity we refer to the linear mixed problem defined as Problem
Ql in Section 1.3.1. The finite element approximation of the nonlinear mixed
Problem Qn defined in Section 1.3.2 relies on the theory of branches of nonsingular
solutions, which pertains a wide class of nonlinear problems, including the NavierStokes equations. We refer the reader to [13] for details on this theory, which is
due to Brezzi, Rappaz and Raviart [6]. Nevertheless, the basic aspects that we
illustrate here for the linear problem can be extended to the nonlinear case.
Let h denote a discretization parameter tending to zero and, for each h, let Xh
and Mh be two finite-dimensional spaces such that
Xh ⊂ X ,
Mh ⊂ M .
(3.1)
Since the finite-dimensional spaces are taken as subsets of the infinite-dimensional
counterparts, the approximation is said to be conforming. Let Xh0 and Mh0 denote
56
Finite element approximation of the optimality system
the dual spaces of Xh and Mh with the dual norms
kfh kXh0 = sup
uh ∈Xh
< fh , uh >
,
kuh kX
kfh kMh0 = sup
u∈Mh
< fh , uh >
.
kuh kM
(3.2)
Clearly, since the supremum is taken over a smaller set in the discrete case,
klkXh0 ≤ klkX 0 ,
kχkMh0 ≤ kχkM 0
∀ l ∈ X0 ,
∀ χ ∈ M0 .
(3.3)
Like in the continuous case, we associate with a(·, ·) and b(·, ·) the operators Ah ∈
L(X, Xh0 ), Bh ∈ L(X, Mh0 ) and Bh0 ∈ L(M, Xh0 ) acting on the continuous spaces
and with values in the duals of the discrete spaces, such that
< Ah u, vh > = a(u, vh )
< Bh u, µh > = b(u, µh )
< Bh0 µ, uh > = b(uh , µ)
∀ u ∈ X , ∀ vh ∈ Xh ,
∀ u ∈ X , ∀ µh ∈ Mh ,
∀ uh ∈ Xh , ∀ µ ∈ M .
(3.4)
(3.5)
(3.6)
Strictly speaking, Bh0 is not the dual operator of Bh , but, if Bh is restricted to Xh
and Bh0 to Mh , then Bh and Bh0 are indeed dual operators. Also, we have
kAh ukXh0 ≤ kAh ukX 0
∀u ∈ X ,
(3.7)
kBh0 µkXh0 ≤ kBh µkX 0
∀µ ∈ M .
(3.9)
kBh ukMh0 ≤ kBh ukM 0
∀u ∈ X ,
(3.8)
For each χ ∈ M 0 , we define Vh (χ) as the finite-dimensional counterpart of V (χ):
Vh (χ) = {uh ∈ Xh | b(uh , µh ) = < χ, µh >
∀ µh ∈ Mh } ,
(3.10)
and we denote
Vh = Vh (0) = ker(Bh ) ∩ Xh = {uh ∈ Xh | b(uh , µh ) = 0 ∀ µh ∈ Mh } .
(3.11)
We remark that in general Vh 6⊂ V and Vh (χ) 6⊂ V (χ) because Mh is a proper
subspace of M .
Now, in order to approximate Problem Ql , we define Problem Ql,h :
Problem 11. (Problem Ql,h ). Given l ∈ X 0 and χ ∈ M 0 , find a pair (uh , λh ) ∈
Xh × Mh satisfying
a(uh , vh ) + b(vh , λh ) = < l, vh >
b(uh , µh ) = < χ, µh >
∀ vh ∈ Xh ,
∀ µh ∈ Mh ,
and we associate with Problem Ql,h the following Problem Pl,h :
(3.12)
(3.13)
57
3.1. Finite element method
Problem 12. (Problem Pl,h ). Find uh ∈ Vh (χ) satisfying
∀ vh ∈ Vh .
a(uh , vh ) = < l, vh >
(3.14)
As Vh 6⊂ V and Vh (χ) 6⊂ V (χ), Problem Pl,h may be viewed as an external
approximation of Problem Pl in Section 1.3.
The operator form for the discrete mixed problem is
in Xh0 ,
in Mh0 .
Ah uh + Bh0 ph = l
Bh uh = χ
(3.15)
(3.16)
It is clear that the approximation scheme here defined is consistent, in the sense
that the solution (u, p) of the continuous problem satisfies the discretized scheme:
Ah u + Bh0 p = l
Bh u = χ
in Xh0 ,
in Mh0 .
(3.17)
(3.18)
Now, the question arises whether a solution of the discrete problem exists and
whether it is convergent to the infinite-dimensional solution. The first answer is
given by the following existence theorem. We observe that, also in the finitedimensional case, if (uh , λh ) is a solution of Problem Ql,h , then uh is a solution of
Problem Pl,h . The next theorem yields the condition for the converse to hold.
Theorem 24. 1) Assume that the following conditions hold:
(i) the set Vh (χ) is not empty;
(ii) there exists a constant α∗ > 0 such that
a(vh , vh ) ≥ α∗ kvh k2X
∀ vh ∈ Vh .
(3.19)
Then Problem Pl,h has a unique solution uh ∈ Vh (χ).
2) Assume that hypothesis (ii) holds and, in addition, that
(iii) there exists a constant β ∗ > 0 such that
sup
vh ∈Xh
b(vh , µh )
≥ β ∗ kµh kM
kvh kX
∀ µh ∈ Mh .
(3.20)
Then Vh (χ) is not empty and there exists a unique λh ∈ Mh such that (uh , λh ) is
the only solution of Problem Ql,h .
58
Finite element approximation of the optimality system
We observe that, since Vh 6⊂ V , the coercivity condition (3.19) is not a direct
restriction to the finite-dimensional subsets of the coercivity property on the continuous spaces given by (1.57). However, in most practical situations the discrete
coercivity is not a major obstacle. Also the discrete inf-sup condition (3.20) cannot
be directly deduced from its continuous counterpart (1.55). In this case, the proof
is much more delicate and it is often of rather technical nature.
The following theorem is the most important step towards a convergence result,
providing upper bounds for the difference between the solutions of the associated
continuous and discrete problems.
Theorem 25. 1) Assume that the hypotheses (i) and (ii) in Theorem 24 hold.
Then there exists a positive constant C1 depending only upon α∗ , kak and kbk such
that the following error bound holds:
(3.21)
ku − uh kX ≤ C1
inf ku − vh kX + inf kλ − µh kM ,
µh ∈Mh
vh ∈Vh (χ)
where (u, λ) is the solution of the corresponding Problem Ql .
2) Assume that hypotheses (ii) and (iii) in Theorem 24 hold. Then there exists
a positive constant C2 depending only upon α∗ , β ∗ , kak and kbk such that
ku − uh kX + kλ − λh kM ≤ C2 inf ku − vh kX + inf kλ − µh kM . (3.22)
vh ∈Xh
µh ∈Mh
The estimates given by (3.21) and (3.22) are a generalization for mixed problems of the well-known Céa’s lemma concerning elliptic forms. They express the
relationship between the solutions of the continuous and discrete problems. Eq.
(3.22) claims that the error between (u, λ) and (uh , λh ) is quasi-optimal, in the
sense that it is bounded by a constant times the sum of the best approximation
errors for u and λ in the spaces Xh and Mh . Note that the best approximation
errors do not depend on the operators of the problem, but they are an intrinsic
property of the respective continuous and discrete spaces.
Now it is evident that convergence of the finite element approximation to Problem Ql given by Problem Ql,h occurs whenever one has
inf ku − vh kX → 0 as h → 0 ,
(3.23)
inf kλ − µh kM → 0 as h → 0 ,
(3.24)
vh ∈Xh
µh ∈Mh
and the constant C2 does not depend on h. To this purpose, the following general
convergence result can be stated.
Theorem 26. Let u and uh be the solutions of Problems Pl and Pl,h , respectively.
Assume that the following hypotheses hold:
59
3.1. Finite element method
1. the form a(·, ·) satisfies (3.19) with a constant α∗ > 0 independent of h;
2. there exist a dense submanifold V(χ) of V (χ), a dense subspace M of M
and two mappings rh : V(χ) → Vh (χ) and ρh : M → Mh with:
lim krh v − vkX = 0 ∀ v ∈ V(χ) ,
h→0
lim kρh µ − µkM = 0 ∀ µ ∈ M .
h→0
(3.25)
(3.26)
Then
lim ku − uh kX = 0 .
(3.27)
h→0
As a corollary, we have the convergence of the solution of Problem Ql,h to
Problem Ql .
Corollary 2. Let (u, λ) and (uh , λh ) be the solutions of Problems Ql and Ql,h ,
respectively. We retain the same hypotheses as Theorem 26 on a(·, ·) and M and
we assume that b(·, ·) satisfies the discrete uniform inf-sup condition (3.20). If
there exist a dense subspace X of X and a mapping rh : X → Xh satisfying:
lim krh v − vkX = 0 ∀ v ∈ X ,
(3.28)
lim (ku − uh kX + kλ − λh kM ) = 0 .
(3.29)
h→0
then
h→0
From Theorem (26) and Corollary (2) we observe that the determination of
convergent finite element approximations for the abstract linear mixed problem
here considered ultimately consists in appropriate choices for the spaces Xh and
Mh , so that suitable operators rh and ρh can be constructed.
It may be interesting for the error analysis to determine error estimates in other
norms than (3.21). These estimates may turn out to be sharper. To this purpose,
let us extend to the case of Problems Pl and Pl,h the classical duality argument
of Aubin and Nitsche. We introduce a Hilbert space H with scalar product (·, ·)
and associated norm | · | such that X ⊂ H with continuous and dense embedding.
By the Riesz representation theorem, we identify H with its dual space H ∗ for the
scalar product (·, ·). Therefore, H can be considered as a subspace of X ∗ , H ⊂ X ∗ ,
with a continuous and dense embedding.
In order to evaluate |u − uh |, we introduce for each g ∈ H the unique solution
(φg , ξg ) of the following problem, which can be interpreted as a dual problem of
the original linear mixed Problem Ql :
a(v, φg ) + b(v, ξg ) = (g, v)
b(φg , µ) = 0
∀v ∈ X ,
∀µ ∈ M .
The estimate in the norm of the space H is given by the following result.
(3.30)
(3.31)
60
Finite element approximation of the optimality system
Theorem 27. Assume that Problem Pl,h has a unique solution uh ∈ Vh (χ). Then
there exists a constant C, depending only on kak and kbk, such that:
|u − uh | ≤ C ku − uh kX + inf kλ − µh kM
µh ∈Mh
1
× sup
inf kφg − φh kX + inf kξg − ξh kM
. (3.32)
ξh ∈Mh
g φh ∈Vh
g∈H
Let us consider as an example the finite element approximation of the Stokes
equations given by Problem 3 in Section 1.3. We set the finite-dimensional spaces
Wh ⊂ H 1 (Ω) ,
Qh ⊂ L2 (Ω) .
(3.33)
Then we define
Xh = Wh ∩ H 10 (Ω) = {v h ∈ Wh : v h |Γ = 0} ,
Z
2
Mh = Qh ∩ L0 (Ω) = {qh ∈ Qh |
qh dΩ = 0} .
(3.34)
(3.35)
Ω
With these spaces, the discrete Stokes problem in Ql,h form reads as follows:
Problem 13. Find a pair (uh , ph ) ∈ Xh × Mh such that
∀ v h ∈ Xh ,
∀ qh ∈ Mh .
a(uh , v h ) + b(v h , ph ) = < f , v h >
b(uh , qh ) = 0
(3.36)
(3.37)
Since it can be shown that the range space of the divergence operator is L20 (Ω),
we have div uh ∈ L20 (Ω). Hence, (3.37) can be written as
b(uh , qh ) = 0 ∀ qh ∈ Qh .
(3.38)
In view of this remark, the space Vh for the Pl,h form of the discrete Stokes problem
becomes
Vh = {v h ∈ Xh : b(uh , qh ) = 0 ∀ qh ∈ Qh } .
(3.39)
Hence, the discrete Stokes problem in Pl,h form is
Problem 14. Find uh ∈ Vh such that
a(uh , v h ) = < f , v h >
∀ v h ∈ Vh .
(3.40)
In order to construct the spaces Xh and Mh and the operators rh and ρh as
required by Theorem 26, for the Stokes problem it is preferable to work with the
following set of hypotheses.
61
3.1. Finite element method
Hypothesis (H1). (Approximation property for Xh ). There exists an operator Rh ∈
L(H 2 (Ω); Wh ) ∩ L(H 2 (Ω) ∩ H 10 (Ω); Xh ) and an integer l such that, for a constant
C independent of h:
kv − Rh vk1 ≤ Chm kvkm+1
∀ v ∈ H m+1 (Ω) ,
1 ≤ m ≤ l.
(3.41)
Hypothesis (H2). (Approximation property for Qh ). There exists an operator Sh ∈
L(L2 (Ω); Qh ) and an integer l such that:
kq − Sh qk0 ≤ Chm kqkm
∀ q ∈ H m (Ω) ,
0 ≤ m ≤ l.
(3.42)
Hypothesis (H3). (Discrete uniform inf-sup condition). There exists a constant
C 0 > 0 , independent of h, such that:
sup
06=uh ∈Xh
b(uh , qh )
≥ C 0 kqh k0
kuh k1
∀ qh ∈ Mh .
Hence, we see from these hypotheses that the role of the operators rh and ρh
in Theorem 26 is replaced by the operators Rh and Sh . We also remark that
Hypotheses (H1) and (H2) are standard approximation properties for the study of
elliptic problems, while Hypothesis (H3) arises specifically in the analysis of mixed
finite element discretizations.
Then, the convergence Theorem 26 for the Stokes problem can be formulated
as follows.
Theorem 28. Under the hypotheses (H1), (H2) and (H3), Problem 13 has a
unique solution (uh , ph ) ∈ Vh × Mh and uh is also the only solution of Problem 14.
In addition, (uh , ph ) tends to the solution (u, p) of Problem 3:
lim (|u − uh |1 + kp − ph k0 ) = 0 .
h→0
(3.43)
Furthermore, when (u, p) belongs to H m+1 (Ω) × (H m (Ω) ∩ L20 (Ω)) for some integer
1 ≤ m ≤ l, we have the error bound:
|u − uh |1 + kp − ph k0 ≤ Chm {kukm+1 + kpkm } .
(3.44)
Various pairs of spaces (Xh , Mh ) have been studied in literature in order to
satisfy the requirements of Hypotheses (H1), (H2) and (H3). A thorough discussion
on different choices of finite element spaces for mixed problems can be found in
[13, 5]. In particular, it is well-known that not all choices of finite element spaces
are acceptable for guaranteeing that the discrete inf-sup condition in Hypothesis
(H3) is fulfilled. Among these pairs of spaces, let us outline the definition of the
so-called Taylor-Hood family of finite element spaces. The distinguishing feature
62
Finite element approximation of the optimality system
of a finite element method lies upon the fact that the construction of the finitedimensional spaces starts from a partition or triangulation of the domain into finite
elements. To be more precise, a triangulation Th of the domain Ω̄ is defined by a set
of element domains {κi } (e.g. triangles and/or quadrilaterals in two dimensions,
tetrahedra and/or hexahedra in three dimensions) such that the following hold:
S
• Ω̄ = κ∈Th κ ;
• int(κi )∩int(κj ) = ∅
elements is empty;
if i 6= j , i.e., the intersection of the interiors of distinct
• every κi is a bounded closed subset of Ω̄ with nonempty interior and piecewise
smooth boundary;
• the triangulation is geometrically conforming, i.e. any two non-disjoint elements share exactly either one face, or one side, or one vertex.
In order to measure the regularity of a triangulation, for every element κ we define
hκ = diameter of κ ,
ρκ = sup{diameter of B; B is a ball contained in κ} .
(3.45)
(3.46)
We characterize every element by the ratio
σκ =
hκ
.
ρκ
(3.47)
The mesh size h of the triangulation Th is defined as
h := max hκ .
κ∈Th
(3.48)
A family of triangulations Th with respect to the mesh size h is said to be regular
as h tends to zero if there exists a σ > 0, independent of h and κ, such that
σκ ≤ σ
∀ κ ∈ Th .
(3.49)
Moreover, the family of triangulations is uniformly regular or quasi-uniform if
there exists a constant τ > 0 such that
τ h ≤ hκ ≤ σρκ
∀ κ ∈ Th .
(3.50)
A set of basis functions for the finite-dimensional spaces, often referred to as shape
functions, is constructed starting from a domain triangulation.
Let us consider the Taylor-Hood pair of finite element spaces for the discrete
Stokes problem. For the sake of conciseness, let us assume a triangulation Ts,h of
63
3.1. Finite element method
Ω̄ made of N-simplices, namely triangles (2-simplices) or tetrahedra (3-simplices),
and let us denote by Pk the set of polynomials on RN of degree less than or equal
to k. For the pair of spaces (Wh , Qh ) in (3.33) and the associated pair (Xh , Mh )
in (3.34) and (3.35) we set
Wh = {v ∈ C 0 (Ω̄)N : v|κ ∈ P2N ∀ κ ∈ Ts,h } ,
Qh = {q ∈ C 0 (Ω̄) : q|κ ∈ P1 ∀ κ ∈ Ts,h } ,
Xh = Wh ∩ H 10 (Ω) = {v ∈ C 0 (Ω̄)N : v|κ ∈ P2N
Mh = Qh ∩ L20 (Ω) ,
(3.51)
(3.52)
∀ κ ∈ Ts,h , v|Γ = 0} ,
(3.53)
(3.54)
where C 0 (Ω̄) denotes the space of continuous functions on Ω̄. A similar definition
of Taylor-Hood spaces for quadrilateral or hexahedral meshes can be given. The
space Wh is the well-known Lagrange finite element space of continuous piecewisequadratic functions and it is devoted to the approximation of the velocity field,
while Qh is the space of continuous piecewise-linear functions for pressure.
The operators Rh and Sh can be constructed in such a way that all the hypotheses are satisfied. Therefore, we have the following convergence result for the
Taylor-Hood family of finite element spaces applied to the Stokes problem. Prior
to that, we must make a special hypothesis on the triangulation Ts,h .
Hypothesis (T). The triangulation Ts,h has a set of interior nodes {ar }R
r=1 such that
R
the set of associated macroelements {Ωr }r=1 , where each macroelement Ωr is the
union of all elements κ ∈ Ts,h that have ar as one vertex, is a partition of Ω̄.
Theorem 29. Let Ω be a bounded, plane polygon and let the solution (u, p) of the
Stokes Problem 3 satisfy
u ∈ [H k (Ω) ∩ H 10 (Ω)]N ,
p ∈ H k (Ω) ∩ L20 (Ω) ,
k = 1 or 2 .
(3.55)
If the triangulation Ts,h is regular and satisfies Hypothesis (T), the solution (uh , ph )
of Problem 13 with the spaces Xh and Mh defined by (3.53) and (3.54) satisfies
the estimate
|u − uh |1 + kp − ph k0 ≤ C1 hk {|u|k+1 + |p|k } ,
k = 1 or 2 .
(3.56)
When Ω is convex, a refined estimate holds:
ku − uh k0 ≤ C2 hk+1 {|u|k+1 + |p|k } ,
k = 1 or 2 .
(3.57)
Furthermore, if Ts,h is uniformly regular (but Ω not necessarily convex) we also
have:
|p − ph |1 ≤ C3 hk−1 {|u|k+1 + |p|k } , k = 1 or 2 .
(3.58)
We remark the presence of the sharper estimate (3.57) which is determined as
an application of the duality arguments used for Theorem 27. We refer the reader
to [4, 8] for a rigorous definition of the concept of finite element and for detailed
discussions on the construction of finite element spaces.
64
3.2
Finite element approximation of the optimality system
Finite element multigrid algorithm
The multigrid algorithm is among the most efficient solvers for the numerical
solution of elliptic problems. It has found a considerable interest in literature due
to various appealing features. In particular, it proves to be very attractive due
to a computational work that is only proportional to the number of degrees of
freedom of the discretized system [4, 37, 38]. Here we discuss the fundamentals of
the multigrid algorithm in a finite element framework. This algorithm has been
implemented for the numerical solution of the equations of the optimality system
considered in this work.
For the sake of simplicity, we describe the algorithm for the following model
problem. Let Ω ⊂ R2 be a convex polygon; we seek for u ∈ V = H01 (Ω) such that
a(u, v) = (f, v) ∀ v ∈ V ,
(3.59)
where a(u, v) is a bilinear elliptic form on V × V and f ∈ L2 (Ω). By elliptic
regularity, we have that u ∈ H 2 (Ω) ∩ H01 (Ω).
In order to formulate the multigrid algorithm we introduce some notations.
First, let us consider a sequence of triangulations Tk of the domain Ω obtained
via classical midpoint subdivision starting from the coarser triangulation T1 . Let
Vk ⊂ V be the space of continuous piecewise linear functions with respect to Tk
that vanish on ∂Ω. Note that
Tk−1 ⊂ Tk ⇒ Vk−1 ⊂ Vk
∀k ≤ 1.
(3.60)
Then a finite element discretized form of Problem (3.59) is as follows.
Find uk ∈ Vk such that
a(uk , vk ) = (f, vk ) ∀ vk ∈ Vk .
(3.61)
Let hk be the mesh size of Tk , i.e. hk = maxT ∈Tk diamT , and let nk = dim Vk .
The goal of a multigrid algorithm is to find a ûk ∈ Vk in O(nk ) operations, such
that it satisfies
kuk − ûk kH s (Ω) < Chk2−s kukH 2 (Ω) ,
s = 0, 1, k = 0, 1, 2, . . .
(3.62)
Hence, this algorithm is expected to be convergent as the mesh size goes to zero
and with a computational complexity that is only proportional to the number of
degrees of freedom nk of the space Vk . Let us now introduce the mesh-dependent
inner product (·, ·)k on Vk as
(v, w)k = h2k
nk
X
i=1
v(pi ) w(pi ) ,
(3.63)
65
3.2. Finite element multigrid algorithm
where pi is the set of nk internal vertices of Tk . Then, we can define the operator
Ak : Vk → Vk and the function fk ∈ Vk as
∀ v, w ∈ Vk ,
∀ v, w ∈ Vk .
(Ak v, w)k = a(v, w)
(fk , w)k = (f, v)
so that the discretized problem (3.61) can be written in operator form as
Ak uk = fk .
(3.64)
Now, the main ingredients to formulate a multigrid algorithm are the intergrid
transfer operators, in particular the prolongation and restriction operators. The
k
, Vk−1 → Vk is defined as the natural injection, i.e.
prolongation operator Ik−1
k
v=v
Ik−1
∀ v ∈ Vk−1 .
(3.65)
The restriction operator Ikk−1 , Vk → Vk−1 is defined to be the transpose operator
k
of Ik−1
with respect to the mesh-dependent inner product (·, ·)k , i.e.
k
(Ikk−1 v, w)k−1 = (v, Ik−1
w)k
∀ v ∈ Vk , w ∈ Vk−1 .
(3.66)
We are now in a position to formulate the so-called k-th level iteration. The k-th
level iteration algorithm is denoted as M G(k, z0 , g) and defined as the approximate
solution of Ak z = g with initial guess z0 . In the following we denote with m1 and
m2 some positive integers and with Λk some upper bound for the spectral radius of
Ak satisfying Λk < Ch−2
k . This approximate solution is obtained in the following
steps
Algorithm. k-th level iteration M G(k, z0 , g)
1: if (k = 1) then
2:
M G(1, z0 , g) = A−1 g.
3: else if (k > 1) then
4:
for l = 1, . . . , m1 do
5:
zl = zl−1 +
6:
7:
8:
9:
1
(g − Ak zl−1 )
Λk
end for
ḡ = Ikk−1 (g − Ak zm1 ), q0 = 0
for i = 1, . . . , p do
qi = M G(k − 1, qi−1 , ḡ).
10:
11:
(pre-smoothing)
end for
k
zm1 +1 = zm1 + Ik−1
qp .
(error correction)
66
Finite element approximation of the optimality system
k=4
k=3
k=2
k=1
|
{z
r times
}
|
{z
r times
}
Figure 3.1: The full multigrid algorithm.
12:
13:
for l = m1 + 2, . . . , m1 + m2 + 1 do
zl = zl−1 +
14:
15:
16:
1
(g − Ak zl−1 )
Λk
(post-smoothing)
end for
M G(k, z0 , g) = zm1 +m2 +1
end if
For p = 1, the k-th level iteration algorithm is called a V-cycle method, while
for p = 2 it is called a W-cycle method. We remark that the pre-smoothing and
post-smoothing steps are typically performed in practice with classical iterative
schemes such as Jacobi, Gauss-Seidel or GMRES.
The k-th level iteration algorithm is the basic unit to implement various forms
of multigrid algorithms for the solution of (3.64) [4, 37, 38]. As an example, the
Full MultiGrid method (FMG) is defined as follows. As depicted in Figure 3.1,
we start from the coarse solution given by û1 = M G(1, z0 , fk ) and we prolongate
k
it as u2 = Ik−1
û1 . We use this value as the initial guess for the level iteration
given by k = 2. We apply the level iteration r times for a given number of levels
k = K. Therefore the full multigrid algorithm for the approximate solution ûk of
Ak uk = fk reads as follows.
Algorithm. Full multigrid algorithm.
1: û1 = A−1
1 f1 .
2: for (k ≥ 2) do
k
3:
uk0 = Ik−1
ûk−1
4:
for l = 2, . . . , r do
5:
ukl = M G(k, ukl−1 , fk )
6:
end for
7:
ûk = ukr
8: end for
3.3. Approximation of the optimality system
67
The analysis of the algorithm convergence and the estimate of the computational complexity can be performed both for the V- and W-cycle methods, by
considering the so-called approximation and smoothing properties. We refer the
reader to [4] for details.
3.3
Approximation of the optimality system
In this section we approximate the equations of the optimality system derived
in Section 2.5.3 as a first-order necessary condition for the optimal control problem considered in this thesis. We use a conforming finite element method as
described in Section 3.1. Let X h ⊂ H 1 (Ω) and Qh ⊂ L2 (Ω) be two families of
finite dimensional subspaces parametrized by h that tends to zero. We denote
X h,0 = X h ∩ H 10 (Ω), Qh,0 = Qh ∩ L20 (Ω) and, for any subset Γs ⊂ Γ, X h,Γs =
X h ∩ H 1Γs (Ω). We choose for X h and Qh the Lagrange finite element spaces of
continuous piecewise-quadratic and continuous piecewise-linear functions given by
(3.51) and (3.52), respectively. With these finite-dimensional spaces the approximation properties and the inf-sup condition illustrated in Section 3.1 are satisfied. In order to solve the optimal control problem we must solve the optimality
system in the variables (uh , rh , bh , σh , B eh , λh , π1h , ξ h , π2h , π3h ). As in the infinitedimensional case, we can divide the discrete optimality system into three parts:
the state system, the adjoint system and the control equation. The discrete form
of the state system (2.46) for the variables (uh , rh , bh , σh ) ∈ X h × Sh × X h,0 × Qh,0
can be written as
1
a(uh , v 1h ) + c(uh , uh , v 1h ) − S1 c(bh + B eh , bh + B eh , v 1h )+
Re
d(v 1h , rh ) =< f h , v 1h > − < th , v 1h >Γ\Γ1 ,
d(uh , q1h ) = 0 ,
1
am (bh + B eh , v 2h ) + c(uh , bh + B eh , v 2h )−
Rem
c(bh + B eh , uh , v 2h ) + d(v 2h , σh ) = 0 ,
d(bh + B eh , q2h ) = 0
(3.67)
for all test functions (v 1h , q1h , v 2h , q2h ) ∈ X h,Γ1 × Sh × X h,0 × Qh,0 and boundary
conditions uh = g h on Γ1 and bh = 0 on Γ.
The discrete adjoint system corresponding to (2.69) and (2.70), in the variables
68
Finite element approximation of the optimality system
(λh , π1h , ξ, π2h ) ∈ X h,Γ1 × Sh × X h,0 × Qh,0 , can be written as
1
a(δuh , λh ) + c(δuh , uh , λh ) + c(uh , δuh , λh ) + d(δuh , π1h )
Re
+ c(δuh , bh + B eh , ξ h ) − c(bh + B eh , δuh , ξ h ) + α(uh − ud , δuh ) = 0 ,
d(λh , δrh ) = 0 ,
(3.68)
1
am (δbh , ξ h ) + c(uh , δbh , ξ h ) − c(δbh , uh , ξ h )
Rem
− S1 c(δbh , bh + B eh , λh ) − S1 c(bh + B eh , δbh , λh ) + d(δbh , π2h ) = 0 ,
d(ξ h , δσh ) = 0
for all test functions (δuh , δrh , δbh , δσh ) ∈ X h,Γ1 × Sh × X h,0 × Qh,0 with boundary
conditions λh = 0 on Γ1 and ξ h = 0 on Γ.
The discrete form of the optimality condition (2.68), for the variables (B eh , π3h ) ∈
X h × Qh,0 , takes the form
1
am (ξ h , δB eh ) + c(uh , δB eh , ξ h )
Rem
− c(δB eh , uh , ξ h ) − S1 c(δB eh , bh + B eh , λh )
− S1 c(bh + B eh , δB eh , λh ) + d(δB eh , π3h ) = 0 ,
d(B eh , δπ3h ) = 0
β(B eh , δB eh ) + γa(B eh , δB eh ) +
(3.69)
for all test functions (δB eh , δπ3h ) ∈ X h,Γd × Qh,0 and boundary conditions B eh =
Φ0d,h on Γd . The optimal boundary control Φ0h for the magnetic field is then
extracted directly as
Φ0h = γ0 (B eh )
(3.70)
where γ0 is the trace operator.
Remark 8. In order to obtain the discrete version of the optimality system, one
could also choose to start with the finite element approximation of the state system
and introduce discrete constraint operators Mh and Nh corresponding to M and
N but acting on finite-dimensional spaces. Then, one can compute the Fréchet
differentials of such operators on the finite-dimensional spaces. This possibility
would bring some theoretical differences; for instance, some proofs would become
trivial in the finite-dimensional framework. Nevertheless, this issue is mainly a
matter of taste from a theoretical point of view and the numerical approximations
are expected to be similar. Our choice follows the so-called differentiate-thendiscretize approach [15].
3.4. Gradient algorithm for the optimality system
3.4
69
Gradient algorithm for the optimality system
It is worth noting that the state, adjoint and control variables in the optimality
system are tightly coupled. A simultaneous, fully coupled solution of the optimality system on the whole computational domain is unrealistic for the computational
load and the memory requirement. Thus, a decoupled solution of these equations
is required, even though it brings some numerical oscillations. An accurate gradient algorithm can decrease the magnitude of these oscillations and increase the
robustness of the solution of the optimality system.
The outline of the gradient algorithm that we consider here reads as follows:
0
0
0. Set B 0eh , B −1
eh , ω = 1 and J to some high value.
For a given optimization step k:
k−1
k−2
k
1. Compute B keh = B k−2
eh + ω (B eh − B eh ).
2. Solve the state system (3.67) for (ukh , rhk , bkh , σhk ).
3. Compute the objective functional J k .
k
k
3.1 if J k < J k−1 , solve the adjoint system (3.68) for (λkh , π1h
, ξ kh , π2h
) and
k
k
k+1
k
the control equation (3.69) for (B eh , π3h ), then set ω
= 1.5 ω .
3.2 else if J k > J k−1 , set ω k+1 = 0.5 ω k .
4. Increase k and go to step 1 as far as |J k − J k−1 | > The control space for the variable B eh is explored according to a line search
strategy with direction given by the difference between two subsequent controls,
k−2
(B k−1
eh − B eh ). The intensity of the search direction is adjusted by the adaptive
step size ω k . This is a relaxation parameter that is employed to either over-relax
or under-relax the new control solution. In case the value of the functional J k
decreases, a new adjoint and control solution is computed and ω k is increased.
On the other hand, when the value of the functional increases the control search
direction is not modified and the intensity of ω k is reduced. With this gradient
algorithm the separation between the equations takes into account the couplings
typically occurring in an optimality system. In fact, the adjoint variables do not
appear directly in the state system and, for this reason, the solution of the state and
adjoint equations can be carried out separately. Nonlinear iterations are required
for the state equations, thus increasing the complexity of the algorithm. These
nonlinear iterations can be performed with classical procedures such as Newton
70
Finite element approximation of the optimality system
or Picard methods [13, 34]. The adjoint system and the optimality condition are
instead linear in their unknowns, as they are derived from first-order differentiation
and the cost functional is quadratic.
We now describe the gradient algorithm in further details. The outer iteration of the optimization loop is denoted as k and the value K is the associated
convergence tolerance. Superscript d refers to the state (direct) system of the
D
Navier-Stokes and MHD equations; D
1 and 2 are the respective convergence values. The nonlinear iterations for the Navier-Stokes equations are denoted as n
with tolerance N . For the adjoint and control system we use the index a. The
A
A
values A
1 , 2 and 3 denote the tolerances on the adjoint Navier-Stokes, adjoint
MHD and control variables, respectively. The gradient algorithm reads:
Optimization loop (k index):
k=0
k=0 k=0
- Initialize B k=0
, B k=−1
, ω k=0 , bk=0
h , σh , uh , rh .
e
e
- For k ≥ 1, solve the optimization loop.
Relaxation of the control:
- Compute B ke = B k−2
+ ω k−1 (B k−1
− B k−2
)
e
e
e
State system (d index):
k−1
k−1
d=0
- Set (bd=0
h , σh ) = (bh , σh ).
- For d ≥ 1, solve the state system.
Navier-Stokes system (n index):
k−1 k−1
n=0
- Set (un=0
h , rh ) = (uh , rh ).
- For n ≥ 1, solve the Navier-Stokes system with a nonlinear algorithm (here we
consider Picard linearization) for the variables (unh , rhn ) ∈ X h × Sh
1
d−1
n
a(unh , v 1h ) + c(un−1
+ B keh , bhd−1 + B keh , v 1h )+
h , uh , v 1h ) − S1 c(bh
Re
d(v 1h , rhn ) =< f h , v 1h > − < th , v 1h >Γ\Γ1 ,
d(unh , q1h ) = 0 ,
with uh = g h on Γ1 , for all test functions (v 1h , q1h ) ∈ X h,Γ1 × Sh .
(3.71)
- Increase n = n + 1 until ||unh − uhn−1 || + ||rhn − rhn−1 || < N for some n = n̄, so
that convergence of the Navier-Stokes loop is achieved, then set udh = un̄h .
3.4. Gradient algorithm for the optimality system
71
MHD system:
- Solve the linear MHD system for the variables (bdh , σhd ) ∈ X h,0 × Qh,0
1
am (bdh + B keh , v 2h ) + c(udh , bdh + B keh , v 2h )−
Rem
c(bdh + B keh , udh , v 2h ) + d(v 2h , σhd ) = 0 ,
(3.72)
d(bdh , q2h ) = 0 .
with bh = 0 on Γ, for all test functions (v 2h , q2h ) ∈ X h,0 × Qh,0 .
d−1
d
d−1
d
D
- Increase d = d + 1 until ||udh − ud−1
h || + ||rh − rh || < 1 and ||bh − bh || +
¯
||σhd − σhd−1 || < D
2 for some iteration d = d. Then, convergence of the overall state
¯
¯
¯
¯
system is achieved and one can set (ukh , rhk , bkh , σhk ) = (udh , rhd , bdh , σhd ).
Computation of the objective functional:
- Compute the functional
J k (ukh , B keh ) =
α k
γ
β
kuh − ud k20 + kB keh k20 + a(B keh , B keh ) .
2
2
2
(3.73)
Adjoint and control system (a index):
a=0
k
= ξ hk−1 and solve the adjoint and control
- If J k < J k−1 , set B a=0
eh = B eh and ξ h
equations for a ≥ 1.
a
- Solve the linear adjoint Navier-Stokes system for (λah , π1h
) ∈ X h,Γ1 × Sh
1
a
a(δuh , λah ) + c(δuh , ukh , λah ) + c(ukh , δuh , λah ) + d(δuh , π1h
)
Re
k
a−1
a−1
a−1
k
+ c(δuh , bkh + B eh
, ξ a−1
h ) − c(bh + B eh , δuh , ξ h ) + α(uh − ud , δuh ) = 0 ,
d(λah , δrh ) = 0 ,
(3.74)
with λh = 0 on Γ1 , for all test functions (δuh , δrh ) ∈ X h,Γ1 × Sh .
a
- Solve the linear adjoint MHD system for (ξ ah , π2h
) ∈ X h,0 × Qh,0
1
am (δbh , ξ ah ) + c(ukh , δbh , ξ ah ) − c(δbh , ukh , ξ ah )
Rem
a
k
a
a−1
a
− S1 c(δbh , bkh + B a−1
eh , λh ) − S1 c(bh + B eh , δbh , λh ) + d(δbh , π2h ) = 0 ,
d(ξ ah , δσh ) = 0
(3.75)
with ξ h = 0 on Γ, for all test functions (δbh , δσh ) ∈ X h,0 × Qh,0 .
72
Finite element approximation of the optimality system
a
) ∈ X h × Qh,0
- Then, solve the control equation for the variables (B aeh , π3h
1
am (ξ ah , δB eh ) + c(ukh , δB eh , ξ ah )
Rem
− c(δB eh , ukh , ξ ah ) − S1 c(δB eh , bkh + B aeh , λah )
β(B aeh , δB eh ) + γa(B aeh , δB eh ) +
−
S1 c(bkh
d(B aeh , δπ3h )
+
B aeh , δB eh , λah )
+
a
d(δB eh , π3h
)
(3.76)
= 0,
=0
with B eh = Φ0d,h on Γd , for all test functions (δB eh , δπ3h ) ∈ X h,Γd × Qh,0 .
a−1
a
a−1
a
A
- Increase a = a + 1 until ||λah − λa−1
h || + ||π1h − π1h || < 1 and ||ξ h − ξ h || +
a
a−1
a−1
a−1
a
A
a
A
||π2h − π2h || < 2 and ||B eh − B eh || + ||π3h − π3h || < 3 for some a = ā.
ā
ā
ā
k
k
k
, B āeh , π3h
). Also, set ω k+1 =
, ξ āh , π2h
, B keh , π3h
) = (λāh , π1h
, ξ kh , π2h
- Set (λkh , π1h
1.5 ω k and J k+1 = J k .
Under-relaxation:
- If J k > J k−1 ,then set ω k+1 = 0.5 ω k and do not update the value of the functional (J k+1 = J k−1 ).
New optimization loop:
- Increase k = k + 1 until |J k − J k−1 | < K .
We remark that the update of the lifting function must not be performed on all
the nodes of the computational domain. In fact, the lifting function extends both
the fixed and the variable boundary conditions. Thus the lifting function must
not be modified on the boundary nodes of Γd , where a fixed boundary condition
for the magnetic field is enforced.
Chapter 4
Computational implementation of
the optimality system
In order to solve the discretized optimality system described in Chapter 3, the
FEMuS finite element multiphysics library has been developed. In Section 4.1 we
illustrate the general structure and purpose of the library. The configuration and
the link with external libraries are discussed in Section 4.2. Section 4.3 is devoted
to the description of the most important library classes. In Section 4.4 we discuss
how these classes are used for the implementation of a multiphysics application
such as the optimality system here considered.
4.1
The FEMuS library
The numerical implementation of the optimality system has been performed as
an application of the finite element FEMuS library (Finite Element Multiphysics
Solver ) developed at the Laboratory of Montecuccolino at the University of Bologna.
In its early stages, the FEMuS project was born as an example application of the
LibMesh open source finite element library [28]. At present, FEMuS is a standalone library that links against various advanced external libraries such as LibMesh
itself, PETSc, MPI and HDF5.
The FEMuS library is devoted to the finite element solution of partial differential equations. Special attention is devoted to multi-physics problems of various
kind such as two-phase flows, thermo-fluidynamics, MHD and fluid-structure interaction. In these applications a set of coupled equations has to be solved and
a common framework of physical data and computational structures has to be
set. The optimality system that we consider in this thesis belongs to this class of
problems.
The purpose of the FEMuS library is to provide a common set of classes and
74
Computational implementation of the optimality system
config/
femus/
include/
app1/
input/
src/
app2/
output/
contrib/
app3/
lib/
fem/
applications/
doc/
Figure 4.1: FEMuS directory structure.
functions that can be used for the implementation of a generic finite element multiphysics application. In this way the code development for a specific application is
restricted to a number of functions which should be as small as possible (functions
strictly related to a specific domain geometry, implementation of specific boundary conditions for a certain equation, etc.). All the other functionalities should be
provided by the library.
Given the complexity of the problems at hand, the library has been developed with particular attention to the modularity and the optimization of memory
requirements and execution time. In order to meet these conditions the C++
language has been chosen, which is characterized by an object-oriented paradigm
and by several forms of polymorphism such as type inheritance, generic programming and operator overloading. These features are particularly appealing as they
improve code readability, allow code reusability and do not engender considerable
runtime overhead at code execution.
In order to understand the main principles underlying the development of the
FEMuS library, we briefly describe its directory structure. This is reported in Fig.
4.1. The files are divided into the following sub-directories:
• include, containing the header files;
• src, containing the source files;
• contrib, containing modified code of external open-source libraries;
• applications, containing the programs using the library;
• fem, containing the shape function values and weight values for the supported
Gauss quadrature rules and canonical elements;
4.1. The FEMuS library
75
• doc, containing the library documentation.
The applications folder contains all the programs that make use of the library:
finite element simulations and utility applications. Each of them is basically characterized by a main() function and specific source files. The folder of every finite
element simulation has the following sub-directories:
• config, containing the configuration files;
• input, for the mesh and multigrid files;
• output, for the output files of a simulation;
• lib, for the library object file as compiled for the specific application.
Let us now give a brief description of the content of the various FEMuS directories.
The include and src directories
In this folder one can find the declarations and implementations of the library
classes and of the other data structures (namespaces, enumerations, etc.).
The include directory contains the header files (.h suffix) where the declarations of the library classes are given. They also contain the implementations of
inline functions and templates whose object code is generated only by implicit
instantiation. A separate header file is usually created for every class.
The src directory has the source files (.C suffix) that define the functions declared by the headers. For example, the Mesh.h file contains the declaration of the
data members and member functions of the Mesh class, while in the Mesh.C file
one can find the implementations of these functions.
The contrib and fem directories
The contrib directory contains the source code that was taken from external opensource libraries and that was modified in order to meet some specific purposes. It
also contains few other auxiliary open source external contributions. For instance,
in the laspack subfolder one can find a slightly modified version of the Laspack
library. This is a linear algebra package for the solution of sparse linear systems
in scalar architectures. Some solvers have been added to this library.
The fem directory consists of plain text files containing the values of the shape
functions and derivatives and the weight values at the Gaussian points of the supported Gauss quadrature rule and for the supported finite element families. The
Lagrange quadratic and linear finite elements in all space dimensions are supported
76
Computational implementation of the optimality system
at present, for hexahedral/quadrilateral (HEX27, HEX8, QUAD9, QUAD4), tetrahedral/ triangular (TET10, TET4, TRI6, TRI3) and edge (EDGE3, EDGE2) geometric element shapes. The fifth-order Gauss quadrature rule is implemented,
which is exact for the given finite element families.
The names of the fem files have the form shape(S) (N)D (FF).in. In the name
of each file, S is a number with values 0 for hexahedral/quadrilateral elements or
1 for the tetrahedral/triangular ones. The digit N is the space dimension. The
digits denoted as (FF) indicate the number of element shape functions. Hence, for
instance, the file shape0 3D 8.in contains the values for the Lagrange HEX8 finite
element (hexahedral shape in 3 dimensions with 8 shape functions).
These files can be generated by the genfegauss program provided with the
library. They are used by a generic application of the library for the computation
of integrals which characterize the variational form of a finite element problem.
The applications directory
The classes and functions defined and implemented in the files of the include and
src directories can be used for writing different applications. Each application can
be implemented in a subfolder in the applications directory. One must provide a
main() function and possibly other specific routines that characterize the particular
finite element simulation.
The applications directory also contains the gencase and genfegauss utility applications. The gencase program is used for the generation of the mesh and multigrid operator files of every finite element simulation in the pre-processing stage.
It makes use of the LibMesh mesh generation functions. The genfegauss directory contains the genfegauss program that generates the files containing the Gauss
quadrature values provided in the fem directory. These files are read by every
finite element application at run-time.
4.2
4.2.1
Configuration of the FEMuS library
External libraries
Various external libraries are used by the FEMuS library in order to perform
operations such as linear algebra solution, mesh generation, input/output.
The following external libraries are required for the use of the FEMuS library,
as can be seen in Figure 4.2:
• an MPI implementation (such as OpenMPI), for parallel execution;
• PETSc, for parallel linear algebra solvers;
77
4.2. Configuration of the FEMuS library
MPI
FEMuS
PETSc
LibMesh
HDF5
Figure 4.2: External libraries required by FEMuS. The dashed arrow from LibMesh
to PETSc indicates that the PETSc libraries are not called by FEMuS through
the interface given by LibMesh but they are used directly.
• LibMesh, for the generation of mesh files and multigrid operator files;
• HDF5, for file input/output tasks.
An MPI implementation is required for the installation of the parallel communication features of both PETSc and LibMesh, and it is also used by FEMuS
directly. In order to avoid incompatibility issues, it is recommended to use the
same MPI library for FEMuS, PETSc and LibMesh.
The PETSc library performs all the linear algebra operations for parallel architectures. It provides the implementation of numerous linear and nonlinear solvers
and preconditioners. The LibMesh package is an open-source C++ finite element
adaptive library. It provides a very rich list of functionalities for finite element
simulations, with support for various finite element families, adaptive mesh refinement, various mesh file formats and mesh geometric elements. Some of the
features of the present version of the FEMuS library have been developed by tak-
78
Computational implementation of the optimality system
ing inspiration from the LibMesh implementations, such as a unified interface for
the handling of different linear algebra packages. At the present stage, the FEMuS
library requires the installation of LibMesh only for the mesh generation features.
The rest of the FEMuS code does not perform LibMesh calls. Therefore, the link
with PETSc libraries is direct and does not pass through LibMesh calls (see Figure
4.2).
We also remark that LibMesh comes bundled with a list of contribution libraries, most of which are not required for a proper use of the FEMuS library. In
particular, only the Metis and Parmetis contribution libraries need to be enabled
in the LibMesh installation. Concerning the file input/output (I/O) operations
in FEMuS, these are performed with the use of the HDF5 library. This library
defines a binary data format with hierarchical structure that permits a flexible and
modular handling of data structures as well as a much faster I/O communication
than plain text ASCII file format. All the mesh files and solution outputs in the
FEMuS routines are generated in the HDF5 format, together with an associated
plain text XDMF wrapper file. The XDMF files are required for visualizing the
data contained in the HDF5 files in a scientific visualization software. The XDMF
format permits to define the association between a mesh file and the corresponding field values. Both the mesh and the field data are contained in HDF5 files. In
HDF5 files the values are stored in a hierarchical structure and a compressed storage format. The XDMF format can be interpreted by some scientific visualization
software such as the open source ParaView application. This application is based
on the VTK library that provides various tools for data visualization. ParaView
is designed for viewing data obtained from parallel architectures and distributed
or shared memory computers, but it can also be used for serial platforms.
The FEMuS library has been installed so far on both Linux and MAC/OS
platforms and it has been successfully compiled with the compilers provided with
the Gnu Compiler Collection (GCC) with the use of the GNU Make utilities.
The Git version control software has been used for tracking the code development
stages. We suggest the use of the Valgrind memory check utility for tracking
memory leaks, segmentation faults and other memory related issues. Also, the raw
data and hierarchical structure of the binary HDF5 files can be viewed with the
useful HDFVIEW software. These use of these tools is recommended for helping
the development of FEMuS classes and applications.
4.2.2
Internal configuration
In order to install the FEMuS library, a first configuration step is needed. At
the present status, the configuration consists in setting a list of shell environment
variables. Some of these variables must be defined in a shell terminal and the
others are set afterwards by sourcing a configuration script.
4.2. Configuration of the FEMuS library
79
The configuration script configure femus.sh in the main femus directory must
be edited by the user according to the specific machine where the FEMuS library is
being installed. The purpose of this script is to define the locations of the external
libraries in the current machine, so that a proper installation of the FEMuS library
can be performed. After running the configuration script, all the informations
related to the installation paths of the external libraries are provided to the FEMuS
Makefiles, so that the library and its applications can be successfully compiled
and run. In the future we plan to use advanced tools such as Cmake or the
GNU Autotools in order to generate automatically the configuration scripts and
the Makefiles for each specific machine.
Therefore, the configuration consists of the following steps:
• set some environment variables in a shell terminal;
• edit the configuration script configure femus.sh;
• run the configuration script.
First of all, one must open a shell environment and set the environment variables FM FEMUS METHOD, FM PETSC METHOD, FM LIBMESH METHOD
and the variable FM MYMACHINE. The first three variables define the compiling
mode for the FEMuS, PETSc and LibMesh libraries respectively. The values that
can be assumed by each of them are opt (optimized mode) or dbg (debug mode).
The use of debugging mode is recommended for the development of the code as it
helps the developer in finding errors in the implementation of the program. The
optimized mode is much faster as many debugging function calls are excluded and
it is used for performing the simulations. In order to avoid possible incompatibility
issues, it is suggested that the same compiling mode be used both for FEMuS and
for all the involved external libraries. However, different compile modes can be
used in some cases. For instance, no incompatibility issues have been encountered
so far when the FEMuS library has been used in debug mode and the LibMesh
and PETSc libraries in optimized mode. This is a favorable condition in terms
of library development as it allows one to perform the debugging of FEMuS functions without adding a considerable time overhead for the debug execution of the
PETSc libraries.
The FM MYMACHINE variable is used to identify a particular list of variables
in the configuration script. This list of variables defines the installation paths
and other information concerning the external libraries for the specific machine
where FEMuS is being installed. The names of the respective folders are set in
the variables FM HDF5 FOLDER, FM LM FOLDER, FM PETSC FOLDER and
FM MPI FOLDER.
When the configuration script has been modified, the user must launch the
command
80
Computational implementation of the optimality system
source configure_femus.sh
With the source command the variables defined in the configuration script after
the export command are correctly exported to the shell environment.
After the configuration script has been run, one has to choose the application he
intends to work on by setting the FM MYAPP environment variable. For instance,
the command
export FM_MYAPP=optsys
is employed to choose the application of the FEMuS library that is contained in
the optsys folder under the applications subdirectory. If one wants to change the
application, one simply has to set the environment variable with the name of the
new application. No further run of the configure script is required.
After choosing the application with the previous command, one can move to
the folder and work in it. The FEMuS library will be compiled for the specific
application. By typing “make” one can compile the library and also create the
application executable. The compilation of the library is related to the specific
application, in order to remove pieces of code that are not relevant for that application itself.
4.3
Library main classes
We give here a description of the main classes of the FEMuS library in terms of
their content and structure. In subsequent paragraphs, we show how these classes
are used and configured.
We list here the most important classes:
• EquationsMap, that defines a common interface for handling a map of equations together with all the objects necessary to complete them;
• EqnBase, for the definition of the basic structures that characterize an equation;
• Quantity, for the basic definition of a physical quantity entering in the equations as an unknown or as a given function;
• QuantityMap, for handling the quantities involved in each application;
• Mesh, for storing the necessary mesh information such as coordinates and
connectivity;
• GeomEl, for the definition of the geometric element composing the mesh;
4.3. Library main classes
81
• Domain, in case the domain has a well-defined shape;
• FEElemBase and its child classes, for the definition of canonical finite elements;
• FEGauss, for holding values of shape functions and derivatives at Gauss
points;
• Utils, that provides common utilities;
• Files, for the handling of input/output file paths;
• Physics, for specifying physical data;
• GenCase, for the generation of mesh files and multigrid operator files;
• EqnQL, a child class of the EqnBase equation class that provides various
functionalities for handling quadratic and linear unknowns;
• Vect, for handling values of various operators at Gauss points;
• RunTimeMap, for class runtime configuration.
4.3.1
The EquationsMap class
A major goal of the FEMuS library is to provide an interface for managing an
arbitrary number of equations involving an arbitrary number of physical quantities. In the numerical solution of a multi-physics problem, where numerous data
and informations have to be shared among different equations, it may be very
convenient to set up a computational structure that enables a flexible definition of
equations and quantities and provides an interface to retrieve all the data required
by each equation.
To this purpose, the EquationsMap class has been defined. It contains a map
to hold all the equations of each specific application and it also gathers all the
class objects required to implement a finite element discretization. As shown in
Figure 4.3, the objects that compose the EquationsMap class are:
• Physics, for specific physical data;
• QuantityMap, for the internal and external involved quantities;
• Mesh, for the domain triangulation;
• TimeLoop, for time discretization;
82
Computational implementation of the optimality system
TimeLoop
Utils
FEMap
EquationsMap
Physics
Mesh
QuantityMap
Figure 4.3: Overview of the EquationsMap class and the classes that compose it.
• FEMap, for space discretization;
• Utils, for various utilities.
An instantiation of each of these objects is created and then passed to the
constructor of the class. Each specific equation implemented by the user has a
reference to the EquationsMap object, so that all the equations can have access to
the required objects.
The arguments of the constructor of the EquationsMap class are intended to be
as general as possible, while retaining the possibility for specific characterizations.
Through the use of the std::map template class from the C++ Standard Template
Library, a map of pointers to base EqnBase objects and a map of pointers to base
Quantity objects are defined. Then, the user that defines specific child classes
of the EqnBase and Quantity types can easily add these child instantiations to
83
4.3. Library main classes
the corresponding maps. We remark that, when child pointers are added to a
map of father pointers, they apparently lose their property of being child pointers.
Nevertheless, a conversion back to the child type can be made with C++ cast
functionalities such as static cast(). Similar considerations can be made for the
Physics class which is intended to be again a base class from which particular child
classes can be implemented.
4.3.2
The EqnBase class
EqnBase
EqnQL
EqnNS
EqnMHD
EqnNSAD
EqnMHDAD
EqnMHDCONT
Figure 4.4: An example of inheritance diagram with the EqnBase class as the
father class.
The EqnBase class is intended to be a base class for the construction of specific
equations. It provides the essential data structures and routines for the definition
of an equation. These include:
• basic equation attributes;
• map of the unknown quantities of the equation;
• linear algebra structures, i.e. vectors, matrices, prolongation and restriction
operators for the multigrid algorithm;
• the map of the degrees of freedom;
• initial and boundary conditions.
The constructor of every child equation class must call the EqnBase constructor.
The base part of every equation is constructed by passing a vector that contains the
pointers to the unknown quantities (child classes of the Quantity base class). Also,
a reference to the EquationsMap object is passed to the constructor, so that each
equation has access to all the necessary objects like mesh and physical data. From
the vector of unknown quantities, the number of scalar unknowns of the system as
well as their finite element order (e.g. Lagrange quadratic or linear) is determined,
together with the dimension of vectors, matrices and multigrid operators. The
so-called DoF map, an array which defines the association between mesh nodes
84
Computational implementation of the optimality system
PROC 0
PROC 0
PROC 1
PROC 1
PROC 2
PROC 2
PROC 3
PROC 3
Figure 4.5: The subdivision of vectors and matrices as required by PETSc. Vectors
must be divided into blocks of contiguous elements, while matrices must be split
into blocks of contiguous rows. Each block is assigned to a different processor.
and degrees of freedom (DoF) of the linear system can then be constructed for all
multigrid levels. This map is based on the mesh domain decomposition for parallel
computing obtained in the preprocessing stage with the gencase application.
In the multigrid framework, each level has its own set of vectors, matrices and
multigrid operators. For each level, these structures are divided in P parts, where
P is the number of processors that is chosen for a parallel run. In a domain decomposition approach, each part is associated to a single portion of the computational
domain. As required by the PETSc libraries, the subdivision of vectors is then
performed in such a way that degrees of freedom associated to a given subdomain
are contiguous in the DoF indexing. Accordingly, matrices are subdivided so that
the DoF’s associated to a given subdomain correspond to a contiguous block of
rows (see Figure 4.5). Once the DoF map is filled, all the structures at all multigrid
levels can be initialized.
The EqnBase class also allows the implementation of two different methods
for enforcing the boundary conditions: the nodal flag method or the element flag
method. With the nodal flag method, a flag is associated to each degree of freedom of the system, both on the boundary and in the interior of the domain. The
nodal bc integer array in the EqnBase class is devoted to hold these nodal flag
values. This array can be filled in various ways according to the specific requirements of each equation. Let us consider for instance the case of the Navier-Stokes
equation. The flag is set to 1 for all the degrees of freedom in the interior of the
domain. For the velocity degrees of freedom, the flag can assume a value equal
to either 0 or 1 for Dirichlet or Neumann boundary conditions, respectively. For
pressure, a flag equal to 0 indicates that the pressure boundary integral must be
4.3. Library main classes
85
computed, and a value 1 is used otherwise. The pure virtual function bc read of
the EqnBase class must be implemented in each child equation depending on the
particular boundary mesh geometry and is devoted to the assignment of the nodal
flags in the nodal bc array. The bc read function receives the coordinates that are
used to identify the node to which the flags must be associated. We remark that
in the case of mixed saddle point equations, such as the Navier-Stokes equations
involving velocity and pressure, not all the choices of boundary conditions are consistent with the variational formulation of the equation. It is up to the user to
check the consistency of the boundary condition flags for the involved unknowns.
So far we have considered the flags that determine the kind of boundary condition to be enforced. The corresponding values can be retrieved from the implementation of the pure virtual function ic read, which must be implemented by the
user for setting the initial conditions. Clearly, the initial condition values on the
boundary correspond to the boundary condition values (time-dependent boundary
conditions are not considered here).
The element flag method for the boundary conditions associates instead some
flags to the mesh boundary elements. An elem bc array and a corresponding
virtual function called elem bc read are used. In the case of vector valued unknowns, it may be more convenient to use an element flag method rather than
a nodal method. A boundary element has in fact a natural definition of normal
and tangential directions, while ambiguities can arise for nodes, especially at the
intersection of two boundary surfaces. The user can decide what type of boundary
flag implementation to use according to his needs.
4.3.3
The Quantity class
This class is the base class for the definition of a physical quantity to be introduced
in each application. In order for a Quantity object to be fully defined, one simply
has to provide:
• a name (in the name string), so that the quantity can be easily identified;
• the number of scalar components ( dim);
• the finite element family (denoted by an integer index, FEord);
• the reference values for all its scalar components ( refvalue pointer);
• the pointer to the associated equation ( eqn);
• a reference qtymap to the map to which the Quantity belongs.
86
Computational implementation of the optimality system
The finite element family determines the approximation order of the Quantity.
The support for Lagrange quadratic and linear families has been implemented so
far in the library.
The main goal of the Quantity base class is to define a physical quantity that
participates in the system of equations and to determine a flexible way to retrieve
its DoF values for performing the necessary Gauss point interpolations. The DoF
values for a Quantity can be retrieved in either of the following ways:
• with an associated equation;
• with a user provided function.
The associated equation of a Quantity is the equation to which that quantity is
an unknown. The eqn pointer is used to store this association, which however
is not mandatory. In the case where no equation is associated to the quantity,
the pointer is simply set to NULL. Then, the quantity does not correspond to
any equation unknown and it represents a given external field. In that case, the
user must provide an implementation of the FunctionDof function, in which an
arbitrary function of time and space variables can be inserted. In that case, the
degrees of freedom are not taken from an unknown vector of an equation but they
are simply evaluated with the given function. This possibility of switching the
method for retrieving the degrees of freedom of a quantity based on the content of
the eqn pointer allows the user to set up a flexible implementation of his equations,
where the involved quantities can be either given a priori or computed according to
some equation model. Numerical simulations of physical phenomena with different
modeling complexities can then be easily performed.
4.3.4
The Vect class
The Vect class is a small class that is used for performing Gauss point interpolations. The values of the degrees of freedom to be interpolated are stored in
the val dofs array. The interpolations are performed with the functions of the
EqnBase class
void
void
void
gradVect_g(const uint vbflag, Vect& myVect ) const;
funcVect_g(const uint vbflag, Vect& myVect )const;
curlVect_g(const uint vbflag, Vect& myVect ) const;
According to the function that is called, a corresponding Gauss array in the Vect
class is filled. Therefore, funcVect g fills the val g array, gradVect g is used forgrad g
and curlVect g computes the curl, that goes in the curl g3D array. We remark that
arrays whose names end with 3D are used whenever a cross-product type operation
is needed, as it happens for the computation of the curl.
4.3. Library main classes
87
The Vect class was naturally conceived to be a “Gauss point” counterpart of the
Quantity class. In fact, it contains a pointer for the quantity association. Taking
the informations from the Quantity association, the variables FEord, dim and ndof
can be filled. They hold the finite element family, the number of scalar components
and the number of volume and boundary degrees of freedom, respectively. If no
Quantity is associated, then these values must be filled independently of it.
We remark that the implementations of the Gauss interpolation functions are
such that they can perform in a unique routine the interpolation of both quadratic
and linear quantities defined either on the volume or on the boundary, for any
number of scalar components.
4.3.5
The Mesh, GeomEl and Domain classes
The Mesh class holds the data and functions to handle the domain triangulation
in two or three dimensions for the given number of multigrid levels and processors.
The most important data members of the Mesh class are:
•
•
•
•
a reference to a GeomEl object;
a pointer to a Domain object;
an array to hold the node coordinates;
an array that contains the element connectivities, for both volume and
boundary meshes, for all levels.
The GeomEl object is used to define the type of geometric element that constitutes the mesh. At present, meshes with only one type of geometric element are
supported. The support is for the quadratic types HEX27, QUAD9, TET10 and
TRI6. In the future we plan to support hybrid meshes as well, i.e. meshes with
more than one geometric element type.
The Domain object can be optionally used to hold basic information on the
domain shape in the case where the domain has a well-defined shape, such as a
box, cylinder, etc. At present, the Box class is provided with the library as a child
of the Domain class. In case the user wants to define a new domain shape, this
may be simply implemented as a child of the Domain class When the domain has
no particular shape, one simply has to pass the NULL value to the Domain pointer
in the Mesh constructor.
The arrays of the Mesh class for the node coordinates and element connectivity
are filled by reading the mesh HDF5 file generated by the gencase preprocessing
application. The connectivity and coordinates arrays are serial at present. We plan
to extend them to a parallel structure. In a domain decomposition approach, each
processor in fact only needs the mesh information for the associated subdomain.
88
Computational implementation of the optimality system
The Mesh class also provides the functions for printing the XDMF wrapper
file of the HDF5 mesh file and a function for converting the quadratic mesh element connectivity into their corresponding child linear connectivities. This last
functionality is particularly useful when the postprocessing visualization software
is not able to read the XDMF quadratic elements.
4.3.6
The GenCase class
The GenCase class is used in the gencase service application with the purpose of
preparing a general finite element application of the FEMuS library. In particular
the class is devoted to the two tasks of mesh generation and preparation of linear
algebra structures (matrices and multigrid operators). These tasks are performed
by taking into account a parallel and multigrid framework. All the necessary
structures are then generated according to a given number of multigrid levels and
a given number of processors. Clearly, a simple serial and single grid solution can
also be performed as a special case. The mesh and linear algebra structures are
all printed to files in HDF5 format that are placed in the input subdirectory of the
considered application. Then, once the application is running, they are read by
the Mesh and EqnBase classes.
Mesh generation
Mesh generation in the GenCase class starts from a coarse level and then creates
the desired number of finer levels. The coarse mesh generation can be obtained
either by using LibMesh mesh generation functions, or by reading an external mesh
file.
The LibMesh library provides some mesh generation functions for some simple
domain geometries. For instance the function MeshTools::Generation::build cube
can build a box domain of dimensions [a, b]×[c, d]×[e, f ]. Other parameters such as
nintervx, nintervy and nintervz are used to define the number of mesh subdivisions
along the x, y and z directions. These data can be retrieved from the runtime femus conf.in configuration file of each specific application (see Section 4.4). All the
other configuration parameters for the GenCase class and the gencase application
(e.g., the number of multigrid levels) can be obtained from the application-specific
file. In fact, the gencase application is not a stand-alone executable, but a utility
application at the service of each finite element simulation.
Since only few simple geometries can be obtained with the LibMesh calls, the
need arises to interact with CAD-based mesh software. At present, the FEMuS
library can read mesh files obtained with the Gambit and Salome mesh generators.
The auxiliary GambitIO and SalomeIO classes are used for parsing the respective
file formats.
89
4.3. Library main classes
PROC 3
PROC 0
PROC 3
PROC 0
PROC 2
PROC 1
PROC 2
PROC 1
Figure 4.6: The Gencase class must take into account both the subdomain and
the level subdivisions of the mesh geometrical entities (elements and nodes).
After a coarse mesh has been obtained, another LibMesh function call generates
all the mesh levels. A LibMesh MeshRefinement object takes a coarse mesh object
and refines it for the requested number of levels with the uniformly refine function.
This performs a standard midpoint refinement.
Linear algebra parallel multigrid structures
The task of preparing the linear algebra structures in a parallel and multigrid
framework has the goal of generating a mesh node numbering and an element
numbering that consider both the level and the subdomain divisions (see Figure
4.6). When performing a parallel simulation, the mesh is divided into subdomains,
i.e. separate portions of the domain, each of which is associated to one processor. A subdomain division can be equivalently referred to as a processor division.
Therefore, the possibility of identifying the geometrical mesh entities (elements
and nodes) for all levels allows each application to appropriately construct the
multigrid linear algebra structures. Within each level, these structures can then
be parallelized, due to the fact that the subdomain division is tracked at all levels
by the generated element and node numberings.
The generation of the element and node numberings consists in a reordering
90
Computational implementation of the optimality system
of the mesh element and node numberings given by the LibMesh classes. In the
LibMesh classes, the numberings are generated according to adaptive mesh refinement rules, where both coarse and fine elements coexist and are considered in a
unique array.
The element reordering performed by GenCase is as follows. To every element,
a weight value w is associated, given by
w = LEV + NLEVS × PROC ,
where LEV and PROC are the level and subdomain indices of the current LibMesh
element and NLEVS is the total number of levels. In this way, the same weight
w is associated only to the elements with equal level and equal subdomain. Then,
the nodes with w = 0 are numbered starting from 0 and increasing the index,
then nodes with w = 1 are numbered subsequently, and so on. A similar but more
complicated weighting procedure is adopted for the node reordering, due to the
fact that the additional distinction between quadratic and linear nodes must be
obtained.
With the reordered element numbering, the element connectivity per level and
subdomain can be generated. According to the newly constructed node reordering,
one can print the coordinate array and build the DoF map for all levels, subdomains and for both quadratic and linear variables. Hence, the sparsity patterns
for matrices, prolongation and restriction operators can be determined. While the
matrix entries will be filled by the application depending on the equation to be implemented, the entries of the prolongation and restriction operators can be directly
computed in the GenCase class since they only depend on geometric information.
4.3.7
The FEElemBase and FEGauss classes
The FEElemBase class is the base class for the definition of the canonical finite
elements used for the discretization of the quantities. In Figure 4.7 we report
its inheritance diagram. The class is defined based on the parameter VB. The
preprocessor variable VB is equal to 2 and it is used throughout the library to
define the range of an array index referring to both volume and boundary data.
Index 0 is related to volume and index 1 is used for the boundary. Therefore, the
ndof[VB] array holds the number of degrees of freedom for the element and for
its corresponding boundary element of the same order (for instance, the boundary
element of a QUAD9 or TRI6 finite element is EDGE3 in both cases; the boundary
element of TET10 is TRI6). The name[VB] string array holds a string with the
name that identifies the volume and boundary elements.
Depending on the space dimension, geometric element shape and finite element order, a different child class of FEElemBase must be instantiated, among
91
4.3. Library main classes
FETri3
FEHex27
FETri6
FETet4
FEElemBase
FEHex8
FEQuad9
FETet10
FEQuad4
Figure 4.7: Inheritance diagram for the FEElemBase class.
those shown in Figure 4.7. In order to achieve this choice the static build member function has been defined. Being static, this member function is not related
to a specific FEElemBase instantiation. This function simply consists of switch
constructs. Based on three indices for the space dimension (2 or 3), the geometric
element shape (triangular/tetrahedral or quadrilateral/hexahedral) and the finite
element order (quadratic or linear), a pointer for an instantiation of the desired
child finite element is returned. Since the return type of the function is actually
a pointer to a father class (FEElemBase*), pure virtual functions are required
in order to retrieve child specific data from a father interface. In particular, the
get embedding matrix function of the FEElemBase class is used for computing
multigrid operators, while get prol is defined for printing linear elements over a
quadratic mesh.
The FEGauss class holds the values of the shape functions and derivatives at
the Gauss points for the considered finite element. This class basically reads the
data contained in the files in the fem directory of the library.
92
4.3.8
Computational implementation of the optimality system
The RunTimeMap class
The purpose of the RunTimeMap class is to provide a class with the possibility of
run-time configuration. In order to do that, one should simply add a RunTimeMap
object as a data member of the class that requires runtime configuration. This can
be very useful as it can allow one to vary some parameters without recompiling
neither the library nor the specific application executable.
Let us explain how runtime configuration is obtained. Every specific application
of the library has a runtime configuration file called femus conf.in in its config
subdirectory (see Section 4.4). This file can contain several groups of parameters.
Each parameter is defined by a name and a value and each group is associated to
a specific class. In order to express this association, the group is enclosed within
begin and end tags similar to the XML language syntax.
The RunTimeMap constructor receives a string that corresponds to the name
of the begin and end tags (e.g. <Class1> and </Class1> ) enclosing the group of
parameters of interest for the considered class. These parameters are expressed by
a name and a value separated by spaces. It is generally convenient to define the tag
name to be equal to the corresponding class name. When the RunTimeMap object
of the class invokes the read function, all the parameters within the corresponding
tags are parsed. The C++ datatype for the values must be chosen at compile
time for each class. In fact, RunTimeMap is a class template whose template
parameter is the datatype for the values. Typical instantiations are with primitive data types ( RunTimeMap<double> or RunTimeMap<int>) or with STL
types (RunTimeMap<std::string>). If a class needs to be configured with parameters of different types, it can simply be endowed with a RunTimeMap template
instantiation for each type, provided that the tag names are distinct.
4.3.9
The Physics class
This class is intended as an interface provided to the EquationsMap class for the
definition of the physical parameters that are shared by the set of equations to be
solved. The user must provide an implementation of a child of this class, in which
the specific physical data are defined.
For instance, the child class defined by the user can be useful for holding constant physical parameters or for setting common reference values to be used for the
nondimensionalization of the equations. In this way one performs the computation
of the nondimensional numbers (such as Reynolds, magnetic Reynolds, Hartmann
numbers) in a unique place, avoiding multiple computations of the same quantity
in various points of the code. In this way the likelihood of implementation errors is reduced. The required physical parameters can be easily provided in the
femus conf.in file and be read at runtime (see Section 4.4).
4.4. Multiphysics application structure
4.3.10
93
The Utils and Files classes
The Utils class is passed to the constructors of all the fundamental classes of the
library. In fact, it contains a RunTimeMap object to hold parameters that are
not specifically related to one class but are shared among various classes. Also,
it provides a set of useful functions for HDF reading and printing as well as basic
mathematical operations (dot product, cross product, vector normalization, etc.)
The Files class contains a RunTimeMap object instantiated with std::string
datatype for the configuration of the file names and file paths related to the FEMuS library. These strings are read in the femus conf.in file within the <Files>
and </Files> tags. For instance, the variable denoted with F MESH READ corresponds to the name of the external mesh file to be used in case of external mesh
generation. Also, one can set the names of the input mesh files, output solution
files or log files. The Files class also gathers the functions that are used for I/O
service purposes, such as file copy, stream redirection to file or directory name
checking.
4.4
Multiphysics application structure
In this Section we illustrate the general structure of a multiphysics application
of the FEMuS library. The optimality system studied in this work has been implemented within this framework. Then, we describe all the required steps for
performing a simulation, from the configuration to the final run. We also discuss
the implementation of the main function for an application and the matrix and
right-hand side assembly for an equation.
4.4.1
Basic structure
Every application can be implemented in a subfolder of the applications directory. The minimal template structure of an application, as seen in Figure 4.8, is
composed of
• the four folders config, lib, input and output;
• a source file with a main() function (e.g., main.C);
• a Makefile for the application.
The lib, input and output of a newly generated application are initially empty.
They will be filled during the various steps needed to perform the finite element
simulation. The config directory instead contains the required configuration files
that we will describe later. The Makefile may be easily defined by taking a Makefile
of another application as a template and by modifying it according to the specific
application.
94
Computational implementation of the optimality system
app1/
FemusBase conf.h
config/
FemusClasses conf.h
input/
FemusExtLib conf.h
output/
femus conf.in
lib/
[mesh.{neu,med}]
main.C
Makefile
Figure 4.8: Basic structure of the files of a multiphysics application.
The steps required for the implementation of a generic finite element application
can be identified with its subdirectories. Therefore, we can consider the following
stages:
•
•
•
•
Configuration (config directory);
Library compilation (lib directory);
Run preparation (input directory);
Simulation (output directory).
Let us now illustrate these single steps in conjunction with a description of the
files related to each subdirectory.
Configuration
The config directory contains the files for the configuration of the FEMuS library.
The configuration files constitute the interface through which the classes are tailored to the user needs. The user only has to modify these files in order to get the
required library setup. Two kinds of configuration can be distinguished:
• compile-time configuration;
• run-time configuration.
Compile-time configuration consists in setting various preprocessor directives as
defined by the library. These preprocessor directives (mostly of the #define type)
affect the compilation of the library and the application executable so that the
library fits the requirements of the current simulation. For a better understanding
the directives are grouped within the following header files:
95
4.4. Multiphysics application structure
• FemusBase conf.h;
• FemusClasses conf.h;
• FemusExtLib conf.h.
The FemusBase conf.h file contains some basic macros for the library configuration;
for instance one can set there the space dimension of the simulation (dimensions 2
and 3 are supported). The compile-time variables that are associated to a single library class are set in the FemusClasses conf.h header file. The FemusExtLib conf.h
file contains the macros related to the activation of the function calls of the required external libraries (e.g. PETSc, MPI). Some examples of these preprocessor
directives and their meanings are reported in Table 4.1.
Directive
#define DIMENSION
#define DIMENSION
#define BDRY DIM
#define LSOLVER
#define LSOLVER
#define HAVE MPI
#define PRINT INFO
Value
2
3
DIMENSION-1
LASPACK
PETSC
1
1
Description
2D simulation
3D simulation
Boundary dimension
Laspack serial solver
PETSc parallel solver
Enable MPI calls
Enable log info printing
Table 4.1: Some options in the configuration header files.
All the library classes endowed with a RunTimeMap object can be configured
at run-time (for a description of the RunTimeMap class, see Section 4.3.8). Runtime configuration can be adopted whenever the informations to be passed to the
application do not need a library recompilation. The femus conf.in file is split
into parts, delimited by XML-like begin and end tags. Each part is devoted to
the runtime parameters of a specific RunTimeMap instantiation. As it happens
for library classes, user-defined classes for the current application can also be
endowed with a RunTimeMap object and their parameters be defined similarly in
the femus conf.in file.
We observe that runtime configuration is one of the various file input/output
(I/O) operations performed by the FEMuS functions. While very useful, the occurrence of I/O operations should be considered carefully as it may in principle
deteriorate code performance. The FEMuS classes are conceived in such a way
that run-time configuration occurs once and for all at class construction. The
configuration parameters are then loaded in memory and they are deleted only at
class destruction. The meaning of each parameter and the values it may assume
are described in the class specific documentation. Table 4.2 gives a brief description of the most important parameters. We remark that the use of an XML-like
96
Computational implementation of the optimality system
structure for the femus conf.in file can turn out to be useful for an association
of the configuration file with a Graphic User Interface (GUI). This could allow a
more user-friendly way of setting parameters in case of several classes.
Parameter
value (ex.)
description
1
1
use LibMesh mesh generator
generate multigrid operators files
dt
itime
nsteps
printstep
restart
0.01
0.
100
5
0
time step increment
initial time value
number of time steps to be run
printing step interval
restart step index
lxb
lxe
nintervx
0
1.
20
box x begin coordinate
box x end coordinate
number of x coarse subdivisions
nolevels
mesh ord
geomel type
4
0
0
number of levels
quadratic mesh order
hexahedral mesh element
mymesh.neu
sol
run log.txt
external mesh file
output solution filename prefix
simulation log filename
1
1
1
1.
1.
1.
1.
0.
0.
0
1.e-6
1.e+6
6.e-3
1.e3
reference velocity
reference length
reference temperature
density
viscosity
thermal conductivity
heat capacity
compressibility factor
heat density power
x gravity
magnetic permeability
electrical conductivity
reference magnetic field
control penalty value
libmesh gen
mgops gen
F MESH READ
BASESOL
RUN LOG
Uref
Lref
Tref
rho0
mu0
kappa0
cp0
komp0
qheat
dirgx
mumhd
sigmhd
Bref
alphaVel
Table 4.2: Some configuration parameters in the femus conf.in file.
4.4. Multiphysics application structure
97
The config directory is also devoted to hold a mesh file generated from an external mesh generator (e.g. Gambit). The gencase utility application can parse this
file through the GambitIO class and print the necessary input mesh and multigrid
files in the input directory of the current application. When the external mesh file
is needed, the libmesh gen parameter within the < Gencase > tags must be set to
0. Also, care must be taken in setting some parameters in the femus conf.in file
consistently with respect to the external mesh file. For instance, the mesh order
given by mesh ord must be consistent with the external file, as well as the box
dimensions lxb, lxe, lyb, lye, lzb and lze in case of box-shaped mesh.
Library compilation
Once the configuration header files are set according to the user needs, the FEMuS
library can be compiled. This allows the user to have a version of the library that is
tailored and optimized for the specific application (for instance, unneeded function
calls can be excluded).
In order to compile the library one has to type the command “make libfemus” from the directory of the application. As a result, a shared library file
named libfemus.so is generated. A different file is generated in a separate subdirectory for the chosen compiling mode, which is determined by the value of the
FM FEMUS METHOD environment variable (see Section 4.2.2). Once the library
is compiled, the application executable and the utility gencase executable can be
compiled as well. Both of them will be linked against the generated library file.
In the future, we plan to have a unique compilation of the library and to
convert compile time resolutions (such as setting the space dimension) into run
time resolutions through template programming.
Run preparation
The goal of the input directory is to contain the mesh and multigrid files generated
by the gencase utility for the current application.
Once the configuration files in the config directory are set and the FEMuS
library is generated, the gencase application can be compiled by entering the gencase subdirectory under the applications library directory and then typing the
make command. The executable is generated for the chosen compiling mode (e.g.
gencase-opt or gencase-dbg). Depending on the number of processors N chosen
for the related application, the executable can be launched with “mpiexec -n N
gencase-dbg/opt”. After this execution, the input directory of the considered application is filled with the following generated files:
• mesh.h5, that contains information on the grid;
98
Computational implementation of the optimality system
• Matrix(l).h5 (one file for each level (l)), that contain the sparsity pattern for
the system matrix on level (l);
• Prol(l-1) (l).h5 (one file for each level pair (l-1)-(l)), where the prolongation
operator sparsity patterns and entries from level (l-1) to level (l) are stored;
• Rest(l) (l-1).h5 (one file for each level pair (l)-(l-1)), that contain the restriction operator sparsity patterns and entries from level (l) to level (l-1);
• multimesh.xmf, for a graphical visualization of the volume and boundary
meshes at all levels as contained in the mesh.h5 file.
See Section 3.2 for a description of the finite element multigrid algorithm and
related operators.
The gencase program can be seen as a preprocessing stage for every finite
element application that must performed with the FEMuS library. Its purpose is
to prepare a general parallel and multigrid simulation. To this aim, the gencase
application makes use of the advanced classes and tools provided by the LibMesh
library. The program collects all the informations and data related to the mesh and
multigrid operators from the FEMuS configuration files and prints the previously
given list of files. The hierarchical data structure of the generated HDF5 files
allows to define a general and modular interface for the FEMuS library classes.
Regardless of the way the mesh is generated (LibMesh function calls or external
mesher), a mesh HDF5 file is produced whose fields are read in the same way in
each FEMuS finite element application. These fields fully characterize the mesh
features (connectivity, node maps, etc.) that are needed for the final simulation.
It is recommended that both the compile time and the run time configuration
files, as well as the number of processors provided at command line (which is
another type of run time configuration), are not modified before compiling and
launching the corresponding finite element simulation. While the change of some
parameters (such as physical non-geometrical properties) may not influence the
gencase execution, a modification of other values (e.g., the number of processors
or the number of levels) would necessarily require the gencase program to be run
a second time. A change in the header files would even require to restart from the
recompilation of the FEMuS library.
Simulation
Once the previous steps are concluded (namely, configuration, library compilation
and run preparation with gencase), the executable for the finite element simulation
can be generated and run. Its compilation can be done by simply typing make
from the shell terminal in the current application directory. Then the executable
4.4. Multiphysics application structure
99
(e.g. main-opt) can be run with the same number of processors N as the previous
gencase preparation run, with the command “mpiexec -n N main-opt”.
It is recommended that the FEMuS library and related executables be run in
debug mode during the development stages, while the optimized mode should be
used for production runs. The output files of an application run are printed in a
subfolder of the output application directory. Each run is generated in a separate
subfolder. In order to distinguish them in an unambiguous manner, the format
of the run folder name is YYYY-MM-DD hh-mm-ss, which corresponds to the
instant of time (YYYY standing for the year, MM for the month, DD for the day,
hh for the hour, mm for the minute and ss for the second) when the executable
was launched (e.g., 2012-02-24 12-11-32).
For every solution step ( the solution step being a time step, a nonlinear step or
some general algorithmic step) the fields with the values computed by the program
are printed in HDF5 files. For a solution step index M, a file sol.M.h5 is printed.
Each of these files has a corresponding XDMF file that defines the association
between the fields and the corresponding mesh file for visualization. Other library
routines can be called in order to print boundary and initial conditions, a log of
the program execution or other informations. All these files are printed in the
output directory of the specific run. Also, the mesh input files are automatically
copied into the corresponding output directory, so that all the I/O files related to
a given run are gathered in a unique folder and can be moved anywhere and still
be readable.
An interesting restart feature is also available with the FEMuS library. In order
to restart a simulation from the solution step M (sol.M.h5 file) contained in the
YYYY-MM-DD hh-mm-ss folder, simply do as follows:
• create an empty text file with name run to restart from in the output directory and write the name YYYY-MM-DD hh-mm-ss of the previous run
directory into it;
• set the restart parameter to M in the femus conf.in file.
The subsequent run creates a new run folder; the initial condition arrays are not
initialized with the initial condition ic read function (see Section 4.3.2), but they
are filled with the field values contained in the sol.M.h5 file of the previous run.
While some configuration parameters may be modified without creating inconsistent simulation results, it is recommended that the configuration parameters
remain unchanged, especially the number of levels and the number of processors.
It is then clear that the gencase program need not be run a second time in case of
restart.
100
4.4.2
Computational implementation of the optimality system
Main function
Here we describe the most important phases for implementing the main function
of a generic finite element simulation within the framework of the FEMuS library.
The main steps are: FEMuS library setup, preparation of an EquationsMap object
and solution of the equation system.
The FEMuS library setup basically consists in the initialization of the parallel libraries; other setup tasks may be performed, such as command line parsing, file
path setting, directory checking, standard output redirection to file, etc. Each of
these operations can be performed with specific library calls.
The preparation of an EquationsMap object is at the heart of each finite element
simulation. In this step all the necessary classes for the construction of an EquationsMap object must be instantiated. The largest part of user code development
for the specific application consists in implementing the necessary classes to complete this stage. Based on the scheme of Figure 4.3 in Section 4.3.1, the following
substeps can be identified:
• Utils instantiation and parameter reading;
• Mesh initialization in terms of a GeomEl object and an optional Domain
child object (e.g. Box);
• instantiation of an implemented Physics class;
• TimeLoop instantiation for time discretization;
• FEMap instantiation for space discretization and addition of the required
finite element families;
• QuantityMap initialization and addition of quantities;
• EquationsMap initialization and addition of equations;
• possible association of equations to quantities.
The mandatory implementations the user must provide are: a Physics child
class, one or more Quantity and one or more EqnBase child classes. The characterization of the other classes does not require any code implementation by the
user, but it simply takes place by setting the corresponding parameters in the configuration files. Wherever possible, such as for the implementation of a Domain
child object, the user can provide new classes. It is a good development practice
to design classes that not only fit a specific application, but also may be eligible
4.4. Multiphysics application structure
101
for expanding the overall FEMuS library. The library is in fact conceived to provide base functionalities (father class level); each application is characterized by
peculiar implementations (child class level).
Once all the basic ingredients are available, the EquationsMap object is constructed. Then, we need to instantiate the implemented quantities and equations
and add them to the respective maps. In fact, the maps are supposed to be containers for all the involved physical quantities and equations in the application (see
Sections 4.3.1 and 4.3.3). In particular, two general types of physical quantities
for the quantity map can be distinguished: unknowns (which can be defined as
unknown quantities); and provided functions (external quantities) of time, space
or other variables. The distinction between the two basically consists in how their
degrees of freedom are available in the system. In the first case they are computed
by the solution of an equation, while in the second one they are provided explicitly
by some user function.
Let us consider an example concerning the Navier-Stokes equations with a
given magnetic field. The unknown quantities are clearly velocity and pressure,
while the magnetic field is an external quantity. The equation constructor needs
the definition of a vector of the unknown quantities (see Section 4.3.2). So, a
vector for velocity and pressure is created and passed to the equation constructor.
Clearly, the quantity associated to the external magnetic field does not belong to
this vector. Once the equation is instantiated, it can be added to the equation
map and be associated to each unknown quantity.
When the equation and quantity maps are filled, the DoF map of each equation
can be prepared, together with the related multigrid operators, boundary and
initial conditions. All the linear systems are ready for the solution. The user can
implement a function that receives the EquationsMap object and calls the involved
equations in the required order and with all the peculiar algorithmic procedures
for different convergence criteria, update sequences, etc. This function performs
the solution of the multiphysics problem.
The optimality system implemented in this thesis may be considered as an
example of application of the FEMuS library. The equations and quantities implemented for the optimality system are schematically represented in Figure 4.9.
The state, adjoint and control unknown quantities are defined, together with external quantities such as the desired velocity for the cost functional. The equations
of the optimality system are implemented in the classes:
• EqnNS, for the Navier-Stokes equations, whose unknowns are given by velocity (Velocity class) and pressure (Pressure);
• EqnMHD, for the MHD equations, whose unknowns are the homogeneous
magnetic field (MagnFieldHom) and the Lagrange multiplier associated to
the divergence-free constraint (MagnFieldHomLagMult);
102
Computational implementation of the optimality system
• EqnNSAD for the adjoint Navier-Stokes equations, the unknowns being the
adjoint velocity (VelocityAdj) and adjoint pressure (PressureAdj);
• EqnMHDAD, for the adjoint MHD equations, whose unknowns are the adjoint homogeneous magnetic field (MagnFieldHomAdj) and the adjoint associated Lagrange multiplier (MagnFieldHomLagMultAdj);
• EqnMHDCONT, for the control equation, the unknowns being the lifting
function of the magnetic field boundary conditions (MagnFieldLift) and its
divergence-free constraint Lagrange multiplier (MagnFieldLiftLagMult).
4.4.3
Equation implementation
The implementation of the equation classes for an application is the part in the
user code development that requires greatest attention. The routines that must be
implemented in this class typically concern: boundary conditions, initial conditions
and assembly of the linear system.
The implementation of the boundary and initial conditions was already illustrated in Section 4.3.2. Here, we describe the assembly of the matrix and
right-hand side. A similar procedure is used for the assembly of all the equations
involved in the optimality system.
The assembly routine of an equation receives two input parameters vb and Level.
In fact it performs the assembly of both the volume (vb= 0) and the boundary
(vb= 1) integrals involved in the weak form of the equation, for the multigrid level
Level. The subdomain dependency is passed to the routine from a variable in the
equation class through the implicit this class pointer in the function interface.
The assembly of an equation consists in the following steps:
•
•
•
•
definition of the involved Vect quantities;
element loop for the given level and subdomain;
Gauss points loop for the current element;
DoF loop for shape and test functions.
First of all, a definition of the involved Vect objects is in order. As discussed
in Section 4.3.4, these objects are the Gauss point counterparts of the quantity
objects. We can distinguish between internal and external Vect instantiations: the
internal objects are associated to the equation unknowns, while the external objects correspond to other quantities, whose degrees of freedom are either provided
by function or computed in another equation. The Vect objects associated to the
unknowns of the equation hold the DoF and gauss values of the previous iteration
step (clearly, the current DoF values still have to be computed).
The quantity pointer for a Vect object is taken from the vector of unknown
quantities of the equation (see Section 4.3.2). Through that pointer the informa-
103
4.4. Multiphysics application structure
EqnNSAD
EqnMHDAD
EqnMHD
EqnMHDCONT
Equations
EqnNS
Velocity
optsys
Pressure
MagnFieldHom
Quantities
DesVelocity
MagnFieldLift
MagnFieldHomAdj
VelocityAdj
PressureAdj
Figure 4.9: The equations and quantities for the optimality system (some quantities are not reported here for the sake of conciseness).
104
Computational implementation of the optimality system
tions to allocate the Vect arrays can be obtained. These arrays must be deallocated
at the end of the assembly routine.
Once all the Vect arrays are allocated, the element loop is performed. For
each element in the current level and subdomain, one must retrieve the relevant
geometric informations from the mesh such as connectivity and node coordinates
and then the DoFs for the involved quantities. The information related to the
element degrees of freedom for both the internal and the external Vect objects
must be obtained. With the call the function get el dofs bc ic one can get the DoF
indices, DoF boundary condition flags and DoF old values for the internal quantities. For the external quantities two ways of obtaining the DoF’s of a Vect object
are possible: either from the associated equation or from a predefined function.
After all the element DoFs are collected, the loop over the element Gauss points
can be performed. First, one has to retrieve the values of all the shape functions,
canonical derivatives, Jacobian transformation and derivatives in physical space for
the given Gauss point. As it happens with mixed equations like for the optimality
system, both quadratic and linear finite element functions are needed. Gauss point
interpolations can be done by using the functions described in Section 4.3.4. For
instance, to obtain the old velocity value and old velocity gradient components at
the current Gauss point, one can call the funcVect g and gradVect g functions; the
magnetic field values and its curl, needed for the Lorentz force, can be computed
by funcVect g and curlVect g.
Finally, the element matrix and right hand side can be filled with the operators
that characterize the equation (Laplacian, advection, etc.) computed at the Gauss
points. We remark that the row matrix indices of the element matrix correspond
to the test functions, while the column indices are associated to the shape functions
of the unknowns. A boundary condition array is used as a row flag for the nodal
implementation of the Dirichlet boundary conditions (see Section 4.3.2). In case of
a Dirichlet boundary node, only the matrix diagonal and the element right hand
side are set to a nonzero value, according to the Dirichlet value to be enforced.
The contributions of the element matrix KeM and right-hand side FeM are
added to the global counterparts A and b of the current level by using for each
multigrid level the corresponding add matrix and add vector functions. An analogous procedure holds for the boundary element assembly loop (vb= 1), which is
devoted to the enforcement of boundary integrals for Neumann boundary conditions.
We finally observe that all the equation terms must be implemented in nondimensional form on a nondimensional domain. The library takes care of multiplying
by the reference values (given in the configuration femus conf.in file) for printing
the physical results.
Chapter 5
Numerical results
In this chapter we show the results of two and three-dimensional numerical solutions of the optimality system considered in this thesis. In Section 5.1 we describe a
simple verification test for a correct implementation of the lifting function method
for enforcing boundary conditions. The results of a two-dimensional solution of
the optimality system are reported in Section 5.2. In Section 5.3 we illustrate the
computations for three-dimensional optimal control cases.
5.1
Code verification test for the lifting function
This simple code verification test is performed to verify the correctness of the
implementation of the lifting function method for enforcing the magnetic field
boundary conditions. In particular we intend to verify that, for given values of
the Dirichlet boundary conditions, different lifting functions of these values yield
the same solution in terms of the flow state variables, provided that the lifting
functions are divergence-free. Therefore, the divergence-free constraint must be
necessarily enforced on the lifting function to guarantee that the same solution
for given boundary values is obtained, regardless of the particular lifting function
chosen. Note that in this test we are not solving for the whole optimality system,
where the lifting function of the magnetic field boundary conditions is the unknown
control variable that is computed by the optimization algorithm. Here we simply
consider to give a lifting function as a datum for the state equations.
In order to perform this test we refer to the well-known MHD Hartmann flow
as a basic configuration [10]. This represents the steady and fully developed flow
of an electrically conductive fluid between two parallel plates in the presence of an
external magnetic field orthogonal to them. It is known to be one of the few cases
for which an analytical solution to the Navier-Stokes and MHD equations (2.1) can
be determined. Let us consider a two-dimensional infinite channel simulated by a
106
Numerical results
u×n=0
p = p0
b×n=0
σ=0
y
x
u×n=0
u·n=0
u×n=0
u·n=0
b×n=0
b·n=0
b×n=0
b·n=0
u×n=0
p = p1
y
b×n=0
σ=0
x
Figure 5.1: Lifting function verification test. Domain and boundary conditions for
the Hartmann flow.
square computational domain [0, 1] × [0, 1] as in Figure 5.1. Let Γw be the union
of the left and right sides of the square which correspond to the wall plates. We
denote as Γf the union of the bottom and top sides which correspond to the inlet
and outlet sections of the channel. On Γw we specify no slip boundary conditions
u = 0 for the velocity field and B · n = B0x , B · τ = 0 for the magnetic field,
where B0x is a constant and the normal and tangential unit vectors at the boundary
are denoted as n and τ , respectively. On Γf we assume a vanishing tangential
velocity, ux = 0, and uniform pressure on each side, with p1 on the bottom face
and p0 on the top one, so that the pressure drop along the flow is P = p1 − p0 > 0.
Since ux is uniformly zero along the inlet and outlet sections, then on Γf one has
∂ux /∂x = 0 and hence ∂uy /∂y = 0 from the divergence-free constraint. Therefore,
the longitudinal velocity has a vanishing normal derivative at the inlet and outlet
sections. In a similar way we set σ = 0 and B · τ = B0x uniformly on the bottom
and top of the domain, which implies again ∂Bx /∂x = 0 and ∂By /∂y = 0 on Γf .
The total magnetic field B can be split as the sum of two contributions B =
b+B e , where B e is a divergence-free lifting function that extends the magnetic field
Dirichlet boundary conditions. Hence, one can write the magnetic field equation
107
5.1. Code verification test for the lifting function
0.150
A
B
C
0.100
0.100
0.050
0.050
by
bx
0.150
0.000
0.000
-0.050
-0.050
-0.100
-0.100
-0.150
A
B
C
-0.150
0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
y
0.8
0.150
A
B
C
2.100
0.100
2.050
0.050
Bey
Bex
0.6
1
x
2.150
2.000
0.000
1.950
-0.050
1.900
-0.100
1.850
A
B
C
-0.150
0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
y
0.6
0.8
1
x
2.020
0.015
A
B
C
A
B
C
2.015
0.010
2.010
0.005
Bty
Btx
2.005
2.000
0.000
1.995
-0.005
1.990
-0.010
1.985
1.980
-0.015
0
0.2
0.4
0.6
y
0.8
1
0
0.2
0.4
0.6
0.8
1
x
Figure 5.2: Lifting function verification test. The magnetic fields bx , Bex , Bx along
the line x = 0.5 (left column) and the magnetic fields bx , Bex , By along the line
y = 0.5 (right column) for K1 = 0 (A), 1 (B), 10 (C) with divergence-free magnetic
field lifting functions.
108
Numerical results
1.000
0.120
A
B
C
A
B
C
0.100
0.500
0.000
v
u
0.080
0.060
0.040
-0.500
0.020
-1.000
0.000
0
0.2
0.4
0.6
0.8
1
0
0.2
x
0.4
0.6
0.8
1
x
Figure 5.3: Lifting function verification test. The velocity components ux (left) and
uy (right) along the line y = 0.5 for K1 = 0 (A), 1 (B), 10 (C) with divergence-free
magnetic field lifting functions.
from (2.1) as
1
∇ × ∇ × b − ∇ × (u × b) + ∇σ =
Rem
1
∇ × (u × B e ) −
∇ × ∇ × Be ,
Rem
∇ · b = −∇ · B e = 0 ,
(5.1)
together with the boundary conditions
b · τ = 0 B e · τ = 0 on Γw ,
b · n = 0 B e · n = B0x on Γw ,
b · τ = 0 B e · τ = B0x on Γf ,
σ = 0 on Γf .
(5.2)
For any given function B e and any velocity field u, we can solve for (5.1) with the
boundary conditions given by (5.2) and obtain b = (bx , by ). Among all the possible
choices of divergence-free lifting functions, if we choose the function B e = (B0x , 0),
which is constant over the domain Ω, it is possible to find the analytical solution
of the Hartmann flow for the velocity and magnetic fields.
Following the definitions of reference and nondimensional values given in Section 2.2, we choose B0x as the reference value for p
the magnetic field, so that the
nondimensional Hartmann number is Hm = B0x L σc /µ. Due to the hypotheses
assumed for the Hartmann flow, we have that the pressure drop P is a constant;
we denote its nondimensional value as P ∗ = (P L)/(ρU 2 ).
From the Navier-Stokes and MHD equations (2.1) one obtains the following
equations for the nondimensional longitudinal velocity uy and nondimensional lon-
109
5.1. Code verification test for the lifting function
0.020
A
B
C
0.020
A
B
C
0.015
0.010
-0.040
0.005
-0.060
by
bx
0.000
-0.020
0.000
-0.080
-0.005
-0.100
-0.010
-0.120
-0.015
-0.140
-0.160
-0.020
0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
x
0.6
0.8
1
x
2.700
1.000
A
B
C
A
B
C
2.600
2.500
0.500
Bey
Bex
2.400
2.300
0.000
2.200
2.100
-0.500
2.000
1.900
-1.000
0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
x
2.700
0.8
0.020
A
B
C
2.600
0.015
2.500
0.010
2.400
0.005
Bty
Btx
0.6
1
x
2.300
0.000
2.200
-0.005
2.100
-0.010
2.000
-0.015
1.900
A
B
C
-0.020
0
0.2
0.4
0.6
x
0.8
1
0
0.2
0.4
0.6
0.8
1
x
Figure 5.4: Lifting function verification test. The x-components bx , Bex , Bx (left
column) and the y-components by , Bey , By (right column) along the line y = 0.5
for K2 = 0 (A), 1 (B) and 10 (C) with non divergence-free magnetic field lifting
functions.
110
Numerical results
0.120
0.600
A
B
C
A
B
C
0.500
0.100
0.400
0.080
p
v
0.300
0.060
0.200
0.100
0.040
0.000
0.020
-0.100
0.000
-0.200
0
0.2
0.4
0.6
0.8
1
0
0.2
x
0.4
0.6
0.8
1
x
Figure 5.5: Lifting function verification test. The y-component uy of the velocity
field (left) and the pressure p (right) along the line y = 0.5 for K2 = 0 (A), 1 (B)
and 10 (C) with non divergence-free magnetic field lifting functions.
gitudinal magnetic field by [10]:
d2 uy
2
− Hm
uy = −P ∗ ReHm coth Hm ,
dx2
dby
Re
= Rem (P ∗ 2 (Hm coth Hm − 1) − uy ) ,
dx
Hm
(5.3)
(5.4)
with boundary conditions as stated above. We remark that, thanks to the Hartmann flow assumptions, the original nonlinearities in the flow equations have been
removed. The solutions read
Re cosh(Hm ) − cosh(Hm x)
,
Hm
sinh(Hm )
Re sinh(Hm x) − x sinh(Hm )
.
by (x) = P ∗ Rem 2
Hm
sinh(Hm )
uy (x) = P ∗
(5.5)
(5.6)
We observe that the choice of the constant lifting function B e = (B0x , 0) results
in a special case in which B e and b are orthogonal to each other.
For any choice of B e satisfying the same boundary conditions, the MHD equations yield the same solution, provided that the lifting function is divergence-free.
With the purpose of verifying this condition we numerically solve the state MHD
equations for two different cases: a divergence-free and a non divergence-free lifting
function.
Let us first consider the case of divergence-free lifting functions. Since we
have a two-dimensional domain, a divergence-free function can be derived from a
potential φ(x, y). For instance, let us consider
φ(x, y) = K1 [x(x − 1)]2 [y(y − 1)]2
(5.7)
111
5.2. Two-dimensional optimal control case
and choose the lifting function as
Bex = B0x +
Bey = −
∂φ
= B0x + K1 2y(y − 1)(2y − 1)[x(x − 1)]2 ,
∂y
∂φ
= −K1 2x(x − 1)(2x − 1)[y(y − 1)]2 .
∂x
(5.8)
(5.9)
In Figure 5.2 the magnetic fields Bex , bx and Bx along the line x = 0.5 and the
magnetic fields Bey , by and By along the line y = 0.5 for the three cases K1 = 0
(A), 1 (B), 10 (C) and with B0x = 2 in (5.8) and (5.9) are shown on the left and
right columns, respectively. It can be seen that for all these cases the magnetic
field given by the sum b + B e is the same. Also, the velocity components ux
and uy remain the same for the three cases, as shown in Figure 5.3. Therefore,
the solution of the MHD equations is independent of the choice of a particular
divergence-free lifting function of the same boundary conditions. Now we consider
a non divergence-free lifting function. We plot the results for
Bex = B0x + K2 x(1 − x)y(1 − y) ,
Bey = 0 .
(5.10)
In Figure 5.4 the x and y components of the magnetic field B and its contributions
b and B e are shown along the line y = 0.5 for K2 = 0 (A), 1 (B) and 10 (C) and
with B0x = 2 in (5.10). We see that the components of the magnetic field B
do depend on the choice of the lifting function B e . Since the divergence of the
lifting B e is not zero, the total resulting magnetic field is different for each case.
Therefore, the velocity component uy and the pressure p change as well, as shown
in Figure 5.5.
5.2
Two-dimensional optimal control case
In this section we report the results about the numerical solution of the optimality system derived in Chapter 2 and discretized in Chapter 3 for a twodimensional case. The obtained numerical solution is a candidate solution for
the optimal control problem. Let us consider a two-dimensional square channel
Ω = [0, 1] × [0, 1], discretized by quadrilateral elements. The values for the fluid
density, dynamic viscosity, electrical conductivity and magnetic permeability are
taken as ρ = 103 kg/m3 , µ = 1 Pa s, σc = 106 S/m and µ0 = 10−6 H/m, respectively. The reference values for the length, velocity and magnetic field are L = 1 m,
U = 1 m/s and B = 10−3 T, so that we have Re = 103 , Rem = 1 and Hm = 1.
From now on and unless otherwise stated, we refer to nondimensional quantities.
The boundary conditions we consider are intended to reproduce a channel flow
112
Numerical results
Ω1
u×n=0
p = p0
ud = (0, 0.075)
y
Ω
u×n=0
u·n=0
u×n=0
u·n=0
b×n=0
b·n=0
b×n=0
b·n=0
u×n=0
p = p1
y
x
b×n=0
b·n=0
x
b×n=0
b·n=0
Figure 5.6: Two-dimensional optimal control case. Computational domain Ω with
target velocity region Ω1 (left) and boundary conditions for the state variables of
the optimality system (right).
λ×n=0
π1 = 0
ξ×n=0
ξ·n=0
λ×n=0
λ·n=0
λ×n=0
λ·n=0
ξ×n=0
ξ·n=0
ξ×n=0
ξ·n=0
λ×n=0
π1 = 0
y
x
ξ×n=0
ξ·n=0
B e × n control
B e · n control
B e · n = B̄ex
B e · n = B̄ex
B e × n = B̄ey
B e × n = B̄ey
B e · n = B̄ex
y
B e × n = B̄ey
x
Figure 5.7: Two-dimensional optimal control case. Boundary conditions for the
adjoint variables (left) and the control variable (right) of the optimality system.
113
5.2. Two-dimensional optimal control case
·10−3
0.25
2
ux
·10−2
8
6
uy 4
0
p
2
−2
0.2
0.15
0
0
0.2 0.4 0.6 0.8
1
0
0.2 0.4 0.6 0.8
1
0
0.2 0.4 0.6 0.8
1
0
0.2 0.4 0.6 0.8
1
0
0.2 0.4 0.6 0.8
1
0
0.2 0.4 0.6 0.8
1
0
0.2 0.4 0.6 0.8
1
0
0.2
λx
0
π1
λy −0.1
0
−5
−0.2
−0.2
0
0.2 0.4 0.6 0.8
·10−3
1
0
2
0.2 0.4 0.6 0.8
·10−4
1
2
by
bx 1
0.5
σ
0
−0.5
−2
0
0
0.2 0.4 0.6 0.8
·10−2
1
0
0
0.2 0.4 0.6 0.8
·10−3
1
0.5
5
2
ξy
ξx 1
0
π2
0
−5
0
0.2 0.4 0.6 0.8
1
−0.5
0
0.2 0.4 0.6 0.8
·10−2
1
0.4
2
2.04
Bey
Bex 2.02
0.2
π3
0
0
0.2 0.4 0.6 0.8
1
0
−0.2
−2
2
0
0
0.2 0.4 0.6 0.8
1
−0.4
Figure 5.8: Two-dimensional optimal control case. State, adjoint and control
variables of the optimality system along the line y = 0.95 with B̄ e = (2, 0) and
α = 105 .
114
Numerical results
1
·10−2
9
1
0.5
ux
uy
0
0.8
8.5
p 0.6
8
0.4
−0.5
−1
0
0.2 0.4 0.6 0.8
1
0
1
λy
0
−0.5
−1
0.2 0.4 0.6 0.8
·10−3
π1
−0.3
0.2 0.4 0.6 0.8
·10−2
2
ξy
0
Bex
0
0.2 0.4 0.6 0.8
0.2 0.4 0.6 0.8
1
1
0.5
0.5
σ
0
2.05
Bey
0
0.2 0.4 0.6 0.8
1
0
0.2 0.4 0.6 0.8
−1
1
1
0.5
0.5
π2
0
0.2 0.4 0.6 0.8
1
0
0.2 0.4 0.6 0.8
1
0
0.2 0.4 0.6 0.8
1
0
−0.5
0
0.2 0.4 0.6 0.8
−1
1
1
1
0.5
0.5
π3
0
−1
0
−0.5
−0.5
2
1
0
1
−1
1
0.2 0.4 0.6 0.8
0
−0.5
−2
0
2
1
−1
1
1
−2
−0.5
0
0.2 0.4 0.6 0.8
4
0
by
0
0
6
−0.2
1
−5
ξx
1
−0.4
0
5
bx
0.2 0.4 0.6 0.8
−0.1
0.5
λx
0.2
7.5
0
−0.5
0
0.2 0.4 0.6 0.8
1
−1
Figure 5.9: Two-dimensional optimal control case. State, adjoint and control
variables of the optimality system along the line x = 0.5 with B̄ e = (2, 0) and
α = 105 .
115
5.2. Two-dimensional optimal control case
α=0
α = 103
α = 104
α = 105
target
0.1
uy
5 · 10−2
0
0
0.2
0.4
0.6
0.8
1
Figure 5.10: Two-dimensional optimal control case. Above: longitudinal velocity
profiles along the line y = 0.95 with B̄ e = (2, 0) and α = 0, 103 , 104 , 105 and
comparison with the target. Below: two views of the y component of the velocity
field for the case α = 105 . The grey curved surface represents the velocity profile
that would be achieved in the absence of magnetic field control (α = 0).
α
0
103
104
5 · 104
7.5 · 104
105
F0
7.89865 · 10−5
1.34407 · 10−6
6.86789 · 10−7
2.08805 · 10−7
2.03182 · 10−7
2.01474 · 10−7
Table 5.1: Two-dimensional optimal
control case. Some values of the velocity error
R
over the target region, F0 = Ω1 ku − ud k2 dx, for different values of α.
116
Numerical results
·10−2
α=0
α = 103
α = 104
α = 105
2
2.1
Bey 0
Bex
2.05
−2
2
0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
0.6
0.8
1
Figure 5.11: Two-dimensional optimal control case. Boundary control as restriction of the lifting function B e on the side y = 1, for the penalty values
α = 0, 103 , 104 , 105 .
configuration. For the inlet and outlet sides y = 0 and y = 1 we enforce
u × n = 0,
u × n = 0,
p = pi
p = p0
on y = 0 ,
on y = 1 ,
(5.11)
(5.12)
where pi − p0 = 1 is the pressure jump driving the flow. We enforce no-slip
boundary conditions on the wall sides x = 0 and x = 1,
u · n = 0,
u×n=0
on x = 0, x = 1 .
(5.13)
For the magnetic field conditions, we subdivide the boundary into the control part
Γc ⊂ Γ and Γd = Γ \ Γc . In the portion Γc the values of the lifting function
B e are allowed to vary during the solution of the optimality system in order to
minimize the objective functional. On the other hand, the boundary conditions for
the lifting function on Γd are fixed. The target flow is a desired constant velocity
in the y-direction given by ud = (0, 0.075) on the target region Ω1 = {(x, y) ∈
R2 | x ∈ [0.25, 0.75], y ∈ [0.90625, 1]}. The subregion Ω1 for the desired velocity is
shown in Figure 5.6, together with the boundary conditions associated with the
state variables. The boundary conditions for the adjoint variables (λ, π1 , ξ, π2 ) and
the control variable B e are summarized in Figure 5.7. We study the minimization
of the functional
Z
Z
1
α
2
(u − ud ) dx +
(∇B e )2 dx .
(5.14)
J (u, B e ) =
2 Ω1
2 Ω
Indeed, we have chosen β = 0 and γ = 1 for the objective functional (2.19) of the
control problem. Also, the integral of the velocity error has been limited to the
5.2. Two-dimensional optimal control case
117
Figure 5.12: Two-dimensional optimal control case. Plots of the y component
of the velocity (top row), the y component of the adjoint velocity (middle row)
and the x component of the magnetic field lifting function (bottom row) over the
domain Ω. The arrow indicates the direction of the flow.
118
Numerical results
target subregion Ω1 . This is reasonable, inasmuch as one intends to minimize the
error only in the region where a target Ω1 is given.
It is clear that various choices of the sides for the boundary control portion
Γc can be considered, which may depend on issues like the position of the target
region Ω1 . Given our choice of the target region, we consider the control portion
Γc = {(x, y) ∈ Ω | y = 1} for a numerical investigation. The control variable is
therefore the magnetic field on the outflow side. On the portion Γd = Γ \ Γc a
fixed value B e = B̄ e is given. In Figures 5.8 and 5.9 we show the plots along the
lines y = 0.95 and x = 0.5, respectively, of the state, adjoint and control variables
obtained from the numerical solution of the optimality system, for B̄ e = (2, 0) and
α = 105 .
It is clear that the choice of the parameter α affects the accuracy in the velocity
matching towards the desired profile. In order to study the effect of the parameter
α on the minimization of the functional, we plot on the top of Figure 5.10 the
velocity profile along the line y = 0.95 for the values α = 0, 103 , 104 , 105 . Notice
that the case α = 0 corresponds to the flow profile that would be achieved in the
absence of magnetic field. Two different views of the longitudinal velocity field
uy on the domain Ω are shown at the bottom of Figure 5.10 together with the
velocity solution without control. In RTable 5.1 we also report the values of the
velocity error over the target region, Ω1 ku − ud k2 dx, for various values of the
penalty parameter α. It is evident that a higher value of the parameter α yields a
more and more accurate control, as the velocity profile gets closer to the desired
velocity ud and the error norm is smaller. In Figure 5.11 we show the boundary
control obtained from the restriction of the lifting function B e on the line y = 1 for
α = 0, 103 , 104 , 105 . This represents the control solution of the original boundary
optimal control problem. Figure 5.12 shows for two different views the plots over
the domain Ω of the longitudinal velocity uy (top row), longitudinal adjoint velocity
λy (middle row) and the component Bex of the magnetic field lifting function. It is
evident how the velocity profile approaches the desired profile in the target region.
In that region the adjoint velocity is negative, in order to push the velocity value
from the uncontrolled case towards the desired objective. The lifting function of
the magnetic field adjust its values on the boundary control portion in order to
obtain an optimal solution.
5.3
5.3.1
Three-dimensional results
Hartmann flow optimal control case
We consider here a first three-dimensional solution of the optimality system. The
domain region is given by the parallelepiped Ω = {(x, y, z) ∈ R3 | x ∈ [0, 1], y ∈
119
5.3. Three-dimensional results
Figure 5.13: Hartmann flow optimal control case. Computational domain Ω and
target region Ωc (highlighted in gray). The arrow indicates the direction of the
flow.
k
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Jk
ωk
∆J k
3.32491e-05
1
−
0.00500133
1.5
+
0.00287462
0.75
+
0.000326773
0.375
+
3.59377e-06
0.1875
−
2.18803e-06
0.28125
−
2.86024e-05 0.421875
+
1.9643e-06
0.210938
−
1.26166e-06 0.316406
−
1.15135e-05 0.474609
+
1.63692e-06 0.237305
+
1.23698e-06 0.118652
−
2.16142e-06 0.177979
+
1.23072e-06 0.0889893
−
1.6191e-06
0.133484
+
k
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Jk
ωk
∆J k
1.23179e-06 0.0667419
+
1.22854e-06
0.033371
−
1.28434e-06 0.0500565
+
1.22905e-06 0.0250282
+
1.22845e-06 0.0125141
−
1.2365e-06
0.0187712
+
1.22865e-06 0.00938559
+
1.22844e-06 0.00469279
−
1.22965e-06 0.00703919
+
1.22851e-06 0.00351959
+
1.22844e-06 0.0017598
−
1.22863e-06 0.0026397
+
1.22847e-06 0.00131985
+
1.22844e-06 0.000659924
Table 5.2: Hartmann flow optimal control case. Values of the objective functional
J k , the relaxation factor ω k and sign of the difference ∆J k = J k − J k−1 for each
optimization step k for α = 200 and ud,y = 1.4 uy,Hm (x). A + sign means that the
functional has increased from the previous step.
120
Numerical results
α = 200
α = 400
α = 600
1.5
1
ωk
0.5
0
10
20
30
40
50
60
k
·10−2
α = 200
α = 400
α = 600
2
1.5
Jk
1
0.5
0
10
20
30
40
50
60
k
Figure 5.14: Hartmann flow optimal control case. Values of the relaxation parameter ω k and of the objective functional J k for α = 200, 400, 600 as a function of
the optimization steps.
α kend
200 29
400 35
600 60
J kend
1.22844e-06
7.38943e-07
5.13533e-07
Table 5.3: Hartmann flow optimal control case. Number of optimization steps kend
and final value of the cost functional J kend for increasing α values.
5.3. Three-dimensional results
121
[0, 2], z ∈ [0, 1]}. The base flow, i.e. in the absence of control, is an equivalent
three-dimensional Hartmann flow in the y-direction, namely a Hartmann flow in
the y-direction with symmetry boundary conditions on the z-direction. It is useful
to consider this case due to the fact that an analytical solution for the base flow is
available (see Section 5.1). In this way, one can easily use an analytical expression
as a reference for building desired velocity profiles, in such a way that one does not
choose a target velocity that is too distant from the flow solution without control.
This is particularly advantageous for the optimization algorithm, in order to avoid
the possibility of converging towards unwanted spurious minima of the objective
functional [15].
We retain the same values for the fluid physical properties and for the reference
quantities as in Section 5.2. The target region where we want to steer the velocity
u to the desired profile ud is Ωc = {(x, y, z) ∈ R3 | x ∈ [0.25, 0.75], y ∈ [1.5, 2], z ∈
[0.25, 0.75]}, as depicted in Figure 5.13. The boundary portion Γc for the boundary
magnetic field control is the face y = 2. On the rest of the boundary surface the
nondimensional magnetic field is taken as Bex = 5 in the x-direction.
In order to show the performance of the gradient algorithm described in Section
3.4 for the numerical solution of the discrete optimality system of Section 3.3, we
report in Table 5.2 the results of an optimization loop. The integral of the velocity
error in the objective functional (2.19) is assumed to be limited to the target
subregion Ωc , as considered in Section 5.2. The penalty values of the functional
are equal to α = 200, β = 0, γ = 1 and we consider a desired velocity with only a
y component given by ud,y = 1.4 uy,Hm (x), where uy,Hm (x) denotes the Hartmann
velocity profile in (5.5). Hence, the desired profile is a multiplication by a factor
1.4 of the flow solution without control. It is clear that the relaxation parameter ω k
diminishes whenever the difference between the objective functional values of two
subsequent optimization steps, ∆J k = J k − J k−1 , is positive, in order to underrelax the action of the control. The converse happens for the over-relaxation. In
order to study the influence of the parameter α, in Figure 5.14 we also plot the
parameter ω k and the cost functional J k as a function of the optimization steps for
three different runs with α = 200, 400, 600. As we can see in Table 5.3, the value
of the cost functional at the end of each optimization loop is smaller for higher α.
Clearly, the tracking term α(u−ud ) in the adjoint Navier-Stokes equation becomes
more and more important, so that the velocity eventually gets closer to the desired
profile. On the other hand, more optimization steps are required. In fact, a higher
penalty α brings more oscillations in the optimality system because of the higher
“thrust”given by the adjoint velocity λ. If the parameter α is increased too much,
one may experience lack of convergence of the linear solvers.
122
k
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Numerical results
Jk
ωk
∆J k
0.000975954
1
−
0.0223241
1.5
+
0.00974474
0.75
+
0.000774439
0.375
−
0.000818477
0.5625
+
0.00051892
0.28125
−
0.00050708 0.421875
−
0.00046856 0.632812
−
0.000883594 0.949219
+
0.000500301 0.474609
+
0.000445635 0.237305
−
0.000458215 0.355957
+
0.000442116 0.177979
−
0.000447673 0.266968
+
0.000441366 0.133484
−
0.000444232 0.200226
+
0.000441163 0.100113
−
0.000442729 0.150169
+
0.000441099 0.0750847
−
0.000441968 0.112627
+
k
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Jk
ωk
∆J k
0.000441077 0.0563135
−
0.000441556 0.0844703
+
0.000441068 0.0422351
−
0.000441327 0.0633527
+
0.000441064 0.0316764
−
0.0004412
0.0475145
+
0.000441062 0.0237573
−
0.00044113 0.0356359
+
0.000441061 0.0178179
−
0.000441092 0.0267269
+
0.000441061 0.0133635
−
0.000441072 0.0200452
+
0.00044106 0.0100226
−
0.000441062 0.0150339
+
0.00044106 0.00751695
−
0.000441058 0.0112754
−
0.000441096 0.0169131
+
0.000441058 0.00845657
+
0.000441058 0.00422828
Table 5.4: Flow inversion optimal control case. Values of the objective functional
J k , the relaxation factor ω k and sign of the difference ∆J k = J k − J k−1 for each
optimization step k. A + sign means that the functional has increased from the
previous step.
5.3.2
Flow inversion optimal control case
We now consider a full three-dimensional case. The computational domain and
the target region are the same as in Section 5.3.1 (see Figure 5.13), as well as the
portions of the boundary for fixed (Γd ) and variable (Γc ) boundary conditions of
the magnetic field lifting function. Also, the integral of the velocity error in the
objective functional is again limited to the target region Ωc . Unlike Section 5.3.1,
in this case the cross section of the channel is finite, thus representing a real threedimensional flow. Hence, the uncontrolled flow is again in the y direction and
no-slip boundary conditions are enforced for the velocity on the faces orthogonal
to the z and x directions, which represent the channel walls. Concerning the
boundary conditions of the Navier-Stokes equations, we enforce an inlet velocity
profile driving the flow on the face y = 0 as uin = x(1 − x)z(1 − z), while on the
123
5.3. Three-dimensional results
·10−2
·10−2
w/ control
desired
w/o control
5
5
uy
uy
0
−5
0
−5
0
0.2
0.4
0.6
0.8
0
1
0.2
0.4
0.6
0.8
1
z
x
Figure 5.15: Flow inversion optimal control case. Plot along the line {x ∈ [0, 1], y =
1.9, z = 0.5} (left) and the line {x = 0.5, y = 1.9, z ∈ [0, 1]} (right) of the computed
optimal velocity (solid), the desired velocity (dashed) and the velocity of the state
problem with no control (dotted). The asterisks indicate the limits of the target
region Ωc .
·10−2
w/ control
desired
w/o control
5
uy
0
−5
0
0.5
1
1.5
2
y
Figure 5.16: Flow inversion optimal control case. Plot along the line {x = 0.5, y =
[0, 2], z = 0.5} of the computed optimal velocity (solid), the desired velocity
(dashed) and the velocity of the state problem without control (dotted). The
asterisks indicate the limits of the target region Ωc .
124
Numerical results
Figure 5.17: Flow inversion optimal control case. The velocity vector field on the
outlet face of the MHD channel without control (left) and with control, as computed at the end of the optimization algorithm (right). The gray arrow indicates
the prescribed direction of the flow.
Figure 5.18: Flow inversion optimal control case. Contour lines of the magnitude
of the lifting function B e , together with the representation of some lifting function
vectors on the outlet face of the channel, as computed at the end of the optimization
algorithm.
125
5.3. Three-dimensional results
·10−3
·10−3
6
Bex
·10−3
6
6
5.5
5.5
5
5
5.5
0
0.2
0.4
0.6
x
0.8
1
0
0.2
0.4
0.6
z
0.8
1
0
0.5
1
1.5
2
y
Figure 5.19: Flow inversion optimal control case. Plot along the lines {x ∈
[0, 1], y = 1.9, z = 0.5} (left), {x = 0.5, y = 1.9, z ∈ [0, 1]} (center) and
{x = 0.5, y = [0, 2], z = 0.5} (right) of the x-component of the magnetic field
lifting function B e , as a final result of the gradient algorithm.
outlet face y = 2 we set a zero pressure outflow condition. Of course, the inlet
velocity profile uin is zero on the channel walls, consistently with the enforced
no-slip boundary conditions.
For this case we report the results about the numerical solution of the optimality system as obtained with the gradient algorithm of Section 3.4, with the penalty
parameters in the objective functional given by α = 100, β = 0 and γ = 1. As a
desired velocity, we choose a longitudinal y component given by ud,y = −uy,Hm (x)
and zero for the other components, where uy,Hm (x) denotes again the Hartmann
velocity profile given by (5.5). Notice the presence of the minus sign, which means
that we aim to obtain a flow inversion in the target region Ωc .
In Table 5.4 we list for each optimization step k the most important values
that characterize the gradient algorithm, namely the values of the objective functional J k , the relaxation factor ω k and the sign of the difference of the objective
functional values between two subsequent steps, ∆J k = J k − J k−1 . For this run,
the gradient algorithm stopped after 39 optimization steps.
As a result of the final step of the gradient algorithm, in Figure 5.15 we plot
along two lines parallel to the x-axis (left) and to the z-axis (right) the computed
optimal longitudinal velocity (solid), the desired one (dashed) and the velocity of
the state problem without control, i.e., with α = 0 (dotted). Figure 5.16 shows a
plot of the same quantities along the longitudinal line {x = 0.5, y = [0, 2], z = 0.5}.
It is clear from these figures that the candidate optimal velocity field differs from
the solution without control and that it becomes negative in the target region,
in order to reach the negative desired profile. Figure 5.17 shows the difference
between the velocity vector field on the outlet of the MHD channel in the absence of
control (left) and the obtained velocity solution at the end of the optimization loop
126
Numerical results
Figure 5.20: Flow inversion optimal control case. Velocity vector field on the
longitudinal midplane surface x = 0.5 for the optimization steps 5-10 (top to
bottom, left to right). The domain is scaled by a factor 2 in the longitudinal
direction.
5.3. Three-dimensional results
127
Figure 5.21: Flow inversion optimal control case. Velocity vector field on the
longitudinal midplane surface z = 0.5 for the optimization steps 5-10 (top to
bottom, left to right). The domain is scaled by a factor 2 in the longitudinal
direction.
128
Numerical results
Figure 5.22: Flow inversion optimal control case. Velocity vector field on the
longitudinal midplane surface x = 0.5 for the optimization steps 11-14 and the
last two steps 38 and 39 (top to bottom, left to right). The domain is scaled by a
factor 2 in the longitudinal direction.
5.3. Three-dimensional results
129
Figure 5.23: Flow inversion optimal control case. Velocity vector field on the
longitudinal midplane surface z = 0.5 for the optimization steps 11-14 and the
last two steps 38 and 39 (top to bottom, left to right). The domain is scaled by a
factor 2 in the longitudinal direction.
130
Numerical results
Figure 5.24: Flow inversion optimal control case. Adjoint velocity vector field on
the longitudinal midplane surface x = 0.5 for the optimization steps 5-10 (top
to bottom, left to right). The domain is scaled by a factor 2 in the longitudinal
direction.
5.3. Three-dimensional results
131
Figure 5.25: Flow inversion optimal control case. Adjoint velocity vector field on
the longitudinal midplane surface z = 0.5 for the optimization steps 5-10 (top
to bottom, left to right). The domain is scaled by a factor 2 in the longitudinal
direction.
132
Numerical results
Figure 5.26: Flow inversion optimal control case. Adjoint velocity vector field on
the longitudinal midplane surface x = 0.5 for the optimization steps 11-14 and the
last two steps 38 and 39 (top to bottom, left to right). The domain is scaled by a
factor 2 in the longitudinal direction.
5.3. Three-dimensional results
133
Figure 5.27: Flow inversion optimal control case. Adjoint velocity vector field on
the longitudinal midplane surface z = 0.5 for the optimization steps 11-14 and the
last two steps 38 and 39 (top to bottom, left to right). The domain is scaled by a
factor 2 in the longitudinal direction.
134
Numerical results
Figure 5.28: Flow inversion optimal control case. Contours of the magnitude of
the lifting function B e on the control surface y = 2 for the optimization steps 5-10
(top to bottom, left to right).
5.3. Three-dimensional results
135
Figure 5.29: Flow inversion optimal control case. Contours of the magnitude of
the lifting function B e on the control surface y = 2 for the optimization steps
11-14 and for the last two steps 38 and 39 (top to bottom, left to right).
136
Numerical results
(right). The inversion of the flow due the magnetic control can be clearly noticed.
In Figures 5.18 and 5.19 we show the computed lifting function at the final step
of the gradient algorithm. Figure 5.18 shows the contour lines of the magnitude
of the lifting function together with a sampling of lifting function vectors. The
results of the simulation tell us that the z and y components of the lifting function
are negligible with respect to the x component. In Figure 5.19 we also report the
plots of Bex along three lines parallel to the x (left), z (center) and y (right) axes,
respectively.
In order to show the evolution of the gradient algorithm, in Figures 5.20 and
5.21 we report the velocity vector field for the steps 5-10 of the algorithm on the
midplane surfaces x = 0.5 and z = 0.5, respectively. For the sake of compactness,
the domain is scaled by a factor 2 in the y direction. We can clearly observe
that during these first steps of the gradient algorithm the velocity field has to
be adjusted and therefore it undergoes rapid changes between two adjacent steps.
Then, as can be seen in the following Figures 5.22 and 5.23, in the subsequent steps
the oscillations are smaller and the algorithm eventually reaches convergence. The
evolution of the adjoint velocity field follows closely the corresponding state field,
as can be noticed in Figures 5.24, 5.25, 5.26 and 5.27. Finally, in Figures 5.28
and 5.29 we plot the contours of the magnetic field lifting function on the outlet
control surface y = 2. The restriction of the lifting function to this control surface
corresponds to the boundary control solution of the original boundary optimal
control problem.
Conclusions
In this thesis a new approach to the boundary optimal control of the incompressible
steady MHD equations has been presented. With the introduction of the lifting
function for the boundary conditions on the magnetic field, boundary control problems can be formulated as extended distributed problems, bringing theoretical and
computational benefits. We have provided a systematic mathematical formulation
of the boundary optimal control problem in terms of the minimization of a cost
functional constrained by the steady incompressible MHD equations. The existence of a solution to the state equations and to the optimal control problem has
been shown. The Lagrange multiplier technique has been used to derive an optimality system, whose solutions are candidate solutions for the optimal control
problem. In order to achieve the numerical solution of the optimality system, a
finite element approximation has been considered for the discretization together
with an appropriate gradient-type algorithm, with the purpose of diminishing the
numerical oscillations induced by the decoupling of the equations. A finite element object-oriented library has been developed to obtain a parallel and multigrid
computational implementation of the optimality system. Numerical results of both
two- and three-dimensional computations have shown that a possible minimum for
the optimal control problem can be computed in a robust and accurate manner.
Thanks to the generality of the proposed lifting function approach, we expect it to
be suitable for the solution of a broad class of boundary optimal control problems
constrained by partial differential equations.
List of Figures
3.1
The full multigrid algorithm. . . . . . . . . . . . . . . . . . . . . . . 66
4.1
4.2
FEMuS directory structure. . . . . . . . . . . . . . . . . . . . . . . 74
External libraries required by FEMuS. The dashed arrow from LibMesh
to PETSc indicates that the PETSc libraries are not called by FEMuS through the interface given by LibMesh but they are used
directly. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Overview of the EquationsMap class and the classes that compose it. 82
An example of inheritance diagram with the EqnBase class as the
father class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
The subdivision of vectors and matrices as required by PETSc. Vectors must be divided into blocks of contiguous elements, while matrices must be split into blocks of contiguous rows. Each block is
assigned to a different processor. . . . . . . . . . . . . . . . . . . . . 84
The Gencase class must take into account both the subdomain and
the level subdivisions of the mesh geometrical entities (elements and
nodes). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Inheritance diagram for the FEElemBase class. . . . . . . . . . . . . 91
Basic structure of the files of a multiphysics application. . . . . . . 94
The equations and quantities for the optimality system (some quantities are not reported here for the sake of conciseness). . . . . . . . 103
4.3
4.4
4.5
4.6
4.7
4.8
4.9
5.1
5.2
5.3
Lifting function verification test. Domain and boundary conditions
for the Hartmann flow. . . . . . . . . . . . . . . . . . . . . . . . . . 106
Lifting function verification test. The magnetic fields bx , Bex , Bx
along the line x = 0.5 (left column) and the magnetic fields bx , Bex , By
along the line y = 0.5 (right column) for K1 = 0 (A), 1 (B), 10 (C)
with divergence-free magnetic field lifting functions. . . . . . . . . . 107
Lifting function verification test. The velocity components ux (left)
and uy (right) along the line y = 0.5 for K1 = 0 (A), 1 (B), 10 (C)
with divergence-free magnetic field lifting functions. . . . . . . . . . 108
140
5.4
5.5
5.6
5.7
5.8
5.9
5.10
5.11
5.12
5.13
5.14
List of Figures
Lifting function verification test. The x-components bx , Bex , Bx (left
column) and the y-components by , Bey , By (right column) along the
line y = 0.5 for K2 = 0 (A), 1 (B) and 10 (C) with non divergencefree magnetic field lifting functions. . . . . . . . . . . . . . . . . .
Lifting function verification test. The y-component uy of the velocity field (left) and the pressure p (right) along the line y = 0.5 for
K2 = 0 (A), 1 (B) and 10 (C) with non divergence-free magnetic
field lifting functions. . . . . . . . . . . . . . . . . . . . . . . . . .
Two-dimensional optimal control case. Computational domain Ω
with target velocity region Ω1 (left) and boundary conditions for
the state variables of the optimality system (right). . . . . . . . .
Two-dimensional optimal control case. Boundary conditions for the
adjoint variables (left) and the control variable (right) of the optimality system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Two-dimensional optimal control case. State, adjoint and control
variables of the optimality system along the line y = 0.95 with
B̄ e = (2, 0) and α = 105 . . . . . . . . . . . . . . . . . . . . . . . .
Two-dimensional optimal control case. State, adjoint and control
variables of the optimality system along the line x = 0.5 with B̄ e =
(2, 0) and α = 105 . . . . . . . . . . . . . . . . . . . . . . . . . . .
Two-dimensional optimal control case. Above: longitudinal velocity profiles along the line y = 0.95 with B̄ e = (2, 0) and α =
0, 103 , 104 , 105 and comparison with the target. Below: two views
of the y component of the velocity field for the case α = 105 . The
grey curved surface represents the velocity profile that would be
achieved in the absence of magnetic field control (α = 0). . . . .
Two-dimensional optimal control case. Boundary control as restriction of the lifting function B e on the side y = 1, for the penalty
values α = 0, 103 , 104 , 105 . . . . . . . . . . . . . . . . . . . . . . .
Two-dimensional optimal control case. Plots of the y component of
the velocity (top row), the y component of the adjoint velocity (middle row) and the x component of the magnetic field lifting function
(bottom row) over the domain Ω. The arrow indicates the direction
of the flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hartmann flow optimal control case. Computational domain Ω and
target region Ωc (highlighted in gray). The arrow indicates the
direction of the flow. . . . . . . . . . . . . . . . . . . . . . . . . .
Hartmann flow optimal control case. Values of the relaxation parameter ω k and of the objective functional J k for α = 200, 400, 600
as a function of the optimization steps. . . . . . . . . . . . . . .
. 109
. 110
. 112
. 112
. 113
. 114
. 115
. 116
. 117
. 119
. 120
List of Figures
5.15 Flow inversion optimal control case. Plot along the line {x ∈
[0, 1], y = 1.9, z = 0.5} (left) and the line {x = 0.5, y = 1.9, z ∈
[0, 1]} (right) of the computed optimal velocity (solid), the desired
velocity (dashed) and the velocity of the state problem with no control (dotted). The asterisks indicate the limits of the target region
Ωc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.16 Flow inversion optimal control case. Plot along the line {x =
0.5, y = [0, 2], z = 0.5} of the computed optimal velocity (solid),
the desired velocity (dashed) and the velocity of the state problem
without control (dotted). The asterisks indicate the limits of the
target region Ωc . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.17 Flow inversion optimal control case. The velocity vector field on the
outlet face of the MHD channel without control (left) and with control, as computed at the end of the optimization algorithm (right).
The gray arrow indicates the prescribed direction of the flow. . .
5.18 Flow inversion optimal control case. Contour lines of the magnitude of the lifting function B e , together with the representation of
some lifting function vectors on the outlet face of the channel, as
computed at the end of the optimization algorithm. . . . . . . . .
5.19 Flow inversion optimal control case. Plot along the lines {x ∈
[0, 1], y = 1.9, z = 0.5} (left), {x = 0.5, y = 1.9, z ∈ [0, 1]} (center) and {x = 0.5, y = [0, 2], z = 0.5} (right) of the x-component
of the magnetic field lifting function B e , as a final result of the
gradient algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . .
5.20 Flow inversion optimal control case. Velocity vector field on the
longitudinal midplane surface x = 0.5 for the optimization steps
5-10 (top to bottom, left to right). The domain is scaled by a factor
2 in the longitudinal direction. . . . . . . . . . . . . . . . . . . . .
5.21 Flow inversion optimal control case. Velocity vector field on the
longitudinal midplane surface z = 0.5 for the optimization steps
5-10 (top to bottom, left to right). The domain is scaled by a factor
2 in the longitudinal direction. . . . . . . . . . . . . . . . . . . . .
5.22 Flow inversion optimal control case. Velocity vector field on the
longitudinal midplane surface x = 0.5 for the optimization steps
11-14 and the last two steps 38 and 39 (top to bottom, left to right).
The domain is scaled by a factor 2 in the longitudinal direction. .
5.23 Flow inversion optimal control case. Velocity vector field on the
longitudinal midplane surface z = 0.5 for the optimization steps 1114 and the last two steps 38 and 39 (top to bottom, left to right).
The domain is scaled by a factor 2 in the longitudinal direction. .
141
. 123
. 123
. 124
. 124
. 125
. 126
. 127
. 128
. 129
142
List of Figures
5.24 Flow inversion optimal control case. Adjoint velocity vector field
on the longitudinal midplane surface x = 0.5 for the optimization
steps 5-10 (top to bottom, left to right). The domain is scaled by a
factor 2 in the longitudinal direction. . . . . . . . . . . . . . . . .
5.25 Flow inversion optimal control case. Adjoint velocity vector field
on the longitudinal midplane surface z = 0.5 for the optimization
steps 5-10 (top to bottom, left to right). The domain is scaled by a
factor 2 in the longitudinal direction. . . . . . . . . . . . . . . . .
5.26 Flow inversion optimal control case. Adjoint velocity vector field
on the longitudinal midplane surface x = 0.5 for the optimization
steps 11-14 and the last two steps 38 and 39 (top to bottom, left
to right). The domain is scaled by a factor 2 in the longitudinal
direction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.27 Flow inversion optimal control case. Adjoint velocity vector field
on the longitudinal midplane surface z = 0.5 for the optimization
steps 11-14 and the last two steps 38 and 39 (top to bottom, left
to right). The domain is scaled by a factor 2 in the longitudinal
direction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.28 Flow inversion optimal control case. Contours of the magnitude of
the lifting function B e on the control surface y = 2 for the optimization steps 5-10 (top to bottom, left to right). . . . . . . . . .
5.29 Flow inversion optimal control case. Contours of the magnitude of
the lifting function B e on the control surface y = 2 for the optimization steps 11-14 and for the last two steps 38 and 39 (top to
bottom, left to right). . . . . . . . . . . . . . . . . . . . . . . . .
. 130
. 131
. 132
. 133
. 134
. 135
List of Tables
4.1
4.2
Some options in the configuration header files. . . . . . . . . . . . . 95
Some configuration parameters in the femus conf.in file. . . . . . . . 96
5.1
Two-dimensional optimal control case.
of the velocity
R Some values
2
error over the target region, F0 = Ω1 ku − ud k dx, for different
values of α. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hartmann flow optimal control case. Values of the objective functional J k , the relaxation factor ω k and sign of the difference ∆J k =
J k − J k−1 for each optimization step k for α = 200 and ud,y =
1.4 uy,Hm (x). A + sign means that the functional has increased
from the previous step. . . . . . . . . . . . . . . . . . . . . . . . .
Hartmann flow optimal control case. Number of optimization steps
kend and final value of the cost functional J kend for increasing α
values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flow inversion optimal control case. Values of the objective functional J k , the relaxation factor ω k and sign of the difference ∆J k =
J k − J k−1 for each optimization step k. A + sign means that the
functional has increased from the previous step. . . . . . . . . . .
5.2
5.3
5.4
. 115
. 119
. 120
. 122
Bibliography
[1] R. Adams, Sobolev Spaces, Academic Press, New York, 1975.
[2] G. V. Alekseev and A. B. Smishliaev, Solvability of the boundary-value
problems for the Boussinesq equations with inhomogeneous boundary conditions, Journal of Mathematical Fluid Mechanics, 3, pp. 18–39.
[3] G. Bornia, A. Cervone, and S. Manservisi, Optimal control for incompressible steady MHD flows via constrained extended boundary approach, in
Proceedings of the V European Conference on Computational Fluid Dynamics ECCOMAS CFD 2010, Lisbon, 2010.
[4] S. C. Brenner and L. R. Scott, The mathematical theory of finite element
methods, Springer-Verlag, 1994.
[5] F. Brezzi and M. Fortin, Mixed and hybrid finite element methods,
Springer-Verlag, 1991.
[6] F. Brezzi, J. Rappaz, and P. Raviart, Finite dimensional approximation
of nonlinear problems, Numerische Mathematik, 36 (1980), pp. 1–25.
[7] R. Brizitskii and D. Tereshko, On the solvability of boundary value problems for the stationary magnetohydrodynamic equations with inhomogeneous
mixed boundary conditions, Differential Equations, 43, pp. 246–258.
[8] P. Ciarlet, The Finite Element Method for Elliptic Problems, NorthHolland, Amsterdam, 1978.
[9] P. A. Davidson, An Introduction to Magnetohydrodynamics, Cambridge
University Press, Cambridge, UK, 2001.
[10] V. C. A. Ferraro and C. Plumpton, An introduction to magneto-fluid
mechanics, Oxford University Press, Oxford, 1966.
146
Bibliography
[11] J. F. Gerbeau, A stabilized finite element method for the incompressible
magnetohydrodynamic equations, Numerische Mathematik, 87 (2000), pp. 83–
111.
[12] V. Girault and P. Raviart, The Finite Element Approximation of the
Navier-Stokes Equations, Springer-Verlag, Berlin, 1979.
[13]
, The Finite Element Method for Navier-Stokes Equations: Theory and
Algorithms, Springer-Verlag, New York, 1986.
[14] R. Griesse and K. Kunisch, Optimal control for a stationary MHD system
in velocity-current formulation, Siam J. Control Optim., 45 (2006), pp. 1822–
1845.
[15] M. D. Gunzburger, Perspectives in flow control and optimization, SIAM,
Philadelphia, 2003.
[16] M. D. Gunzburger and L. S. Hou, Finite–dimensional approximation
of a class of constrained nonlinear optimal control problems, Siam J. Control
and Optimization, 34 (1996), pp. 1001–1043.
[17] M. D. Gunzburger and L. S. Hou, Finite-dimensional approximation of
a class of constrained nonlinear optimal control problems, SIAM journal on
control and optimization, 34 (1996), p. 1001.
[18] M. D. Gunzburger and S. Manservisi, Analysis and approximation of
the velocity tracking problem for Navier-Stokes flows with distributed control,
SIAM J. Numer. Anal., 37 (2000), pp. 1481–1512.
[19]
, The velocity tracking problem for Navier-Stokes flow with boundary control, SIAM Journal on Control and Optimization, 39 (2000), pp. 594–634.
[20] M. D. Gunzburger, A. J. Meir, and J. S. Peterson, On the existence,
uniqueness, and finite element approximation of solutions of the equations of
stationary, incompressible Magnetohydrodynamics, Mathematics of Computations, 56 (1991), pp. 523–563.
[21] M. D. Gunzburger and C. Trenchea, Analysis and discretization of
an optimal control problem for the time-periodic MHD equations, Journal of
mathematical analysis and applications, 308 (2005), pp. 440–466.
[22] M. D. Gunzburger and C. Trenchea, Analysis of an optimal control
problem for the three-dimensional coupled modified Navier-Stokes and Maxwell
equations, J. Math. Anal. Appl., 333 (2007), pp. 295–310.
Bibliography
147
[23] U. Hasler, A. Schneebeli, and D. Schötzau, Mixed finite element
approximation of incompressible MHD problems based on weighted regularization, Applied Numerical Mathematics, 51 (2004), pp. 19 – 45.
[24] L. S. Hou and A. J. Meir, Boundary optimal control of MHD flows, Appl.
Math. Optim, 32 (1995), pp. 143–162.
[25] L. S. Hou and J. S. Peterson, Boundary optimal control for an electrically conducting fluid using boundary electrical potential controls, Nonlinear
Analysis, Theory, Methods and Applications, 24 (1995), pp. 857–874.
[26] L. S. Hou and S. S. Ravindran, Computations of boundary optimal control
problems for an electrically conducting fluid, J. Comput. Phys., 128 (1996),
pp. 319–330.
[27] J. Jackson, Classical electrodynamics, Wiley, New York, 1975.
[28] B. S. Kirk, J. W. Peterson, R. H. Stogner, and G. F. Carey,
LibMesh: A C++ Library for Parallel Adaptive Mesh Refinement/Coarsening
Simulations, Engineering with Computers, 22 (2006), pp. 237–254.
[29] L. Landau and E. Lifchitz, Électrodynamique des milieux continus, MIR,
Moscow, 1969.
[30] A. J. Meir and P. G. Schmidt, Variational methods for stationary MHD
flow under natural interface conditions, Nonlinear Analysis, Theory, Methods
and Applications, 26 (1996), pp. 659–689.
[31]
, Analysis and numerical approximation of a stationary MHD flow problem with nonideal boundary, SIAM J. Numer. Anal., 36 (1999), pp. 1304–1332.
[32] S. S. Ravindran, Real-time computational algorithm for optimal control of
an MHD flow system, SIAM J. Sci. Comput., 26 (2005), pp. 1369–1388.
[33] P. H. Roberts, An introduction to Magnetohydrodynamics, Longmans, London, 1967.
[34] D. Schötzau, Mixed finite element methods for stationary incompressible
magneto-hydrodynamics, Numer. Math., 96 (2004), pp. 771–800.
[35] R. Temam, Navier-Stokes Equations, North-Holland, Amsterdam, 1979.
[36] V. M. Tikhomirov, Fundamental Principles of the Theory of Extremal Problems, Whiley, Chichester, 1982.
148
Bibliography
[37] U. Trottenberg, C. Oosterlee, and A. Schüller, Multigrid, Academic Pr, 2001.
[38] P. Wesseling, Introduction to multigrid methods, Institute For Computer
Applications In Science And Engineering Hampton Va, 1995.
[39] M. Wiedmer, Finite element approximation for equations of Magnetohydrodynamics, Mathematics of Computation, 69 (1999), pp. 83–101.
[40] K. Yosida, Functional analysis, Springer–Verlag, Berlin, 1980.
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement