Compute the pressure difference dp
from the density rho
and the height difference dz
by hydrostatic equation.
Essentially, .
(KCW, 2025-07-10)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in) | :: | constant_g | |||
real(kind=real64), | intent(in) | :: | rho | |||
real(kind=real64), | intent(in) | :: | dz |
pure elemental function dp_by_hydrostatic_equation(constant_g, rho, dz) result(dp) use, intrinsic :: iso_fortran_env, only: real64 real(real64), intent(in) :: constant_g, rho, dz real(real64) :: dp dp = -rho * constant_g * dz end function dp_by_hydrostatic_equation