NumMeth-22: Godunov
This commit is contained in:
@@ -97,7 +97,7 @@ and stability.
|
||||
|
||||
\vfill
|
||||
|
||||
No bathing ducks were endangered in the preparation of this exercise sheet. Except
|
||||
No rubber ducks were endangered in the preparation of this exercise sheet. Except
|
||||
the ones that were already in the tube. What are they looking for? For real.
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
+114
-1
@@ -3656,7 +3656,120 @@ to be stable provided
|
||||
\begin{align}
|
||||
\left\vert \frac{k}{h} f^\prime(U_j^n)\right\vert \leq 1
|
||||
\end{align}
|
||||
for all $U_j^n$.
|
||||
for all $U_j^n$. However, we have seen for the linear advection equation that Lax-
|
||||
Friedrichs is generally more dissipative than the upwind method, and gives less accurate
|
||||
solutions. This is not surprising since the theory of characteristics tells us that the solution at $x_j$ depends only on the data to the left of $x_j$ and the upwind method takes advantage of this knowledge. In fact, for the advection equation we know that
|
||||
\begin{align}
|
||||
u(x_j,t^{n+1}) = u(x_j- a k, t^n)
|
||||
\end{align}
|
||||
and both upwind and Lax-Friedrichs can be viewed as interpolation formulas to approximate $u$ at $x_j - a k$ from the values of $u$ at the grid points. Upwind is better because it
|
||||
interpolates using values at the two nearest grid points $x_{j-1}$ and $x_j$
|
||||
\begin{align}
|
||||
U_j^{n+1} = \frac{1}{h}\left[(h- ak) U_j^n + a k U_{j-1}^n \right]
|
||||
\end{align}
|
||||
whereas Lax-Friedrichs interpolates using values a $x_{j-1}$ and $x_{j+1}$
|
||||
\begin{align}
|
||||
U_j^{n+1} = \frac{1}{2h}\left[ (h-ak) U_{j+1}^n + (h+ak)U_{j-1}^n \right]
|
||||
\end{align}
|
||||
By doing upwind differencing in the appropriate direction for each characteristic component in a system of equations we can hope to obtain a similar improvement and decrease
|
||||
the numerical dissipation.
|
||||
|
||||
Looking ahead, there are other reasons for introducing methods based on the solution
|
||||
of Riemann problems. Both Lax-Friedrichs and the upwind method are only first order
|
||||
accurate on smooth data, and even the less dissipative upwind method gives unacceptably
|
||||
smeared shock profiles. We ultimately want to correct these deficiencies by developing
|
||||
``high resolution'' methods that are second order accurate in smooth regions and give much
|
||||
sharper discontinuities. However, our experience with the linear advection equation indicates that natural second order methods, even one-sided methods like
|
||||
Beam-Warming, give oscillatory solutions. We will be able to cure this only by using more
|
||||
information about the local behavior of the solution. The first order Godunov method
|
||||
introduced here forms a basis for many of the high resolution generalizations that will be
|
||||
studied later.
|
||||
|
||||
\subsection{The Courant-Isaacson-Rees method}
|
||||
|
||||
Historically, one of the first attempts at upwinding for the equations of gas dynamics
|
||||
was made by Courant, Isaacson and Rees in 1952. They proposed solving certain
|
||||
equations along the characteristics going back from the point $(x_j, t^{n+1})$ To evaluate the
|
||||
characteristic variables at time $t^n$, this method uses interpolation based on the two nearest grid values, which are $(U_{j-1}^n, U_j^n)$ or $(U_j^n, U_{j+1}^n)$ depending on whether the corresponding characteristic speed is positive or negative. Of course the exact path of the characteristic is not known, but is approximated by a straight line with slope $\lambda_p(U_j^n)$. This is schematically illustrated in Figure \ref{fig:leveque_13.1}.
|
||||
|
||||
For the scalar advection equation this reduces to the upwind method. For a scalar
|
||||
nonlinear problem, in which $u$ is constant along characteristics, it reduces to determining
|
||||
$U_j^{n +1}$ by an approximation to $U$ at the point $x_j - f^\prime(U_j^n )k$ obtained by linear interpolation of the data $U^n$. For example, if $f^\prime(U_j^n) > 0$ then we would interpolate between $U_{j-1}^n$ and $U_j^n$
|
||||
\begin{align}
|
||||
U_j^{n+1} &= \frac{1}{h}\left[(h-f^\prime(U_j^n)k) U_j^n + f^\prime(U_j^n) k U_{j-1}^n \right]\\
|
||||
&= U_j^n -\frac{k}{h} f^\prime(U_j^n)\left[ U_{j-1}^n\right]
|
||||
\end{align}
|
||||
|
||||
\begin{figure}
|
||||
\begin{center}
|
||||
\pgfimage[width=.6\textwidth]{fig_chapter5/fig_leveque13.1}
|
||||
\end{center}
|
||||
\caption{ In the CIR method, characteristics are traced back from $(x_j, t^{n+1})$ and linear interpolation used at time $t^n$.}
|
||||
\label{fig:leveque_13.1}
|
||||
\end{figure}
|
||||
|
||||
This is a natural upwind approximation to $\partial_t u +f'(u)\partial_x u = 0$, but this is not a good method for a problem involving shocks, since it is not in conservation form.
|
||||
|
||||
\subsection{Godunov's method}
|
||||
|
||||
In 1959, Godunov proposed a way to make use of the characteristic information within
|
||||
the framework of a conservative method. Rather than attempting to follow characteristics backwards in time, Godunov suggested solving Riemann problems forward in time.
|
||||
Solutions to Riemann problems are relatively easy to compute, give substantial information about the characteristic structure, and lead to conservative methods since they are
|
||||
themselves exact solutions of the conservation laws and hence conservative.
|
||||
|
||||
In Godunov's method, we use the numerical solution $U^n$ to define a piecewise constant
|
||||
function $\tilde{u}^n(x, t^n)$ with the value $U_j^n$ on the grid cell $x_{j-1/2} < x < x_{j+1/2}$. At time in this agrees with the piecewise constant function $U_k(x, t^n)$ that has already been introduced, but the function $\bar{u}^n$, unlike $U_k$, will not be constant over in $t^n \leq t < t^{n+1}$. Instead, we use $\tilde{u}^n(x,t^n)$ as initial data for the conservation law, which we now solve exactly to obtain $\tilde{u}^n(x, t)$ for $t^n \leq r \leq t^{n+1}$. The equation can be solved exactly over a short time interval
|
||||
because the initial data $\tilde{u}^n(x, t^n)$ is piecewise constant, and hence defines a sequence of Riemann problems. The exact solution, up to the time when waves from neighboring
|
||||
Riemann problems begin to interact, is obtained by simply piecing together these Riemann
|
||||
solutions. This is illustrated in Figure \ref{fig:leveque_13.2}.
|
||||
|
||||
|
||||
|
||||
|
||||
\begin{figure}
|
||||
\begin{center}
|
||||
\pgfimage[width=.6\textwidth]{fig_chapter5/fig_leveque13.2}
|
||||
\end{center}
|
||||
\caption{Solution of independent Riemann problems for the piecewise constant data
|
||||
$\bar{u}^n(x, t^n)$ in the case $m = 2$.}
|
||||
\label{fig:leveque_13.2}
|
||||
\end{figure}
|
||||
|
||||
After obtaining this solution over the interval $[t^n,t^{n+1}]$, we define the approximate solution $U^{n+1}$ at time $t^{n+1}$ by averaging the exact solution at time $t^{n+1}$
|
||||
\begin{align}
|
||||
U_j^{n+1} = \frac{1}{h} \int_{x_{j-1/2}}^{x_{j+1/2}} \dd x \tilde{u}^n(x,t^{n+1})
|
||||
\label{eq:leveque13.6}
|
||||
\end{align}
|
||||
These values are then used to define new piecewise constant data $\tilde{u}^{n+1}(x,t^{n+1})$ and the process repeats.
|
||||
|
||||
In practice this algorithm is considerably simplified by observing that the cell average
|
||||
\eqref{eq:leveque13.6} can be easily computed using the integral form of the conservation law. Since $\tilde{u}^n$ is assumed to be an exact weak solution, we know that
|
||||
\begin{align}
|
||||
\int_{x_{j-1/2}}^{x_{j+1/2}} \dd x \tilde{u}^n(x,t^{n+1}) = \int_{x_{j-1/2}}^{x_{j+1/2}} \dd x \tilde{u}^n(x,t^{n}) + \int_{t^n}^{t^{n+1}} \dd t f(\tilde{u}(x_{j-1/2},t)\\
|
||||
- \int_{t^n}^{t^{n+1}} \dd t f(\tilde{u}(x_{j+1/2},t)
|
||||
\label{eq:leveque13.6}
|
||||
\end{align}
|
||||
Dividing by $h$, using \eqref{eq:leveque13.6}, and noting that $\tilde{u}^n(x,t^n) = U_j^n$ over the cell $(x_{j-1/2},x_{j+1/2}$ this equation reduces to
|
||||
\begin{align}
|
||||
U_j^{n+1} = U_j^n - \frac{k}{h}\left[ F(U_j^n,U_{j+1}^n) - F(U_{j-1}^n,U_j^n) \right]
|
||||
\end{align}
|
||||
where the numerical flux function $F$ is given by
|
||||
\begin{align}
|
||||
F(U_j^n,U_{j+1}^n) = \frac{1}{k} \int_{t^n}^{t^{n+1}} \dd t f(\tilde{u}^n(x_{j+1/2},t))
|
||||
\label{eq:leveque13.8}
|
||||
\end{align}
|
||||
This shows that Godunov's method can be written in conservation form. Moreover, note
|
||||
that the integral we need to compute in \eqref{eq:leveque13.8} is trivial because $\tilde{u}^n$ is constant at the point $x_{j+1/2}$ over the time interval $(t^n, t^{n+1})$. This follows from the fact that the solution of the Riemann problem at $x_{j+1/2}$ is a similarity solution, constant along each ray $(x-x_{j+1/2})/t =
|
||||
constant$.
|
||||
|
||||
The constant value of $\tilde{u}^n$ along the line $x=x_{j+1/2}$ depends only on the data $U_j^n$ and $U_j^{n+1}$ for this Riemann problem. If we denote this value by $u^*(U_j^n,U_{j+1}^n)$, the flux \eqref{eq:leveque13.8} reduces to
|
||||
\begin{align}
|
||||
F(U_j^n,U_{j+1}^n) = \frac{1}{k} \int_{t^n}^{t^{n+1}} \dd t f(u^*(x_{j+1/2},t)
|
||||
\end{align}
|
||||
and Godunov's method becomes
|
||||
\begin{align}
|
||||
U_j^{n+1} = U_j^n-\frac{k}{h} \left[\right]
|
||||
\end{align}
|
||||
|
||||
%- Finite Differenzen
|
||||
%- Finite Volumina
|
||||
|
||||
Reference in New Issue
Block a user