Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | HumNum | |||
real(kind=r64), | intent(out) | :: | WaterAddNeeded |
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.
SUBROUTINE ControlHumidifier(HumNum,WaterAddNeeded)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN September 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine sets the output required from the humidifier
! METHODOLOGY EMPLOYED:
! Uses a minimum humidity setpoint and water mass balance to calculate moisture addition needed
! REFERENCES:
! na
! USE STATEMENTS:
Use Psychrometrics, ONLY:PsyWFnTdbRhPb
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT (IN) :: HumNum ! number of the current humidifier being simulated
REAL(r64), INTENT(OUT) :: WaterAddNeeded ! moisture addition rate needed to meet minimum humidity ratio setpoint [kg/s]
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL :: UnitOn ! unit on flag
REAL(r64) :: AirMassFlowRate ! air mass flow rate [kg/s]
REAL(r64) :: HumRatSatIn ! humidity ratio at saturation at the inlet temperature [kg H2O / kg dry air]
AirMassFlowRate = 0.0d0
UnitOn = .TRUE.
IF (Humidifier(HumNum)%HumRatSet .LE. 0.0d0) UnitOn = .FALSE.
AirMassFlowRate = Humidifier(HumNum)%AirInMassFlowRate
IF (AirMassFlowRate .LE. SmallMassFlow) UnitOn = .FALSE.
IF (GetCurrentScheduleValue(Humidifier(HumNum)%SchedPtr) .LE. 0.0d0) UnitOn = .FALSE.
IF (Humidifier(HumNum)%AirInHumRat .GE. Humidifier(HumNum)%HumRatSet) UnitOn = .FALSE.
HumRatSatIn = PsyWFnTdbRhPb(Humidifier(HumNum)%AirInTemp,1.0d0,OutBaroPress, 'ControlHumidifier')
IF (Humidifier(HumNum)%AirInHumRat .GE. HumRatSatIn) UnitOn = .FALSE.
IF (UnitOn) THEN
! AirMassFlowRate*AirInHumRat + WaterAddNeeded = AirMassFlowRate*HumRatSet
WaterAddNeeded = AirMassFlowRate * (Humidifier(HumNum)%HumRatSet - Humidifier(HumNum)%AirInHumRat)
ELSE
WaterAddNeeded = 0.0d0
END IF
RETURN
END SUBROUTINE ControlHumidifier