File: hyperbolic_nonlinear_dg.tex

package info (click to toggle)
rheolef 7.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 77,392 kB
  • sloc: cpp: 105,337; sh: 16,014; makefile: 5,293; python: 1,359; xml: 221; yacc: 218; javascript: 202; awk: 61; sed: 5
file content (235 lines) | stat: -rw-r--r-- 6,672 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
% --------------------------------------------
\subsection{Abstract setting}
% --------------------------------------------
\label{sec-hyperbolic-dg}%
\cindex{problem!hyperbolic nonlinear equation}
The aim of this paragraph is to study the
discontinuous Galerkin discretization of scalar nonlinear hyperbolic equations.
This section presents the general framework and discretization tools
while the next section illustrates the method for the Burgers equation.

% ------------------------------------
\subsubsection*{Problem statement}
% ------------------------------------
A time-dependent nonlinear hyperbolic problem writes in general
form~\citep[p.~99]{PieErn-2012}:

\ \ $(P)$: \emph{find $u$, defined in $]0,T[ \times \Omega$, such that}
\begin{subequations}
\begin{eqnarray}
  \Frac{\partial u}{\partial t}
  +
  {\rm div}\,{\bf f}(u)
  &=& 0 
  \ \mbox{ in } ]0,T[\times \Omega
	\label{eq-dg-hyp-eqn}
  	\\
  u(t\!=\!0) &=& u_0 
  \ \mbox{ in } \Omega 
	\label{eq-dg-hyp-ini}
	\\
  {\bf f}(u).{\bf n} &=& \Phi({\bf n};\,u,g)
  \mbox{ on } ]0,T[\times \partial\Omega
	\label{eq-dg-hyp-bc}
\end{eqnarray}
where $T>0$, $\Omega\subset \mathbb{R}^d$, $d=1,2,3$
and the initial condition ${\bf u}_0$ being known.
As usual, ${\bf n}$ denotes the outward unit normal
on the boundary $\partial\Omega$.
The function
\mbox{$
  {\bf f}: \mathbb{R} \longrightarrow \mathbb{R}^d
$} is also known and supposed to be continuously differentiable.
The initial data $u_0$, defined in $\Omega$,
and the boundary one, $g$, defined on $\partial\Omega$ are given. 
The function $\Phi$, called the Godunov flux associated to ${\bf f}$, is defined,
for all $\boldsymbol{\nu}\in\mathbb{R}^d$
and $a, b  \in\mathbb{R}$, by
\begin{equation}
  \Phi(\boldsymbol{\nu};\,a,b)
  =
  \left\{
    \begin{array}{ll}
      {\displaystyle \min_{v\in [a,b]}}
  	{\bf f}(v).\boldsymbol{\nu} 
      & \mbox{ when } a \leq b \\
      {\displaystyle \max_{v\in [b,a]}}
  	{\bf f}(v).\boldsymbol{\nu} 
      & \mbox{ otherwise }
    \end{array}
  \right.
  \label{eq-dg-hyp-flux-godunov}
\end{equation}
\end{subequations}
% Observe that the boundary condition is neither obvious nor explicit
% in the case of a nonlinear problem given by a general ${\bf f}$ function.

Note that, with this general formalism,
the linear transport problem considered in
the previous section~\ref{sec-transport-dg}
corresponds to (see e.g.~\citealp[p.~104]{PieErn-2012}:
\begin{subequations}
\begin{eqnarray}
  \boldsymbol{f}(u) &=& \boldsymbol{a}u
	\label{eq-dg-hyp-transport-f}
	\\
  \Phi(\boldsymbol{n};\,u,v) &=& 
  	\boldsymbol{a}.\boldsymbol{n}
	\Frac{u+v}{2}
	+
  	\Frac{|\boldsymbol{a}.\boldsymbol{n}|}{2}
	(u-v)
	\label{eq-dg-hyp-transport-phi}
\end{eqnarray}
\end{subequations}
% ------------------------------------
\subsubsection*{Space discretization}
% ------------------------------------
In this section, we consider first the semi-discretization 
with respect to space while the problem remains continuous
with respect to time.
The semi-discrete problem writes in variational
form~\citep[p.~100]{PieErn-2012}:

\ \ $(P)_h$: \emph{find $u_h\in C^1([0,T],X_h)$ such that}
\begin{eqnarray*}
  \int_\Omega
    \Frac{\partial u_h}{\partial t}
    v_h
    \,{\rm d}x
  -
  \int_\Omega
    {\bf f}(u_h)
    .\nabla_h v_h
    \,{\rm d}x
  +
  \sum_{S\in \mathcal{S}_h^{(i)}}
  \int_S
    \Phi({\bf n};\,u_h^-,u_h^+)
    \jump{v_h}
    \,{\rm d}s
  +
  \int_{\partial\Omega}
    \Phi({\bf n};\,u_h,g)
    v_h
    \,{\rm d}s
  &=& 0,
  \ \ \forall v_h\in X_h
  \\
  u_h(t\!=\!0) &=& \pi_h(u_0)
\end{eqnarray*}
where $\pi_h$ denotes the Lagrange
interpolation operator on $X_h$
and others notations has been introduced in the
previous section.

For convenience, we introduce the
discrete operator $G_h$, defined for all 
$u_h,v_h\in X_h$ by
\begin{eqnarray}
  \int_\Omega
    G_h(u_h)
    v_h
    \,{\rm d}x
  =
  -
  \int_\Omega
    {\bf f}(u_h)
    .\nabla_h v_h
    \,{\rm d}x
  +
  \sum_{S\in \mathcal{S}_h^{(i)}}
    \int_S
    \Phi({\bf n};\,u_h^-,u_h^+)
    \jump{v_h}
    \,{\rm d}s
  +
  \int_{\partial\Omega}
    \Phi({\bf n};\,u_h,g)
    v_h
    \,{\rm d}s
  \label{eq-dg-hyp-def-Gh}
\end{eqnarray}
For a given $u_h\in X_h$, we also define the linear form $g_h$ as
\begin{eqnarray*}
  g(v_h)
  &=&
  \int_\Omega
    G_h(u_h)
    v_h
    \,{\rm d}x
\end{eqnarray*}
As the matrix $M$, representing the $L^2$ scalar product in $X_h$,
is block-diagonal, it can be easily inverted
at the element level, and for a given $u_h\in X_h$,
we have $G(u_h)=M^{-1}g_h$.
%
Then, the problem
writes equivalently as a set of coupled
nonlinear ordinary differential equations.

\ \ $(P)_h$: \emph{find $u_h\in C^1([0,T],X_h)$ such that}
\begin{eqnarray*}
    \Frac{\partial u_h}{\partial t}
    +
    G_h(u_h)
    &=&
    0
\end{eqnarray*}

% ---------------------------------------
\subsubsection*{Time discretization}
% ---------------------------------------
\label{sec-hyperbolic-runge-kutta}%
\cindex{method!Runge-Kutta scheme}%

% TODO: pas clair: Gh ici et lh(vh) dans le code
%       et on ne sais pas d'ou vient inv_m*lh
Let $\Delta t>0$ be the time step.
The previous nonlinear ordinary differential equations
are discretized by using a specific explicit Runge-Kutta
with intermediates states~\citep{ShuOsh-1988,GotShu-1998,GotShuTad-2001}.
This specific variant of the usual Runge-Kutta scheme,
called \emph{strong stability preserving},
is suitable for avoiding possible spurious oscillations of the approximate
solution when the exact solution has a poor regularity.
Let $u_h^n$ denotes the approximation of $u_h$ at
time $t_n=n\Delta t$, $n\geq 0$.
Then $u_h^{n+1}$ is defined by 
recurrence:
\begin{eqnarray*}
  u_h^{n,0} &=& u_h^n	
    \\
  u_h^{n,i} &=& 
	\sum_{j=0}^{i-1}
	   \alpha_{i,j} u_h^{n,j}
           -
	   \Delta t\,\beta_{i,j} G_h\left(u_h^{n,j}\right)
	, \ \ 1\leq i\leq p
    \\
  u_h^{n+1} &=& u_h^{n,p}	
\end{eqnarray*}
where the coefficients satisfy $\alpha_{i,j}\geq 0$
and $\beta_{i,j}\geq 0$
for all $1\leq i\leq p$ and $0\leq j\leq i-1$,
and 
\mbox{$
  \sum_{j=0}^{i-1} \alpha_{i,j}=1
$}
for all $1\leq i\leq p$.
\cindex{method!Euler explicit scheme}%
Note that when $p=1$ this scheme coincides with the usual
explicit Euler scheme.
For a general $p\geq 1$ order scheme, there are $p-1$ intermediate states
$u_h^{n,i}$, $i=1\ldots p-1$.
%
% ---------------------------------------
\myexamplenoinput{runge_kutta_ssp.icc}
% ---------------------------------------
Computation of the coefficients 
$\alpha_{i,j}$
and $\beta_{i,j}$
can be founded in~\citep{ShuOsh-1988,GotShu-1998,GotShuTad-2001}
and are grouped in file~\file{runge_kutta_ssp.icc} 
of the examples directory for convenience.