SUBROUTINE GetPurchasedAir
! SUBROUTINE INFORMATION:
! AUTHOR Russ Taylor
! DATE WRITTEN June 1997
! MODIFIED M. Witte, June 2011, add new features including DCV, economizer, dehumidification
! and humidification controls
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Get the input data for the Purchased Air objects.
! Set up output variables.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem, VerifyName, SameString, FindIteminList
USE NodeInputManager, ONLY: GetOnlySingleNode,InitUniqueNodeCheck,CheckUniqueNodes,EndUniqueNodeCheck
USE OutAirNodeManager, ONLY: CheckAndAddAirNodeNumber
USE DataLoopNode
USE DataIPShortCuts
USE DataSizing, ONLY: OARequirements, NumOARequirements ! to find DesignSpecification:OutdoorAir pointer
USE DataContaminantBalance, ONLY: Contaminant
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: PurchAirNum
INTEGER :: NumAlphas
INTEGER :: NumNums
INTEGER :: IOSTAT
CHARACTER(len=*), PARAMETER :: RoutineName='GetPurchasedAir: ' ! include trailing blank space
LOGICAL :: ErrorsFound = .false. ! If errors detected in input
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
LOGICAL :: IsOANodeListed ! Flag for OA node name listed in OutdoorAir:Node or Nodelist
LOGICAL :: UniqueNodeError ! Flag for non-unique node error(s)
cCurrentModuleObject='ZoneHVAC:IdealLoadsAirSystem'
NumPurchAir = GetNumObjectsFound(cCurrentModuleObject)
ALLOCATE (PurchAir(NumPurchAir))
ALLOCATE(CheckEquipName(NumPurchAir))
CheckEquipName=.true.
IF (NumPurchAir .GT. 0)THEN
CALL InitUniqueNodeCheck(cCurrentModuleObject)
DO PurchAirNum = 1, NumPurchAir
PurchAir(PurchAirNum)%cObjectName = cCurrentModuleObject
CALL GetObjectItem(cCurrentModuleObject,PurchAirNum,cAlphaArgs,NumAlphas,rNumericArgs, &
NumNums,IOSTAT, NumBlank=lNumericFieldBlanks, AlphaBlank=lAlphaFieldBlanks, &
AlphaFieldNames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(cAlphaArgs(1),PurchAir%Name,PurchAirNum-1,IsNotOK,IsBlank,TRIM(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) cAlphaArgs(1)='xxxxx'
ENDIF
PurchAir(PurchAirNum)%Name = cAlphaArgs(1)
! get optional availability schedule
PurchAir(PurchAirNum)%AvailSched = cAlphaArgs(2)
IF (lAlphaFieldBlanks(2)) THEN
PurchAir(PurchAirNum)%AvailSchedPtr = ScheduleAlwaysOn
ELSE
PurchAir(PurchAirNum)%AvailSchedPtr = GetScheduleIndex(cAlphaArgs(2))
IF (PurchAir(PurchAirNum)%AvailSchedPtr == 0) THEN
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid data')
CALL ShowContinueError('Invalid-not found '//TRIM(cAlphaFieldNames(2))// &
'="'//TRIM(cAlphaArgs(2))//'".')
ErrorsFound=.true.
END IF
END IF
! Purchased air supply air node is an outlet node
PurchAir(PurchAirNum)%ZoneSupplyAirNodeNum = &
GetOnlySingleNode(cAlphaArgs(3),ErrorsFound,TRIM(cCurrentModuleObject),cAlphaArgs(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsNotParent)
UniqueNodeError=.false.
CALL CheckUniqueNodes(cAlphaFieldNames(3),'NodeName',UniqueNodeError,CheckName=cAlphaArgs(3),ObjectName=cAlphaArgs(1))
IF (UniqueNodeError) ErrorsFound=.true.
! If new (optional) exhaust air node name is present, then register it as inlet
IF (.NOT.lAlphaFieldBlanks(4)) THEN
PurchAir(PurchAirNum)%ZoneExhaustAirNodeNum = &
GetOnlySingleNode(cAlphaArgs(4),ErrorsFound,TRIM(cCurrentModuleObject),cAlphaArgs(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsNotParent)
UniqueNodeError=.false.
CALL CheckUniqueNodes(cAlphaFieldNames(4),'NodeName',UniqueNodeError,CheckName=cAlphaArgs(4),ObjectName=cAlphaArgs(1))
IF (UniqueNodeError) ErrorsFound=.true.
ENDIF
PurchAir(PurchAirNum)%MaxHeatSuppAirTemp = rNumericArgs(1)
PurchAir(PurchAirNum)%MinCoolSuppAirTemp = rNumericArgs(2)
PurchAir(PurchAirNum)%MaxHeatSuppAirHumRat = rNumericArgs(3)
PurchAir(PurchAirNum)%MinCoolSuppAirHumRat = rNumericArgs(4)
IF (SameString(cAlphaArgs(5),'NoLimit')) THEN
PurchAir(PurchAirNum)%HeatingLimit = NoLimit
ELSEIF (SameString(cAlphaArgs(5),'LimitFlowRate')) THEN
IF (lNumericFieldBlanks(5)) THEN
PurchAir(PurchAirNum)%HeatingLimit = NoLimit
ELSE
PurchAir(PurchAirNum)%HeatingLimit = LimitFlowRate
ENDIF
ELSEIF (SameString(cAlphaArgs(5),'LimitCapacity')) THEN
IF (lNumericFieldBlanks(6)) THEN
PurchAir(PurchAirNum)%HeatingLimit = NoLimit
ELSE
PurchAir(PurchAirNum)%HeatingLimit = LimitCapacity
ENDIF
ELSEIF (SameString(cAlphaArgs(5),'LimitFlowRateAndCapacity')) THEN
IF (lNumericFieldBlanks(5) .AND. lNumericFieldBlanks(6)) THEN
PurchAir(PurchAirNum)%HeatingLimit = NoLimit
ELSEIF (lNumericFieldBlanks(5)) THEN
PurchAir(PurchAirNum)%HeatingLimit = LimitCapacity
ELSEIF (lNumericFieldBlanks(6)) THEN
PurchAir(PurchAirNum)%HeatingLimit = LimitFlowRate
ELSE
PurchAir(PurchAirNum)%HeatingLimit = LimitFlowRateAndCapacity
ENDIF
ELSE
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid data')
CALL ShowContinueError('Invalid-entry '//TRIM(cAlphaFieldNames(5))//'="'//TRIM(cAlphaArgs(5))//'".')
CALL ShowContinueError('Valid entries are NoLimit, LimitFlowRate, LimitCapacity, or LimitFlowRateAndCapacity')
ErrorsFound=.true.
END IF
PurchAir(PurchAirNum)%MaxHeatVolFlowRate = rNumericArgs(5)
PurchAir(PurchAirNum)%MaxHeatSensCap = rNumericArgs(6)
IF (SameString(cAlphaArgs(6),'NoLimit')) THEN
PurchAir(PurchAirNum)%CoolingLimit = NoLimit
ELSEIF (SameString(cAlphaArgs(6),'LimitFlowRate')) THEN
IF (lNumericFieldBlanks(7)) THEN
PurchAir(PurchAirNum)%CoolingLimit = NoLimit
ELSE
PurchAir(PurchAirNum)%CoolingLimit = LimitFlowRate
ENDIF
ELSEIF (SameString(cAlphaArgs(6),'LimitCapacity')) THEN
IF (lNumericFieldBlanks(8)) THEN
PurchAir(PurchAirNum)%CoolingLimit = NoLimit
ELSE
PurchAir(PurchAirNum)%CoolingLimit = LimitCapacity
ENDIF
ELSEIF (SameString(cAlphaArgs(6),'LimitFlowRateAndCapacity')) THEN
IF (lNumericFieldBlanks(7) .AND. lNumericFieldBlanks(8)) THEN
PurchAir(PurchAirNum)%CoolingLimit = NoLimit
ELSEIF (lNumericFieldBlanks(7)) THEN
PurchAir(PurchAirNum)%CoolingLimit = LimitCapacity
ELSEIF (lNumericFieldBlanks(8)) THEN
PurchAir(PurchAirNum)%CoolingLimit = LimitFlowRate
ELSE
PurchAir(PurchAirNum)%CoolingLimit = LimitFlowRateAndCapacity
ENDIF
ELSE
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid data')
CALL ShowContinueError('Invalid-entry '//TRIM(cAlphaFieldNames(6))//'="'//TRIM(cAlphaArgs(6))//'".')
CALL ShowContinueError('Valid entries are NoLimit, LimitFlowRate, LimitCapacity, or LimitFlowRateAndCapacity')
ErrorsFound=.true.
END IF
PurchAir(PurchAirNum)%MaxCoolVolFlowRate = rNumericArgs(7)
PurchAir(PurchAirNum)%MaxCoolTotCap = rNumericArgs(8)
! get optional heating availability schedule
PurchAir(PurchAirNum)%HeatSched = cAlphaArgs(7)
IF (lAlphaFieldBlanks(7)) THEN
PurchAir(PurchAirNum)%HeatSchedPtr = ScheduleAlwaysOn
ELSE
PurchAir(PurchAirNum)%HeatSchedPtr = GetScheduleIndex(cAlphaArgs(7))
IF (PurchAir(PurchAirNum)%HeatSchedPtr == 0) THEN
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid data')
CALL ShowContinueError('Invalid-not found '//TRIM(cAlphaFieldNames(7))//'="'//TRIM(cAlphaArgs(7))//'".')
ErrorsFound=.true.
END IF
END IF
! get optional cooling availability schedule
PurchAir(PurchAirNum)%CoolSched = cAlphaArgs(8)
IF (lAlphaFieldBlanks(8)) THEN
PurchAir(PurchAirNum)%CoolSchedPtr = ScheduleAlwaysOn
ELSE
PurchAir(PurchAirNum)%CoolSchedPtr = GetScheduleIndex(cAlphaArgs(8))
IF (PurchAir(PurchAirNum)%CoolSchedPtr == 0) THEN
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid data')
CALL ShowContinueError('Invalid-not found '//TRIM(cAlphaFieldNames(8))//'="'//TRIM(cAlphaArgs(8))//'".')
ErrorsFound=.true.
END IF
END IF
! get Dehumidification control type
IF (SameString(cAlphaArgs(9),'None')) THEN
PurchAir(PurchAirNum)%DehumidCtrlType = None
ELSEIF (SameString(cAlphaArgs(9),'ConstantSensibleHeatRatio')) THEN
PurchAir(PurchAirNum)%DehumidCtrlType = ConstantSensibleHeatRatio
ELSEIF(SameString(cAlphaArgs(9),'Humidistat')) THEN
PurchAir(PurchAirNum)%DehumidCtrlType = Humidistat
ELSEIF(SameString(cAlphaArgs(9),'ConstantSupplyHumidityRatio')) THEN
PurchAir(PurchAirNum)%DehumidCtrlType = ConstantSupplyHumidityRatio
ELSE
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid data')
CALL ShowContinueError('Invalid-entry '//TRIM(cAlphaFieldNames(9))//'="'//TRIM(cAlphaArgs(9))//'".')
CALL ShowContinueError('Valid entries are ConstantSensibleHeatRatio, Humidistat, or ConstantSupplyHumidityRatio')
ErrorsFound=.true.
END IF
PurchAir(PurchAirNum)%CoolSHR = rNumericArgs(9)
! get Humidification control type
IF (SameString(cAlphaArgs(10),'None')) THEN
PurchAir(PurchAirNum)%HumidCtrlType = None
ELSEIF(SameString(cAlphaArgs(10),'Humidistat')) THEN
PurchAir(PurchAirNum)%HumidCtrlType = Humidistat
ELSEIF(SameString(cAlphaArgs(10),'ConstantSupplyHumidityRatio')) THEN
PurchAir(PurchAirNum)%HumidCtrlType = ConstantSupplyHumidityRatio
ELSE
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid data')
CALL ShowContinueError('Invalid-entry '//TRIM(cAlphaFieldNames(10))//'="'//TRIM(cAlphaArgs(10))//'".')
CALL ShowContinueError('Valid entries are None, Humidistat, or ConstantSupplyHumidityRatio')
ErrorsFound=.true.
END IF
! get Design specification outdoor air object
IF(.NOT. lAlphaFieldBlanks(11))THEN
PurchAir(PurchAirNum)%OARequirementsPtr = FindItemInList(cAlphaArgs(11),OARequirements%Name,NumOARequirements)
IF(PurchAir(PurchAirNum)%OARequirementsPtr .EQ. 0)THEN
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'//trim(cAlphaArgs(1))//' invalid data')
CALL ShowContinueError('Invalid-not found'//TRIM(cAlphaFieldNames(11))//'="'//TRIM(cAlphaArgs(11))//'".')
ErrorsFound=.true.
ELSE
PurchAir(PurchAirNum)%OutdoorAir = .true.
END IF
END IF
! If outdoor air specified, then get Outdoor air inlet node and other outdoor air inputs
IF (PurchAir(PurchAirNum)%OutdoorAir) THEN
IF (lAlphaFieldBlanks(12)) THEN
! If there is outdoor air and outdoor air inlet node is blank, then create one
IF (LEN_TRIM(cAlphaArgs(1)) < (MaxNameLength - 23) ) THEN ! protect against long name leading to > 100 chars
cAlphaArgs(12) = TRIM(cAlphaArgs(1))//' OUTDOOR AIR INLET NODE'
ELSE
cAlphaArgs(12) = TRIM(cAlphaArgs(1)(1:75))//' OUTDOOR AIR INLET NODE'
ENDIF
IF (DisplayExtraWarnings) THEN
CALL ShowWarningError(RoutineName//TRIM(cCurrentModuleObject)//'="'// &
trim(cAlphaArgs(1))//' blank field')
CALL ShowContinueError(TRIM(cAlphaFieldNames(12))// &
' is blank, but there is outdoor air requested for this system.')
CALL ShowContinueError('Creating node name ='//TRIM(cAlphaArgs(12)))
ENDIF
ENDIF
! Register OA node
PurchAir(PurchAirNum)%OutdoorAirNodeNum = &
GetOnlySingleNode(cAlphaArgs(12),ErrorsFound,TRIM(cCurrentModuleObject),cAlphaArgs(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsNotParent)
! Check if OA node is initialized in OutdoorAir:Node or OutdoorAir:Nodelist
CALL CheckAndAddAirNodeNumber(PurchAir(PurchAirNum)%OutdoorAirNodeNum,IsOANodeListed)
IF ((.not. IsOANodeListed) .AND. DisplayExtraWarnings) THEN
CALL ShowWarningError(RoutineName//TRIM(cCurrentModuleObject)//'="'// &
trim(cAlphaArgs(1))//' missing data')
CALL ShowContinueError(TRIM(cAlphaArgs(12))// &
' does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.')
CALL ShowContinueError('Adding OutdoorAir:Node='//TRIM(cAlphaArgs(12)))
ENDIF
UniqueNodeError=.false.
CALL CheckUniqueNodes(cAlphaFieldNames(12),'NodeName',UniqueNodeError,CheckName=cAlphaArgs(12),ObjectName=cAlphaArgs(1))
IF (UniqueNodeError) ErrorsFound=.true.
! get Demand controlled ventilation type
IF (SameString(cAlphaArgs(13),'None')) THEN
PurchAir(PurchAirNum)%DCVType = NoDCV
ELSEIF(SameString(cAlphaArgs(13),'OccupancySchedule')) THEN
PurchAir(PurchAirNum)%DCVType = OccupancySchedule
ELSEIF(SameString(cAlphaArgs(13),'CO2Setpoint')) THEN
IF(Contaminant%CO2Simulation) THEN
PurchAir(PurchAirNum)%DCVType = CO2Setpoint
ELSE
PurchAir(PurchAirNum)%DCVType = NoDCV
CALL ShowWarningError(RoutineName//TRIM(cCurrentModuleObject)//'="'// &
trim(cAlphaArgs(1))//' invalid data')
CALL ShowContinueError(TRIM(cAlphaFieldNames(13))//'='//TRIM(cAlphaArgs(13))// &
' but CO2 simulation is not active.')
CALL ShowContinueError('Resetting '//TRIM(cAlphaFieldNames(13))//' to NoDCV')
CALL ShowContinueError('To activate CO2 simulation, use ZoneAirContaminantBalance object'// &
' and specify "Carbon Dioxide Concentration"="Yes".')
END IF
ELSE
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'// &
trim(cAlphaArgs(1))//' invalid data')
CALL ShowContinueError('Invalid-entry '//TRIM(cAlphaFieldNames(13))//'='//TRIM(cAlphaArgs(13)))
CALL ShowContinueError('Valid entries are None, OccupancySchedule, or CO2Setpoint')
ErrorsFound=.true.
END IF
! get Outdoor air economizer type
IF (SameString(cAlphaArgs(14),'NoEconomizer')) THEN
PurchAir(PurchAirNum)%EconomizerType = NoEconomizer
ELSEIF(SameString(cAlphaArgs(14),'DifferentialDryBulb')) THEN
PurchAir(PurchAirNum)%EconomizerType = DifferentialDryBulb
ELSEIF(SameString(cAlphaArgs(14),'DifferentialEnthalpy')) THEN
PurchAir(PurchAirNum)%EconomizerType = DifferentialEnthalpy
ELSE
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'// &
trim(cAlphaArgs(1))//' invalid data')
CALL ShowContinueError('Invalid-entry '//TRIM(cAlphaFieldNames(14))//'='//TRIM(cAlphaArgs(14)))
CALL ShowContinueError('Valid entries are NoEconomizer, DifferentialDryBulb, or DifferentialEnthalpy')
ErrorsFound=.true.
END IF
! get Outdoor air heat recovery type and effectiveness
IF (SameString(cAlphaArgs(15),'None')) THEN
PurchAir(PurchAirNum)%HtRecType = NoHeatRecovery
ELSEIF(SameString(cAlphaArgs(15),'Sensible')) THEN
PurchAir(PurchAirNum)%HtRecType = Sensible
ELSEIF(SameString(cAlphaArgs(15),'Enthalpy')) THEN
PurchAir(PurchAirNum)%HtRecType = Enthalpy
ELSE
CALL ShowSevereError(RoutineName//TRIM(cCurrentModuleObject)//'="'// &
trim(cAlphaArgs(1))//' invalid data')
CALL ShowContinueError('Invalid-entry '//TRIM(cAlphaFieldNames(15))//'='//TRIM(cAlphaArgs(15)))
CALL ShowContinueError('Valid entries are None, Sensible, or Enthalpy')
ErrorsFound=.true.
END IF
ELSE !No outdoorair
PurchAir(PurchAirNum)%DCVType = NoDCV
PurchAir(PurchAirNum)%EconomizerType = NoEconomizer
PurchAir(PurchAirNum)%HtRecType = NoHeatRecovery
END IF
PurchAir(PurchAirNum)%HtRecSenEff = rNumericArgs(10)
PurchAir(PurchAirNum)%HtRecLatEff = rNumericArgs(11)
! initialize the calculated and report values
PurchAir(PurchAirNum)%MaxHeatMassFlowRate = 0.0d0
PurchAir(PurchAirNum)%MaxCoolMassFlowRate = 0.0d0
PurchAir(PurchAirNum)%SenHeatEnergy = 0.0d0
PurchAir(PurchAirNum)%LatHeatEnergy = 0.0d0
PurchAir(PurchAirNum)%TotHeatEnergy = 0.0d0
PurchAir(PurchAirNum)%SenCoolEnergy = 0.0d0
PurchAir(PurchAirNum)%LatCoolEnergy = 0.0d0
PurchAir(PurchAirNum)%TotCoolEnergy = 0.0d0
PurchAir(PurchAirNum)%ZoneSenHeatEnergy = 0.0d0
PurchAir(PurchAirNum)%ZoneLatHeatEnergy = 0.0d0
PurchAir(PurchAirNum)%ZoneTotHeatEnergy = 0.0d0
PurchAir(PurchAirNum)%ZoneSenCoolEnergy = 0.0d0
PurchAir(PurchAirNum)%ZoneLatCoolEnergy = 0.0d0
PurchAir(PurchAirNum)%ZoneTotCoolEnergy = 0.0d0
PurchAir(PurchAirNum)%OASenHeatEnergy = 0.0d0
PurchAir(PurchAirNum)%OALatHeatEnergy = 0.0d0
PurchAir(PurchAirNum)%OATotHeatEnergy = 0.0d0
PurchAir(PurchAirNum)%OASenCoolEnergy = 0.0d0
PurchAir(PurchAirNum)%OALatCoolEnergy = 0.0d0
PurchAir(PurchAirNum)%OATotCoolEnergy = 0.0d0
PurchAir(PurchAirNum)%HtRecSenHeatEnergy = 0.0d0
PurchAir(PurchAirNum)%HtRecLatHeatEnergy = 0.0d0
PurchAir(PurchAirNum)%HtRecTotHeatEnergy = 0.0d0
PurchAir(PurchAirNum)%HtRecSenCoolEnergy = 0.0d0
PurchAir(PurchAirNum)%HtRecLatCoolEnergy = 0.0d0
PurchAir(PurchAirNum)%HtRecTotCoolEnergy = 0.0d0
PurchAir(PurchAirNum)%SenHeatRate = 0.0d0
PurchAir(PurchAirNum)%LatHeatRate = 0.0d0
PurchAir(PurchAirNum)%TotHeatRate = 0.0d0
PurchAir(PurchAirNum)%SenCoolRate = 0.0d0
PurchAir(PurchAirNum)%LatCoolRate = 0.0d0
PurchAir(PurchAirNum)%TotCoolRate = 0.0d0
PurchAir(PurchAirNum)%ZoneSenHeatRate = 0.0d0
PurchAir(PurchAirNum)%ZoneLatHeatRate = 0.0d0
PurchAir(PurchAirNum)%ZoneTotHeatRate = 0.0d0
PurchAir(PurchAirNum)%ZoneSenCoolRate = 0.0d0
PurchAir(PurchAirNum)%ZoneLatCoolRate = 0.0d0
PurchAir(PurchAirNum)%ZoneTotCoolRate = 0.0d0
PurchAir(PurchAirNum)%OASenHeatRate = 0.0d0
PurchAir(PurchAirNum)%OALatHeatRate = 0.0d0
PurchAir(PurchAirNum)%OATotHeatRate = 0.0d0
PurchAir(PurchAirNum)%OASenCoolRate = 0.0d0
PurchAir(PurchAirNum)%OALatCoolRate = 0.0d0
PurchAir(PurchAirNum)%OATotCoolRate = 0.0d0
PurchAir(PurchAirNum)%HtRecSenHeatRate = 0.0d0
PurchAir(PurchAirNum)%HtRecLatHeatRate = 0.0d0
PurchAir(PurchAirNum)%HtRecTotHeatRate = 0.0d0
PurchAir(PurchAirNum)%HtRecSenCoolRate = 0.0d0
PurchAir(PurchAirNum)%HtRecLatCoolRate = 0.0d0
PurchAir(PurchAirNum)%HtRecTotCoolRate = 0.0d0
END DO
CALL EndUniqueNodeCheck(cCurrentModuleObject)
END IF
DO PurchAirNum = 1,NumPurchAir
! Setup Output variables
! energy variables
CALL SetupOutputVariable('Zone Ideal Loads Supply Air Sensible Heating Energy [J]', PurchAir(PurchAirNum)%SenHeatEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Supply Air Latent Heating Energy [J]', PurchAir(PurchAirNum)%LatHeatEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Supply Air Total Heating Energy [J]', PurchAir(PurchAirNum)%TotHeatEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name, &
ResourceTypeKey='DISTRICTHEATING',EndUseKey='Heating',GroupKey='System')
CALL SetupOutputVariable('Zone Ideal Loads Supply Air Sensible Cooling Energy [J]', PurchAir(PurchAirNum)%SenCoolEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Supply Air Latent Cooling Energy [J]', PurchAir(PurchAirNum)%LatCoolEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Supply Air Total Cooling Energy [J]', PurchAir(PurchAirNum)%TotCoolEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name, &
ResourceTypeKey='DISTRICTCOOLING',EndUseKey='Cooling',GroupKey='System')
CALL SetupOutputVariable('Zone Ideal Loads Zone Sensible Heating Energy [J]', PurchAir(PurchAirNum)%ZoneSenHeatEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Zone Latent Heating Energy [J]', PurchAir(PurchAirNum)%ZoneLatHeatEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Zone Total Heating Energy [J]', PurchAir(PurchAirNum)%ZoneTotHeatEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Zone Sensible Cooling Energy [J]', PurchAir(PurchAirNum)%ZoneSenCoolEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Zone Latent Cooling Energy [J]', PurchAir(PurchAirNum)%ZoneLatCoolEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Zone Total Cooling Energy [J]', PurchAir(PurchAirNum)%ZoneTotCoolEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Outdoor Air Sensible Heating Energy [J]', &
PurchAir(PurchAirNum)%OASenHeatEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Outdoor Air Latent Heating Energy [J]', PurchAir(PurchAirNum)%OALatHeatEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Outdoor Air Total Heating Energy [J]', PurchAir(PurchAirNum)%OATotHeatEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Outdoor Air Sensible Cooling Energy [J]', &
PurchAir(PurchAirNum)%OASenCoolEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Outdoor Air Latent Cooling Energy [J]', PurchAir(PurchAirNum)%OALatCoolEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Outdoor Air Total Cooling Energy [J]', PurchAir(PurchAirNum)%OATotCoolEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Heat Recovery Sensible Heating Energy [J]', &
PurchAir(PurchAirNum)%HtRecSenHeatEnergy,&
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Heat Recovery Latent Heating Energy [J]', &
PurchAir(PurchAirNum)%HtRecLatHeatEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Heat Recovery Total Heating Energy [J]', &
PurchAir(PurchAirNum)%HtRecTotHeatEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Heat Recovery Sensible Cooling Energy [J]', &
PurchAir(PurchAirNum)%HtRecSenCoolEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Heat Recovery Latent Cooling Energy [J]', &
PurchAir(PurchAirNum)%HtRecLatCoolEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Heat Recovery Total Cooling Energy [J]', &
PurchAir(PurchAirNum)%HtRecTotCoolEnergy, &
'System','Sum',PurchAir(PurchAirNum)%Name)
! rate variables
CALL SetupOutputVariable('Zone Ideal Loads Supply Air Sensible Heating Rate [W]', PurchAir(PurchAirNum)%SenHeatRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Supply Air Latent Heating Rate [W]', PurchAir(PurchAirNum)%LatHeatRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Supply Air Total Heating Rate [W]', PurchAir(PurchAirNum)%TotHeatRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Supply Air Sensible Cooling Rate [W]', PurchAir(PurchAirNum)%SenCoolRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Supply Air Latent Cooling Rate [W]', PurchAir(PurchAirNum)%LatCoolRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Supply Air Total Cooling Rate [W]', PurchAir(PurchAirNum)%TotCoolRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Zone Sensible Heating Rate [W]', PurchAir(PurchAirNum)%ZoneSenHeatRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Zone Latent Heating Rate [W]', PurchAir(PurchAirNum)%ZoneLatHeatRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Zone Total Heating Rate [W]', PurchAir(PurchAirNum)%ZoneTotHeatRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Zone Sensible Cooling Rate [W]', PurchAir(PurchAirNum)%ZoneSenCoolRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Zone Latent Cooling Rate [W]', PurchAir(PurchAirNum)%ZoneLatCoolRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Zone Total Cooling Rate [W]', PurchAir(PurchAirNum)%ZoneTotCoolRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Outdoor Air Sensible Heating Rate [W]', PurchAir(PurchAirNum)%OASenHeatRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Outdoor Air Latent Heating Rate [W]', PurchAir(PurchAirNum)%OALatHeatRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Outdoor Air Total Heating Rate [W]', PurchAir(PurchAirNum)%OATotHeatRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Outdoor Air Sensible Cooling Rate [W]', PurchAir(PurchAirNum)%OASenCoolRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Outdoor Air Latent Cooling Rate [W]', PurchAir(PurchAirNum)%OALatCoolRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Outdoor Air Total Cooling Rate [W]', PurchAir(PurchAirNum)%OATotCoolRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Heat Recovery Sensible Heating Rate [W]', &
PurchAir(PurchAirNum)%HtRecSenHeatRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Heat Recovery Latent Heating Rate [W]', PurchAir(PurchAirNum)%HtRecLatHeatRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Heat Recovery Total Heating Rate [W]', PurchAir(PurchAirNum)%HtRecTotHeatRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Heat Recovery Sensible Cooling Rate [W]', &
PurchAir(PurchAirNum)%HtRecSenCoolRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Heat Recovery Latent Cooling Rate [W]', PurchAir(PurchAirNum)%HtRecLatCoolRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Heat Recovery Total Cooling Rate [W]', PurchAir(PurchAirNum)%HtRecTotCoolRate, &
'System','Average',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Economizer Active Time [hr]', PurchAir(PurchAirNum)%TimeEconoActive, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Heat Recovery Active Time [hr]', PurchAir(PurchAirNum)%TimeHtRecActive, &
'System','Sum',PurchAir(PurchAirNum)%Name)
CALL SetupOutputVariable('Zone Ideal Loads Hybrid Ventilation Available Status []',PurchAir(PurchAirNum)%AvailStatus,&
'System','Average',PurchAir(PurchAirNum)%Name)
IF (AnyEnergyManagementSystemInModel) THEN
CALL SetupEMSActuator('Ideal Loads Air System', PurchAir(PurchAirNum)%Name, 'Air Mass Flow Rate' , '[kg/s]', &
PurchAir(PurchAirNum)%EMSOverrideMdotOn, PurchAir(PurchAirNum)%EMSValueMassFlowRate )
CALL SetupEMSActuator('Ideal Loads Air System', PurchAir(PurchAirNum)%Name, 'Outdoor Air Mass Flow Rate' , '[kg/s]', &
PurchAir(PurchAirNum)%EMSOverrideOAMdotOn, PurchAir(PurchAirNum)%EMSValueOAMassFlowRate )
CALL SetupEMSActuator('Ideal Loads Air System', PurchAir(PurchAirNum)%Name, 'Air Temperature' , '[C]', &
PurchAir(PurchAirNum)%EMSOverrideSupplyTempOn, PurchAir(PurchAirNum)%EMSValueSupplyTemp )
CALL SetupEMSActuator('Ideal Loads Air System', PurchAir(PurchAirNum)%Name, 'Air Humidity Ratio' , '[kgWater/kgDryAir]', &
PurchAir(PurchAirNum)%EMSOverrideSupplyHumRatOn, PurchAir(PurchAirNum)%EMSValueSupplyHumRat )
ENDIF
END DO
IF (ErrorsFound) THEN
CALL ShowFatalError(RoutineName//'Errors found in input. Preceding conditions cause termination.')
ENDIF
RETURN
END SUBROUTINE GetPurchasedAir