compute_post_rarefaction Subroutine

private elemental subroutine compute_post_rarefaction(eos, sgn, u0, p0, a0, ux, rx, px, ax, s0, sx)

Compute an unknown state x from a known state 0 when the two states are separated by a rarefaction, given the velocity ux.

The sgn dummy argument indicates if the rarefaction propagates on u-a (sgn=-1) or u+a (sgn=1).

Arguments

Type IntentOptional AttributesName
class(eos_object), intent(in) :: eos

Equation of state.

real(kind=R8P), intent(in) :: sgn

Sign for distinguishing left (-1) from right (1) wave.

real(kind=R8P), intent(in) :: u0

Known state (speed, pressure and speed of sound).

real(kind=R8P), intent(in) :: p0

Known state (speed, pressure and speed of sound).

real(kind=R8P), intent(in) :: a0

Known state (speed, pressure and speed of sound).

real(kind=R8P), intent(in) :: ux

Known speed of unknown state.

real(kind=R8P), intent(out) :: rx

Unknown pressure and density.

real(kind=R8P), intent(out) :: px

Unknown pressure and density.

real(kind=R8P), intent(out) :: ax

Unknown pressure and density.

real(kind=R8P), intent(out) :: s0

Wave speeds (head and back fronts).

real(kind=R8P), intent(out) :: sx

Wave speeds (head and back fronts).

Called By

proc~~compute_post_rarefaction~~CalledByGraph proc~compute_post_rarefaction compute_post_rarefaction proc~compute_states23_from_u23 compute_states23_from_u23 proc~compute_states23_from_u23->proc~compute_post_rarefaction
Help


Source Code

   elemental subroutine compute_post_rarefaction(eos, sgn, u0, p0, a0, ux, rx, px, ax, s0, sx)
   !< Compute an unknown state `x` from a known state `0` when the two states are separated by a rarefaction, given the velocity
   !< `ux`.
   !<
   !< The `sgn` dummy argument indicates if the rarefaction propagates on `u-a (sgn=-1)` or `u+a (sgn=1)`.
   class(eos_object), intent(in)  :: eos        !< Equation of state.
   real(R8P),         intent(in)  :: sgn        !< Sign for distinguishing *left* (-1) from *right* (1) wave.
   real(R8P),         intent(in)  :: u0, p0, a0 !< Known state (speed, pressure and speed of sound).
   real(R8P),         intent(in)  :: ux         !< Known speed of unknown state.
   real(R8P),         intent(out) :: rx, px, ax !< Unknown pressure and density.
   real(R8P),         intent(out) :: s0, sx     !< Wave speeds (head and back fronts).

   ax = a0 + sgn * eos%delta() * (ux - u0)          ! unknown speed of sound
   px = p0 * ((ax / a0) ** (eos%eta()))             ! unknown pressure
   rx = eos%density(pressure=px, speed_of_sound=ax) ! unknown density
   s0 = u0 + sgn * a0                               ! left wave speed
   sx = ux + sgn * ax                               ! right wave speed
   endsubroutine compute_post_rarefaction


add add add_euler array array compute_derivate compute_dt compute_fluxes compute_fluxes compute_fluxes_from_primitive compute_post_rarefaction compute_post_shock compute_roe_state compute_states23_from_u23 compute_u23 compute_up23 compute_waves compute_waves_u23 compute_waves_up23 cons_assign_cons cons_divide_real cons_multiply_cons cons_multiply_real conservative_compressible conservative_compressible_instance conservative_compressible_pointer conservative_to_primitive_compressible cp cv delta density description description description description destroy destroy destroy dEuler_dt energy energy eos_assign_eos eos_compressible eos_compressible_instance eos_compressible_pointer eta euler_assign_euler euler_assign_real euler_local_error euler_multiply_euler euler_multiply_real g gm1 gp1 impose_boundary_conditions initialize initialize initialize initialize initialize initialize initialize initialize initialize initialize left_eigenvectors momentum negative negative output parse_command_line_interface positive positive pressure pressure prim_assign_prim prim_divide_real prim_multiply_prim prim_multiply_real primitive_compressible primitive_compressible_instance primitive_compressible_pointer primitive_to_conservative_compressible R real_multiply_cons real_multiply_euler real_multiply_prim reconstruct_interfaces_characteristic reconstruct_interfaces_conservative reconstruct_interfaces_primitive right_eigenvectors rpat_assign_rpat save_time_serie solve solve solve solve solve speed_of_sound sub sub sub_euler temperature velocity