compute_states23_from_u23 Subroutine

private elemental subroutine compute_states23_from_u23(self, p_2, p_3)

Compute interstates 2 and 3 given (an approximation of) veloctiy S=u23.

Arguments

Type IntentOptional AttributesName
class(riemann_pattern_compressible_object), intent(inout) :: self

Riemann (states) pattern solution.

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

Pressure of state 2.

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

Pressure of state 3.

Calls

proc~~compute_states23_from_u23~~CallsGraph proc~compute_states23_from_u23 compute_states23_from_u23 proc~compute_post_shock compute_post_shock proc~compute_states23_from_u23->proc~compute_post_shock proc~compute_post_rarefaction compute_post_rarefaction proc~compute_states23_from_u23->proc~compute_post_rarefaction
Help


Source Code

   elemental subroutine compute_states23_from_u23(self, p_2, p_3)
   !< Compute interstates 2 and 3 given (an approximation of) veloctiy `S=u23`.
   !<
   !< @Note the pressure of interstates, that should be equal, are returned into separate arguments for allowing a *convergence
   !< checking*, namely if the approximation of `u23` is exact the output is `p_2=p_3=p23`.
   class(riemann_pattern_compressible_object), intent(inout) :: self !< Riemann (states) pattern solution.
   real(R8P),                                  intent(out)   :: p_2  !< Pressure of state 2.
   real(R8P),                                  intent(out)   :: p_3  !< Pressure of state 3.

   associate(s_1=>self%s_1, s_2=>self%s_2, u23=>self%u23, s_3=>self%s_3, s_4=>self%s_4, &
             eos_1=>self%eos_1, eos_4=>self%eos_4,                                      &
             p_1=>self%p_1, r_1=>self%r_1, u_1=>self%u_1, a_1=>self%a_1,                &
             p_4=>self%p_4, r_4=>self%r_4, u_4=>self%u_4, a_4=>self%a_4,                &
             p23=>self%p23, r_2=>self%r_2, a_2=>self%a_2, r_3=>self%r_3, a_3=>self%a_3)
      ! left wave
      if (abs(u23 - u_1) <= ZeroR8) then
          call compute_post_rarefaction(eos=eos_1, sgn=-1._R8P,         &
                                        u0=u_1, p0=p_1, a0=a_1, ux=u23, &
                                        rx=r_2, px=p_2, ax=a_2, s0=s_1, sx=s_2)
      else
         if (u23 < u_1) then
            call compute_post_shock(eos=eos_1, sgn=-1._R8P,         &
                                    u0=u_1, p0=p_1, a0=a_1, ux=u23, &
                                    rx=r_2, px=p_2, ax=a_2, ss=S_1)
            S_2 = S_1
         else
            call compute_post_rarefaction(eos=eos_1, sgn=-1._R8P,         &
                                          u0=u_1, p0=p_1, a0=a_1, ux=u23, &
                                          rx=r_2, px=p_2, ax=a_2, s0=S_1, sx=S_2)
         endif
      endif
      ! right wave
      if (abs(u23 - u_4) <= ZeroR8) then
          call compute_post_rarefaction(eos=eos_4, sgn=1._R8P,          &
                                        u0=u_4, p0=p_4, a0=a_4, ux=u23, &
                                        rx=r_3, px=p_3, ax=a_3, s0=S_4, sx=S_3)
      else
         if (u23 > u_4) then
            call compute_post_shock(eos=eos_4, sgn=1._R8P,          &
                                    u0=u_4, p0=p_4, a0=a_4, ux=u23, &
                                    rx=r_3, px=p_3, ax=a_3, ss=S_4)
            S_3 = S_4
         else
            call compute_post_rarefaction(eos=eos_4, sgn=1._R8P,          &
                                          u0=u_4, p0=p_4, a0=a_4, ux=u23, &
                                          rx=r_3, px=p_3, ax=a_3, s0=S_4, sx=S_3)
         endif
      endif
   endassociate
   endsubroutine compute_states23_from_u23


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