Compute total specific entalpy (per unit of mass). $$ H = \frac{{\g p}}{{\left( {\g - 1} \right)\r }} + \frac{{u^2 }}{2} $$
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R_P), | intent(in) | :: | p | Pressure. |
||
real(kind=R_P), | intent(in) | :: | r | Density. |
||
real(kind=R_P), | intent(in) | :: | u | Module of velocity vector. |
||
real(kind=R_P), | intent(in) | :: | g | Specific heats ratio \(\frac{{c_p}}{{c_v}}\). |
Total specific entalpy (per unit of mass).
elemental function H(p, r, u, g) result(entalpy)
!---------------------------------------------------------------------------------------------------------------------------------
!< Compute total specific entalpy (per unit of mass).
!<$$
!< H = \frac{{\g p}}{{\left( {\g - 1} \right)\r }} + \frac{{u^2 }}{2}
!<$$
!---------------------------------------------------------------------------------------------------------------------------------
real(R_P), intent(IN) :: g !< Specific heats ratio \(\frac{{c_p}}{{c_v}}\).
real(R_P), intent(IN) :: p !< Pressure.
real(R_P), intent(IN) :: r !< Density.
real(R_P), intent(IN) :: u !< Module of velocity vector.
real(R_P) :: entalpy !< Total specific entalpy (per unit of mass).
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
entalpy = g * p / ((g - 1._R_P) * r) + 0.5_R_P * u * u
return
!---------------------------------------------------------------------------------------------------------------------------------
endfunction H