state_roP_withR Subroutine

public subroutine state_roP_withR(ro, p, r, e, T, c)

State from (ro,p) when r is already known (e.g. carried as a conservative variable): e, T, c. Solves for T internally.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: p
real(kind=dp), intent(in) :: r
real(kind=dp), intent(out) :: e
real(kind=dp), intent(out) :: T
real(kind=dp), intent(out) :: c

Calls

proc~~state_rop_withr~~CallsGraph proc~state_rop_withr state_roP_withR proc~jacobian_rot jacobian_roT proc~state_rop_withr->proc~jacobian_rot proc~t_rop T_roP proc~state_rop_withr->proc~t_rop proc~eos_terms eos_terms proc~jacobian_rot->proc~eos_terms proc~brent brent proc~t_rop->proc~brent proc~fill_f_terms fill_f_terms proc~t_rop->proc~fill_f_terms proc~fill_g_dreg_terms fill_g_Dreg_terms proc~t_rop->proc~fill_g_dreg_terms f f proc~brent->f proc~set_error set_error proc~brent->proc~set_error proc~zero zero proc~brent->proc~zero proc~eos_terms->proc~fill_f_terms proc~eos_e_terms eos_e_terms proc~eos_terms->proc~eos_e_terms proc~fill_e_tpart fill_e_Tpart proc~eos_e_terms->proc~fill_e_tpart proc~fill_ff_terms fill_ff_terms proc~eos_e_terms->proc~fill_ff_terms proc~zero->f proc~fill_e_tpart->proc~fill_g_dreg_terms

Called by

proc~~state_rop_withr~~CalledByGraph proc~state_rop_withr state_roP_withR proc~solve_boundary_pt solve_boundary_PT proc~solve_boundary_pt->proc~state_rop_withr proc~boundary_resolution_from_and_to_ports boundary_resolution_from_and_to_ports proc~boundary_resolution_from_and_to_ports->proc~solve_boundary_pt proc~main_loop main_loop proc~main_loop->proc~boundary_resolution_from_and_to_ports program~reims_p reims_p program~reims_p->proc~main_loop

Source Code

subroutine state_roP_withR(ro, p, r, e, T, c)
    !! State from (ro,p) when r is already known (e.g. carried as a
    !! conservative variable): e, T, c. Solves for T internally.
    real(dp), intent(in)  :: ro, p, r
    real(dp), intent(out) :: e, T, c
    real(dp) :: dPdRo, dPdT, dTdRo, cv

    T = T_roP(ro, p)
    call jacobian_roT(ro, T, cv, dPdT, dTdRo=dTdRo)
    dPdRo = -dTdRo*dPdT
    c = sqrt(dPdRo + T*(dPdT**2)/(cv*(ro**2)))
    e = (r - p)/ro
end subroutine state_roP_withR