state_roP Subroutine

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

Full state from (ro,p): r, 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(out) :: r
real(kind=dp), intent(out) :: e
real(kind=dp), intent(out) :: T
real(kind=dp), intent(out) :: c

Calls

proc~~state_rop~~CallsGraph proc~state_rop state_roP proc~jacobian_rot jacobian_roT proc~state_rop->proc~jacobian_rot proc~t_rop T_roP proc~state_rop->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~~CalledByGraph proc~state_rop state_roP proc~circulator_dynamic_parameters_f circulator_dynamic_parameters_t%circulator_dynamic_parameters_f proc~circulator_dynamic_parameters_f->proc~state_rop proc~function_of_pstar_pt function_of_pstar_PT proc~function_of_pstar_pt->proc~state_rop proc~incoming_branch_cold_circulator incoming_branch_cold_circulator proc~incoming_branch_cold_circulator->proc~state_rop proc~outgoing_branch_cold_circulator outgoing_branch_cold_circulator proc~outgoing_branch_cold_circulator->proc~state_rop proc~outgoing_branch_cold_circulator->proc~circulator_dynamic_parameters_f proc~solve_boundary_mt solve_boundary_MT proc~solve_boundary_mt->proc~state_rop proc~solve_boundary_pt solve_boundary_PT proc~solve_boundary_pt->proc~state_rop proc~solve_boundary_pt->proc~function_of_pstar_pt proc~solve_junction solve_junction proc~solve_junction->proc~state_rop proc~boundary_resolution_from_and_to_ports boundary_resolution_from_and_to_ports proc~boundary_resolution_from_and_to_ports->proc~solve_boundary_mt proc~boundary_resolution_from_and_to_ports->proc~solve_boundary_pt proc~circulator_resolution_from_and_to_ports circulator_resolution_from_and_to_ports proc~circulator_resolution_from_and_to_ports->proc~incoming_branch_cold_circulator proc~circulator_resolution_from_and_to_ports->proc~outgoing_branch_cold_circulator proc~junction_resolution_from_and_to_ports Junction_resolution_from_and_to_ports proc~junction_resolution_from_and_to_ports->proc~solve_junction proc~main_loop main_loop proc~main_loop->proc~boundary_resolution_from_and_to_ports proc~main_loop->proc~circulator_resolution_from_and_to_ports proc~main_loop->proc~junction_resolution_from_and_to_ports program~reims_p reims_p program~reims_p->proc~main_loop

Source Code

subroutine state_roP(ro, p, r, e, T, c)
    !! Full state from (ro,p): r, e, T, c. Solves for T internally.
    real(dp), intent(in)  :: ro, p
    real(dp), intent(out) :: r, e, T, c
    real(dp) :: dPdRo, dPdT, dTdRo, cv

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