Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | w | |||
real(kind=r64), | intent(in) | :: | T | |||
character(len=*), | intent(in), | optional | :: | calledfrom |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
function PsyHfgAirFnWTdb(w,T,calledfrom) result(hfg)
! FUNCTION INFORMATION:
! AUTHOR Richard Liesen
! DATE WRITTEN May, 2001
! MODIFIED June, 2002
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function provides latent energy of air as function of humidity ratio and temperature.
! METHODOLOGY EMPLOYED:
! calculates hg and then hf and the difference is Hfg.
! REFERENCES:
! see ASHRAE Fundamentals Psychrometric Chapter
! USAGE: hfg = PsyHfgAirFnWTdb(w,T)
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), intent(in) :: w ! humidity ratio {kgWater/kgDryAir} !unused1208
REAL(r64), intent(in) :: T ! input temperature {Celsius}
character(len=*), intent(in), optional :: calledfrom ! routine this function was called from (error messages) !unused1208
REAL(r64) :: hfg ! result => heat of vaporization for moist air {J/kg}
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: hg ! enthalpy of the gas
REAL(r64) :: hf ! enthalpy of the fluid
! INTEGER,SAVE :: b0cerrcount=0
REAL(r64) :: Temperature ! input temperature {Celsius} - corrected for >= 0C
! This formulation currently does not use W since it returns results that are in J/kg and the
! amount of energy is on a per unit of moisture basis.
Temperature=MAX(T,0.0d0)
! Temperature=T
hg = 2500940.0d0 + 1858.95d0*Temperature
hf = 4180.0d0*Temperature
hfg = hg - hf
!4/8/08 - pending comments hfg = hg
return
end function PsyHfgAirFnWTdb