Souza et al. (2023, JAMES) entropy-conservative two-point flux for 2-D compressible Euler in (rho, rhov, rhotheta) variables with p = p0(rhoRd*theta/p0)^gamma.
f_d(rho) = * delta
Pressure here is the total pressure; gravity is handled by the Souza non-conservative term in SourceMethod, not by a flux split.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_t), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | sL(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | sR(1:this%nvar) |
pure function twopointflux2d_ESAtmo2D_t(this,sL,sR) result(flux)
!! Souza et al. (2023, JAMES) entropy-conservative two-point flux for
!! 2-D compressible Euler in (rho, rho*v, rho*theta) variables with
!! p = p0*(rho*Rd*theta/p0)^gamma.
!!
!! f_d(rho) = <rho>_log * <v_d>
!! f_d(rho*v_i) = <rho>_log * <v_i> * <v_d> + <p> * delta_{id}
!! f_d(rho*th) = <rho*theta>_log * <v_d>
!! f_d(Phi) = 0 (geopotential is carried, not advected)
!!
!! Pressure here is the *total* pressure; gravity is handled by the
!! Souza non-conservative term in SourceMethod, not by a flux split.
class(ESAtmo2D_t),intent(in) :: this
real(prec),intent(in) :: sL(1:this%nvar)
real(prec),intent(in) :: sR(1:this%nvar)
real(prec) :: flux(1:this%nvar,1:2)
! Local
real(prec) :: rhoL,uL,vL,thetaL,pL,rthL
real(prec) :: rhoR,uR,vR,thetaR,pR,rthR
real(prec) :: rho_log,rth_log,u_avg,v_avg,p_avg
real(prec) :: gamma
gamma = this%cp/this%cv
! Left primitive variables
rhoL = sL(1)
rthL = sL(4)
thetaL = rthL/rhoL
uL = sL(2)/rhoL
vL = sL(3)/rhoL
pL = this%p0*(rhoL*this%Rd*thetaL/this%p0)**gamma
! Right primitive variables
rhoR = sR(1)
rthR = sR(4)
thetaR = rthR/rhoR
uR = sR(2)/rhoR
vR = sR(3)/rhoR
pR = this%p0*(rhoR*this%Rd*thetaR/this%p0)**gamma
! Logarithmic and arithmetic means
rho_log = log_mean(rhoL,rhoR)
rth_log = log_mean(rthL,rthR)
u_avg = 0.5_prec*(uL+uR)
v_avg = 0.5_prec*(vL+vR)
p_avg = 0.5_prec*(pL+pR)
! x-direction flux (d=1)
flux(1,1) = rho_log*u_avg
flux(2,1) = rho_log*u_avg*u_avg+p_avg
flux(3,1) = rho_log*v_avg*u_avg
flux(4,1) = rth_log*u_avg
flux(5,1) = 0.0_prec
! y-direction flux (d=2)
flux(1,2) = rho_log*v_avg
flux(2,2) = rho_log*u_avg*v_avg
flux(3,2) = rho_log*v_avg*v_avg+p_avg
flux(4,2) = rth_log*v_avg
flux(5,2) = 0.0_prec
endfunction twopointflux2d_ESAtmo2D_t