• No results found

Numerical methods

4.2 The Godunov-type method

The finite-volume Godunov method is employed in this work to compute the governing equations solu-tions. This method was developed by Godunov [109] as an answer to the problem of conservation of the CIR method of Courant, Isaacson and Rees [173] applied to non-linear systems of hyperbolic laws.

The general framework of the method is described here with the presentation of the Initial Boundary-Value Problem (IBVP) before a slight variation of it named the method of lines employed in this work is discussed. The interested reader should refer to Toro [278] for more information.

4.2.1 Initial Boundary-Value Problem

The IBVP represents the most general formulation of the Godunov method, and is briefly presented here in a one dimensional formulation as an introduction to the methodology. It can readily be extended to further space dimensions. The general IBVP for a system of hyperbolic conservation laws in a domain x ∈ [0 ; l] is described by,

∂U

∂t +∂F (U)

∂x = 0 (4.39)

where the initial value is given by U (x, 0) = U0(x), and the boundary values by U (0, t) = UL(t) and U (l, t) = UR(t).

To account for the presence of discontinuities in the solution, such as shocks, the integral form of the equations is retained in a control volume defined by [x1; x2] × [t1; t2],

Z x2

x1

U (x, t2) dx = Z x2

x1

U (x, t1) dx + Z t2

t1

F (x1, t) dt − Z t2

t1

F (x2, t) dt (4.40)

The Godunov method is usually a two-step method, where the first step is referred to as the recon-struction step, whilst the second one is the resolution of the Riemann problem.

In the first step, an appropriate distribution of initial data is assumed at a given time tnand denoted U (x, tn). The flow variables are initialised in the discretised domain assuming a cell average value in each finite volumes, as illustrated on Fig. 4.2and estimated by,

Uni = 1

∆x

Z xi+1/2

xi−1/2

U (x, tn) dx (4.41)

The next step is to solve the IBVP described by Eq. 4.39 assuming the piecewise distribution of Eq. 4.41. This approach leads to the definition of local Riemann problems at each inter-cell boundaries with the left and right boundary values given respectively by Uni and Uni+1, and further denoted by RP Uni, Uni+1

. The formulation of the inter-cell Riemann problem is given by,

∂U

∂t +∂F

∂x = 0 (4.42)

U (x, tn) =

( Uni x < xi+1/2

Uni+1 x > xi+1/2

(4.43)

The general solution of the Riemann problem is a similarity solution depending only on the ratio x/t, and the boundaries given by UL and UR. A typical situation of two Riemann problems at the left and right of a given volume is presented in Fig.4.1.

Assuming that the time-step is chosen to avoid interactions between the wave emerging from both sides of the cell, the global solution U (x, t), with x ∈ [0 ; l] and t ∈ 

tn; tn+1

as a function of the Riemann solution gives,

U (x, t) = Uni+1/2(x, t) , x ∈ [xi; xi+1] (4.44) where Uni+1/2(x, t) is the solution of RP Uni, Uni+1

. The solution can then be advanced in time, which is directly performed by means of averaging U (x, t) at each cell as depicted in Fig.4.1, following,

Un+1i = 1

Figure 4.1: Riemann problem wave pattern emerging at the boundaries of a given volume and averaging of the solution in x ∈xi−1/2; xi+1/2 [278]

The integration being a complex numerical operation since the exact expression of the local Riemann problem is required at each inter-cell position, the integral form of the equation is used,

Z xi+1/2 where the left-hand side term and the first term on the right-hand side represent respectively the average values of the solution U (x, t) at time tn and tn+1 as given in Eq. 4.41 and Eq. 4.45. Additionally, U xi−1/2, t

and U xi+1/2, t

represent the solutions of the Riemann problems on both sides of the control volume, along the respective inter-cell positions xi−1/2and xi+1/2. By recalling the assumption that the time-step is small enough to avoid interactions between the different waves, these solutions correspond to the similarity solutions of the Riemann problems along their characteristic lines defined by x/t = 0. It can therefore be written,

F U xi−1/2, t re-spectively along the intercell positions xi−1/2and xi+1/2.

Thus, the Godunov formulation allowing the evolution of the solution in time from tn to tn+1is given by, and the whole process is depicted in Fig.4.2. The standard form of the method presented here is linear and according to Godunov’s theorem is first-order accurate.

4.2.2 The method of lines

The Godunov formulation presented in the previous section corresponds to the explicit, fully-discrete form of the method, where both spatial and temporal integrations are carried out simultaneously. The

Figure 4.2: Geometric interpretation of the first-order Godunov method [132]

formulation used in the present work is slightly different and is known as the method of lines in which both integrations are decoupled.

We can rewrite the IBVP problem described by Eq. 4.39 by assuming a spatial discretisation and keeping the time continuous, resulting in an Ordinary Differential Equation (ODE) system,

dU (t) dt = 1

∆x Fi−1/2− Fi+1/2

 (4.50)

where the inter-cell fluxes are approximations of the true fluxes given by F (U (x, t)) at the corresponding interfaces and time instants. A direct choice for the estimation of the fluxes resides in the Godunov method discussed previously.

To advance the solution in time, the ODE given in Eq.4.50needs to be solved. There are numerous methodologies available to solve ODEs numerically, the simplest of all being the first-order explicit Euler time integration leading to the Godunov formulation presented in Eq.4.49. Other approaches consist in using multi-step algorithms to increase both the stability range and order of accuracy. Several of these methods are regrouped in the class of so-called explicit multi-step Runge-Kutta methods.

Considering the system of governing equation in curvilinear coordinates derived in §. 4.1.2and pre-sented in Eqs.4.28-4.38, the application of the method of lines results in,

∂JU

∂t = 1

∆ξ ∆Fξi−1/2,j,k− ∆Fξi+1/2,j,k



+ 1

∆η ∆Gηi,j−1/2,k− ∆Gηi,j+1/2,k



+ 1

∆ζ ∆Hζi,j,k−1/2− ∆Hζi,j,k+1/2

+ JSi,j,k (4.51)

where the notation ∆Fξ denotes the difference between hyperbolic and viscous fluxes as follows,

∆Fξi−1/2,j,k= Fξi i−1/2,j,k− Fξv i−1/2,j,k (4.52) Finally, it is common practice when using generalised curvilinear coordinates to normalise the

com-putation plane, and thus ∆ξ = ∆η = ∆ζ = 1, leading to the final expression of the method of lines,

∂JU

∂t =∆Fξi−1/2,j,k− ∆Fξi+1/2,j,k

+∆Gηi,j−1/2,k− ∆Gηi,j+1/2,k

+∆Hζi,j,k−1/2− ∆Hζi,j,k+1/2+ JSi,j,k (4.53)

§. 4.3.1details the computation of the Godunov fluxes through the use of an approximate Riemann solver, while §.4.4presents the computation of the viscous fluxes and source terms. The time integration schemes used in this work are discussed in §. 4.5.