compute_roe_averages Subroutine

private pure subroutine compute_roe_averages(rho_L, u_L, h_L, rho_R, u_R, h_R, gam, u_roe, h_roe, c_roe)

Compute Roe-averaged velocity, enthalpy, and sound speed.

Uses √ρ-weighted averages (Roe 1981): ũ = (√ρ_L u_L + √ρ_R u_R)/(√ρ_L + √ρ_R), H̃ similarly. c̃ = √((γ-1)(H̃ - ũ²/2))

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: rho_L
real(kind=wp), intent(in) :: u_L
real(kind=wp), intent(in) :: h_L
real(kind=wp), intent(in) :: rho_R
real(kind=wp), intent(in) :: u_R
real(kind=wp), intent(in) :: h_R
real(kind=wp), intent(in) :: gam

Ratio of specific heats γ

real(kind=wp), intent(out) :: u_roe

Roe-averaged velocity

real(kind=wp), intent(out) :: h_roe

Roe-averaged velocity Roe-averaged specific enthalpy

real(kind=wp), intent(out) :: c_roe

Roe-averaged velocity Roe-averaged specific enthalpy Roe-averaged sound speed