jacobian_roT Subroutine

public elemental subroutine jacobian_roT(ro, T, cv, dPdT, dTdP, dTdRo, dRdRo, dRdT, r, p, d2TdP_dT, d2TdP_dRo)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: T
real(kind=dp), intent(out) :: cv
real(kind=dp), intent(out) :: dPdT
real(kind=dp), intent(out), optional :: dTdP
real(kind=dp), intent(out), optional :: dTdRo
real(kind=dp), intent(out), optional :: dRdRo
real(kind=dp), intent(out), optional :: dRdT
real(kind=dp), intent(out), optional :: r
real(kind=dp), intent(out), optional :: p
real(kind=dp), intent(out), optional :: d2TdP_dT
real(kind=dp), intent(out), optional :: d2TdP_dRo

Calls

proc~~jacobian_rot~~CallsGraph proc~jacobian_rot jacobian_roT proc~eos_terms eos_terms proc~jacobian_rot->proc~eos_terms proc~eos_e_terms eos_e_terms proc~eos_terms->proc~eos_e_terms proc~fill_f_terms fill_f_terms proc~eos_terms->proc~fill_f_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~fill_g_dreg_terms fill_g_Dreg_terms proc~fill_e_tpart->proc~fill_g_dreg_terms

Called by

proc~~jacobian_rot~~CalledByGraph proc~jacobian_rot jacobian_roT proc~circulator_dynamic_parameters_df circulator_dynamic_parameters_t%circulator_dynamic_parameters_df proc~circulator_dynamic_parameters_df->proc~jacobian_rot proc~derivative_function_of_pstar_pt derivative_function_of_pstar_PT proc~derivative_function_of_pstar_pt->proc~jacobian_rot proc~friction_source_term friction_source_term proc~friction_source_term->proc~jacobian_rot proc~he_prop he_prop proc~friction_source_term->proc~he_prop proc~state_roe state_roE proc~friction_source_term->proc~state_roe proc~state_roe_withr state_roE_withR proc~friction_source_term->proc~state_roe_withr proc~he_prop->proc~jacobian_rot proc~hhh_derivatives HHH_derivatives proc~hhh_derivatives->proc~jacobian_rot proc~incoming_branch_cold_circulator incoming_branch_cold_circulator proc~incoming_branch_cold_circulator->proc~jacobian_rot proc~incoming_branch_cold_circulator->proc~hhh_derivatives proc~jacobian_star_req_rem jacobian_star_Req_rem proc~incoming_branch_cold_circulator->proc~jacobian_star_req_rem proc~state_rop state_roP proc~incoming_branch_cold_circulator->proc~state_rop proc~jacobian_channel_req_rem jacobian_channel_Req_rem proc~jacobian_channel_req_rem->proc~jacobian_rot proc~jacobian_star_req_rem->proc~jacobian_rot proc~jacobian_star_req_rem_loc jacobian_star_Req_rem_loc proc~jacobian_star_req_rem_loc->proc~jacobian_rot proc~jacobian_star_req_rem~2 jacobian_star_Req_rem proc~jacobian_star_req_rem~2->proc~jacobian_rot proc~mdot_derivatives mdot_derivatives proc~mdot_derivatives->proc~jacobian_rot proc~outgoing_branch_cold_circulator outgoing_branch_cold_circulator proc~outgoing_branch_cold_circulator->proc~jacobian_rot proc~outgoing_branch_cold_circulator->proc~circulator_dynamic_parameters_df proc~outgoing_branch_cold_circulator->proc~jacobian_star_req_rem proc~outgoing_branch_cold_circulator->proc~state_rop proc~circulator_dynamic_parameters_f circulator_dynamic_parameters_t%circulator_dynamic_parameters_f proc~outgoing_branch_cold_circulator->proc~circulator_dynamic_parameters_f proc~solve_boundary_mt solve_boundary_MT proc~solve_boundary_mt->proc~jacobian_rot proc~solve_boundary_mt->proc~jacobian_star_req_rem~2 proc~solve_boundary_mt->proc~state_rop proc~solve_boundary_pt solve_boundary_PT proc~solve_boundary_pt->proc~jacobian_rot proc~solve_boundary_pt->proc~derivative_function_of_pstar_pt proc~solve_boundary_pt->proc~jacobian_star_req_rem~2 proc~solve_boundary_pt->proc~state_rop proc~state_rop_withr state_roP_withR proc~solve_boundary_pt->proc~state_rop_withr proc~state_rot state_roT proc~solve_boundary_pt->proc~state_rot proc~function_of_pstar_pt function_of_pstar_PT proc~solve_boundary_pt->proc~function_of_pstar_pt proc~solve_junction solve_junction proc~solve_junction->proc~jacobian_rot proc~solve_junction->proc~jacobian_star_req_rem_loc proc~solve_junction->proc~state_rop proc~sourceterms_notfriction_channel SourceTerms_NOTfriction_channel proc~sourceterms_notfriction_channel->proc~jacobian_rot proc~sourceterms_notfriction_channel->proc~he_prop proc~sourceterms_notfriction_channel->proc~state_roe proc~sourceterms_notfriction_channel->proc~state_roe_withr proc~state_roe->proc~jacobian_rot proc~state_roe_withr->proc~jacobian_rot proc~state_rop->proc~jacobian_rot proc~state_rop_withr->proc~jacobian_rot proc~state_rot->proc~jacobian_rot 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~channel_init_part1 channel_init_part1 proc~channel_init_part1->proc~state_rot proc~circulator_dynamic_parameters_f->proc~state_rop 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~mdot_derivatives proc~circulator_resolution_from_and_to_ports->proc~outgoing_branch_cold_circulator proc~ffsrclink_prelax_resolution_from_and_to_ports FFsrcLink_Prelax_resolution_from_and_to_ports proc~ffsrclink_prelax_resolution_from_and_to_ports->proc~he_prop proc~ffsrclink_prelax_resolution_from_and_to_ports->proc~state_rot proc~from_sol_to_prim_channel from_sol_to_prim_channel proc~from_sol_to_prim_channel->proc~state_roe proc~from_sol_to_prim_channel->proc~state_roe_withr proc~function_of_pstar_pt->proc~state_rop proc~he_riemann_solver_channel He_Riemann_solver_channel proc~he_riemann_solver_channel->proc~jacobian_channel_req_rem proc~junction_resolution_from_and_to_ports Junction_resolution_from_and_to_ports proc~junction_resolution_from_and_to_ports->proc~solve_junction proc~last_tasks_for_channels last_tasks_for_channels proc~last_tasks_for_channels->proc~state_rot proc~main_loop main_loop proc~main_loop->proc~friction_source_term proc~main_loop->proc~boundary_resolution_from_and_to_ports proc~main_loop->proc~circulator_resolution_from_and_to_ports proc~main_loop->proc~ffsrclink_prelax_resolution_from_and_to_ports proc~main_loop->proc~from_sol_to_prim_channel proc~main_loop->proc~he_riemann_solver_channel proc~main_loop->proc~junction_resolution_from_and_to_ports proc~main_loop->proc~last_tasks_for_channels proc~source_term_definition_channel source_term_definition_channel proc~main_loop->proc~source_term_definition_channel proc~full_physics_definition_channel full_physics_definition_channel proc~main_loop->proc~full_physics_definition_channel proc~source_term_definition_channel->proc~sourceterms_notfriction_channel proc~full_physics_definition_channel->proc~source_term_definition_channel program~reims_p reims_p program~reims_p->proc~channel_init_part1 program~reims_p->proc~main_loop

Source Code

elemental subroutine jacobian_roT(ro, T, cv, dPdT, dTdP, dTdRo, dRdRo, dRdT, r, p, d2TdP_dT, d2TdP_dRo)
    real(dp), intent(in)  :: ro, T
    real(dp), intent(out) :: cv, dPdT
    real(dp), intent(out), optional :: dTdP, dTdRo, dRdRo, dRdT, r, p
    real(dp), intent(out), optional :: d2TdP_dT, d2TdP_dRo

    type(ThArrays_t) :: ThAr
    real(dp) :: ro_Arp, dPdRo_Arp, dPdT_Arp, cv_Arp, p_Arp, r_Arp, dRdRo_Arp, dRdT_Arp
    real(dp) :: d2PdT2_Arp, d2PdRodT_Arp
    integer  :: n

    ro_Arp = ro/(MolMass*1000.0_dp)
    call eos_terms(ro_Arp, T, ThAr)

    dPdRo_Arp    = R_cte_gaz_Arp*T
    dPdT_Arp     = ro_Arp*R_cte_gaz_Arp
    cv_Arp       = cp0_Arp - R_cte_gaz_Arp
    p_Arp        = ro_Arp*R_cte_gaz_Arp*T
    r_Arp        = (cp0_Arp*T + q0_Arp)*ro_Arp
    dRdRo_Arp    = cp0_Arp*T + q0_Arp
    dRdT_Arp     = cp0_Arp*ro_Arp
    d2PdT2_Arp   = 0.0_dp
    d2PdRodT_Arp = R_cte_gaz_Arp
    do n = 1, 14
        dPdRo_Arp    = dPdRo_Arp    + ThAr%Derf(n) *ThAr%g(n)
        dPdT_Arp     = dPdT_Arp     + ThAr%f(n)    *ThAr%Derg(n)
        cv_Arp       = cv_Arp       + ThAr%Dergg(n)*ThAr%hh(n) / ro_Arp
        p_Arp        = p_Arp        + ThAr%f(n)    *ThAr%g(n)
        r_Arp        = r_Arp        + ThAr%gg(n)   *ThAr%hh(n)    + ThAr%f(n)   *ThAr%g(n)
        dRdRo_Arp    = dRdRo_Arp    + ThAr%gg(n)   *ThAr%Derhh(n) + ThAr%Derf(n)*ThAr%g(n)
        dRdT_Arp     = dRdT_Arp     + ThAr%Dergg(n)*ThAr%hh(n)    + ThAr%f(n)   *ThAr%Derg(n)
        d2PdT2_Arp   = d2PdT2_Arp   + ThAr%f(n)    *ThAr%Der2g(n)
        d2PdRodT_Arp = d2PdRodT_Arp + ThAr%Derf(n) *ThAr%Derg(n)
    enddo

    dPdT  = dPdT_Arp  * 1.0e6_dp
    cv    = cv_Arp    * 1.0e3_dp/MolMass

    if (present(dTdP))      dTdP      = 1.0_dp/dPdT
    if (present(dTdRo))     dTdRo     = -(dPdRo_Arp * 1000.0_dp/MolMass)/dPdT
    if (present(dRdRo))     dRdRo     = dRdRo_Arp * 1.0e6_dp/(MolMass*1000.0_dp)
    if (present(dRdT))      dRdT      = dRdT_Arp  * 1.0e6_dp
    if (present(r))         r         = r_Arp     * 1.0e6_dp
    if (present(p))         p         = p_Arp     * 1.0e6_dp

    if (present(d2TdP_dT))  d2TdP_dT  = -(d2PdT2_Arp   * 1.0e6_dp)                    /(dPdT**2)
    if (present(d2TdP_dRo)) d2TdP_dRo = -(d2PdRodT_Arp * 1.0e6_dp/(MolMass*1000.0_dp))/(dPdT**2)
end subroutine jacobian_roT