Return the free stream speed of sound.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flowtype), | intent(in) | :: | flow | Information about fluid flow: freestream-speed, ref-viscosity,etc. |
output variable: speed of sound
function sound_speed_inf(flow) result(a)
!< Return the free stream speed of sound.
!-----------------------------------------------------------
implicit none
type(flowtype), intent(in) :: flow
!< Information about fluid flow: freestream-speed, ref-viscosity,etc.
real(wp) :: a
!< output variable: speed of sound
a = sqrt(flow%gm * flow%pressure_inf / flow%density_inf)
end function sound_speed_inf