2.2 Numerical Methods
2.2.2 Basic Principles of GRID-codes
Another very promising and widely used approach to solve the hydrodynamical equations is presented by the Grid-codes. In this framework, various methods to solve the differential equations in terms of grid points have been proposed.
All grid-methods divide the fluid into separate cells called the mesh. An example is shown in Fig. 2.1. A common scenario to solve partial differential equations, in particular the fluid equations (eq. 2.15) is known as discretization, while a further improvement is provided by the Riemann-Solvers. We motivate both approaches below:
• DISCRETIZATION METHODS: A very simple method is to transform the regarded equations
into an discretized form. For example, consider the one-dimensional scalar equation ∂A
∂t +b
∂A
2.2. NUMERICAL METHODS 13
where b is a positive constant. We seek the solution A(x,t), with the following initial conditions,
A(x,0) =Ψ(x). (2.46)
Assuming that the mesh spacing ∆x, and the time step∆t are constant, the solution A(x,t)can be expressed by the analogous discretized solution at the mesh cell j and time level n as Anj, which is located at the center of the cell in physical space (see also Fig. 2.1). By replacing the derivatives of eq. (2.45) with one-sided finite difference approximations the equation becomes,
Anj+1−Anj ∆t +O(∆t) +b Anj−Anj−1 ∆x +O(∆x) = 0 for b>0 (2.47) Anj+1−Anj ∆t +O(∆t) +b Anj+1−Anj ∆x +O(∆x) = 0 for b<0. (2.48)
This scenario applies the one-sided forward differencing in time. Depending on whether b is positive or negative, the left side of the grid point j is called upwind side for b>0 (downwind side for b<0), while the right is called downwind side for b>0, (upwind side for b<0). If the error terms are dropped, the discrete evolution equation for An
j follows as, Anj+1 = Anj+b∆t ∆x A n j−1−Anj for b>0, (2.49) Anj+1 = Anj+b∆t ∆x A n j−Anj+1 for b<0, (2.50)
where the term b∆∆xt determines the stability of the scheme, and is called CFL (Courant, Friedrichs, and Lewy) number. The scheme is stable, if
b∆t ∆x ≤ 1. (2.51)
There exist various simple finite difference schemes, e.g. downwind differencing or centered differencing.
• RIEMANN SOLVERS: These schemes are used to solve Riemann problems (RP), such as the
hydrodynamical fluid equations. The RP’s are fundamental to study the interaction between waves, and allow to analyze the micro-wave structure of the flows. Properties like shocks and rare-fraction waves appear as characteristics in the solution. RP’s consist of conservation laws together with piecewise constant data including a single discontinuity. Thus, they appear naturally in grid codes, which solve conservation laws on discrete grids.
For example, a simple, one dimensional RP has the initial state of,
A(x,0) =
AL for x≤0,
AR for x>0,
(2.52) which is constant for x≤0 and x>0, but differs between left and right. Such a system can be identified with a one dimensional hydrodynamic problem, where initially gas with a certain temperature and density is confined at the left side of a removable barrier, and another gas of different temperature and density at the right side. The barrier is removed at t =0 and the
system begins to evolve5.
For the Euler equations (eq. (2.7)), the RP is defined as: ρ,v,P=
ρL,vL,PL for x≤0,
ρR,vR,PR for x>0, (2.53)
It is much more complex due to the nonlinear nature of eq. (2.7). Analytical solutions can be obtained only for special cases. The majority of RP’s are solved numerically.
The first exact numerical solver was introduced by Godunov (1959). It is an extension to the discretization method (as discussed above) for solving nonlinear-systems of hyperbolic conser- vation laws. Consider Fig. 2.1 with the numerical solution at tn given by Anj, which is located
at the cell-center xj. The interface between two cells resides at xj+1/2. At each time step the
state within each cell is constant (piecewise constant). Yet, at the interfaces the state variables describe a jump. This construct resembles the definition of a RP, here within two adjacent cells. The solution at each interface characterizes the subgrid analytic evolution of the hydrodynamic system.
Based on Godunovs-Theorem (Godunov, 1954), which states that linear numerical schemes that are used to solve partial differential equations are first-order accurate, various methods of ap- proximate solvers have been proposed, e.g. Roe solver (Roe, 1981), HLLC solver (Harten et al., 1983), HLLE solver (Harten et al., 1983; Einfeld, 1988), and Rotated-hybrid Riemann solvers (Nishikawa & Kitamura, 2008).
5 These so called shock tube tests are very common to test the accuracy of numerical hydrodynamical schemes (e.g. Sod,