This is a well-balanced second order scheme, which is a Reimann problem solver free scheme (central scheme) while at the same time it takes the advantage of the upwind scheme by utilizing the local, one side speed of propagation (given by the eigenvalues of the Jacobian matrix) during the calculation of the flux at the cell interfaces.
The central-upwind numerical scheme is presented for one dimensional case.
The semi-discrete (time dependent ODEs) central-upwind scheme can be then written in the following from:
Here, in this function, the right hand side of the previous equation for the solution of KP07 scheme is calculated and returns as a output.
The central upwind numerical fluxes at the cell interfaces are given by:
For calculating the numerical fluxes Hi±½(t) and the values of Ui±½ are needed. These can be calculated as the end points of a piecewise linearly reconstructed function:
The slope si of the reconstructed function in each cell is computed using a limiter function to obtain a non-oscillatory nature of the reconstruction. The KP07 scheme utilizes the generalized minmod limiter as:
The ghost cells that are needed for thiese calculations can be defined in the following way:
Also the one-sided local speed of propagations can be estimated as the largest and the smallest eigen values of the Jacobian of the system as:
This function needs the following input variables:
U[2N,1]
N
Δx
θ
F(U±i±½)[2N,4]
S(U)[2N,1]
λ1,2(U±i±½)[N,4];
z=h+B
). In this case the input state vector U
should include h
,
but the piecewise linear reconstruction of states will be done with z
In order to calculate matrix F
and eigenvalues, it is possible to take out of the
function the piecewise linear reconstruction of states matrix U±i±½
.
This matrix consists of following vectors U±i±½
= [U-i+½ U+i+½
U-i-½ U+i-½]
.
Examples of using this scheme are presented in KP07.TestKPpde.