Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | TDB | |||
real(kind=r64), | intent(in) | :: | dW | |||
real(kind=r64), | intent(in) | :: | PB | |||
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.
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 PsyVFnTdbWPb(TDB,dW,PB,calledfrom) RESULT(V)
! FUNCTION INFORMATION:
! AUTHOR George Shih
! DATE WRITTEN May 1976
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function provides the specific volume from dry-bulb temperature,
! humidity ratio and barometric pressure.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! ASHRAE HANDBOOK OF FUNDAMENTALS, 1972, P99, EQN 28
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), intent(in) :: TDB ! dry-bulb temperature {C}
REAL(r64), intent(in) :: dW ! humidity ratio
REAL(r64), intent(in) :: PB ! barometric pressure {Pascals}
character(len=*), intent(in), optional :: calledfrom ! routine this function was called from (error messages)
REAL(r64) :: V ! result=> specific volume {m3/kg}
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) w ! humidity ratio
w=MAX(dW,1.0d-5)
V=1.59473d2*(1.d0+1.6078d0*W)*(1.8d0*TDB+492.d0)/PB
# 1697
! VALIDITY TEST.
IF (V < 0.0d0) THEN
IF (V <= -.01d0) THEN
IF (.not. WarmupFlag) THEN
IF (iPsyErrIndex(iPsyVFnTdbWPb) == 0) THEN
String=' Dry-Bulb= '//TRIM(TrimSigDigits(TDB,2))//' Humidity Ratio= '//TRIM(TrimSigDigits(W,3))// &
' Pressure= '//TRIM(TrimSigDigits(PB,2))
CALL ShowWarningMessage('Calculated Specific Volume out of range (PsyVFnTdbWPb)')
if (present(calledfrom)) then
CALL ShowContinueErrorTimeStamp(' Routine='//trim(calledfrom)//',')
else
CALL ShowContinueErrorTimeStamp(' Routine=Unknown,')
endif
CALL ShowContinueError(TRIM(String))
String='Calculated Volume= '//TRIM(TrimSigDigits(V,3))
CALL ShowContinueError(TRIM(String)//' ... Since Calculated Volume < 0.0, it is set to .83')
ENDIF
CALL ShowRecurringWarningErrorAtEnd('Calculated Specific Volume out of range (PsyVFnTdbWPb)', &
iPsyErrIndex(iPsyVFnTdbWPb),ReportMinOf=V,ReportMaxOf=V,ReportMinUnits='m3/kg',ReportMaxUnits='m3/kg')
ENDIF
ENDIF
V=0.83d0
ENDIF
! V is the result
RETURN
END FUNCTION PsyVFnTdbWPb