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) | :: | SetPtMgrNum |
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 CalcSingZoneMaxHumSetPoint(SetPtMgrNum)
! SUBROUTINE INFORMATION:
! AUTHOR Raustad/Shirey, FSEC
! DATE WRITTEN January 2004
! MODIFIED Gu, Dec. 2007
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! From humidity load of the control zone, calculate the supply air humidity
! needed to meet the maximum humidity setpoint
! METHODOLOGY EMPLOYED:
! Zone moisture load from ZoneTempPredictorCorrector (via DataZoneEnergyDemands)
! is used to calculate the maximum supply air humidity ratio
! needed to meet maximum zone relative humidity requirement
! REFERENCES:
! na
! USE STATEMENTS:
USE DataHVACGlobals, ONLY: SmallMassFlow
USE DataZoneEnergyDemands, ONLY: ZoneSysMoistureDemand
USE Psychrometrics, ONLY:PsyWFnTdbRhPb
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT (IN) :: SetPtMgrNum ! number of the current setpoint manager being simulated
! SUBROUTINE PARAMETER DEFINITIONS:
! INTERFACE BLOCK SPECIFICATIONS
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: ZoneNode ! Control zone air node number
REAL(r64) :: ZoneMassFlow ! Zone air mass flow rate (kg/s)
!REAL(r64) :: RelHumSet ! Zone air relative humidity setpoint for this time step (fraction)
!REAL(r64) :: ZoneHumRatSet ! Zone air humidity ratio setpoint for this time step (kg/kg)
REAL(r64) :: MoistureLoad ! Zone moisture load (kg moisture/sec) required to meet the relative humidity setpoint
! Value obtained from ZoneTempPredictorCorrector (via ZoneSysMoistureDemand in DataZoneEnergyDemands)
REAL(r64) :: SupplyAirHumRat ! Desired air humidity ratio
REAL(r64) :: SystemMassFlow !
SZMaxHumSetPtMgr(SetPtMgrNum)%SetPt = 0.0d0
! Only use one zone for now
ZoneNode = SZMaxHumSetPtMgr(SetPtMgrNum)%ZoneNodes(1)
ZoneMassFlow = Node(ZoneNode)%MassFlowRate
IF (ZoneMassFlow.GT.SmallMassFlow) THEN
MoistureLoad= ZoneSysMoistureDemand(SZMaxHumSetPtMgr(SetPtMgrNum)%ZoneNum(1))%OutputRequiredToDehumidifyingSP
SystemMassFlow = Node(SZMaxHumSetPtMgr(SetPtMgrNum)%CtrlNodes(1))%MassFlowRate
! MoistureLoad (negative for dehumidification) may be so large that a negative humrat results, cap at 0.00001
SupplyAirHumRat = MAX(0.00001d0,Node(ZoneNode)%HumRat + MoistureLoad/ZoneMassFlow)
! This hum rat is currently used in Controller:Simple, control variable "TEMPandHUMRAT" (Jan 2004)
! Negative MoistureLoad means a dehumidification load
IF(MoistureLoad .LT. 0.0d0) SZMaxHumSetPtMgr(SetPtMgrNum)%SetPt = SupplyAirHumRat
END IF
RETURN
END SUBROUTINE CalcSingZoneMaxHumSetPoint