Compute waves speed u23 algorithm.
Use Primitive Variables Linearization algorithm by means of only u23 approximation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(riemann_pattern_compressible_pvl), | intent(inout) | :: | self | Riemann (states) pattern solution. |
pure subroutine compute_waves_u23(self)
!< Compute waves speed `u23` algorithm.
!<
!< Use Primitive Variables Linearization algorithm by means of only `u23` approximation.
class(riemann_pattern_compressible_pvl), intent(inout) :: self !< Riemann (states) pattern solution.
real(R8P) :: x !< Dummy variable.
call self%compute_u23
! compute left state
if (self%u23 < self%u_1) then ! shock
x = 0.25_R8P * (self%eos_1%g() + 1._R8P) * (self%u23 - self%u_1) / self%a_1
self%s_1 = self%u_1 + self%a_1 * (x - sqrt(1.0_R8P + x * x))
else ! rarefaction
self%s_1 = self%u_1 - self%a_1
endif
! compute right state
if (self%u23 > self%u_4) then ! shock
x = 0.25_R8P * (self%eos_4%g() + 1._R8P) * (self%u23 - self%u_4) / self%a_4
self%s_4 = self%u_4 + self%a_4 * (x + sqrt(1.0_R8P + x * x))
else ! rarefaction
self%s_4 = self%u_4 + self%a_4
endif
endsubroutine compute_waves_u23