Figure 5: schematic representation of the two-step Lax Wendroff scheme This scheme is second-order, it is more accurate than a first-order scheme. Nevertheless, it creates instabilities if there are high rates of change in the flow field which is the case with shock waves. It is to be noted that this difficulty is intrinsic to all centered finite difference shemes of orders greater than 1. Therefore a flux limiter is applied in order to prevent discontinuities from creating spurious oscillations. Following Basset et al. [10] a symmetric TVD flux limiter due to Davis [11] is used. It consists in adding a correction
+1/2n+1/2 Fin+1/2at Fi+1/2before applying the second step.
From Figure 5, it can be observed that the numerical scheme cannot be applied at pipe end cells since one cell is missing (on the left or on the right). The method of characteristics (MOC) is then used to propagate the information required by the boundary calculations across the pipe end meshes. With the MOC, the governing equations (continuity, momentum and energy) are transformed into a new equivalent system with a new set of variables λin, λout and aA defined as
λin=a+
λout
γ 1
γ 1=a u,
u,
p
aA=a
ref
γ 1γ
,
where γ = cp/cv the specific heat ratio. The variables λin, λout are called Riemann variables - u is chosen positive for flow going out of the pipe - and aA is the entropy level, homogeneous to a velocity and a way to measure the entropy of the flow s as it can be observed on Figure 6 – pref is a reference value for the pressure.