SUBROUTINE GetStandAloneERV
! SUBROUTINE INFORMATION:
! AUTHOR Richard Raustad
! DATE WRITTEN June 2003
! MODIFIED July 2012, Chandan Sharma - FSEC: Added zone sys avail managers
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Obtains input data for Stand Alone ERV units and stores it in the Stand Alone ERV data structure
! METHODOLOGY EMPLOYED:
! Uses "Get" routines to read in data.
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem, VerifyName, GetObjectItemNum, GetObjectDefMaxArgs, &
FindItemInList, SameString
USE NodeInputManager, ONLY: GetOnlySingleNode
USE BranchNodeConnections, ONLY: SetUpCompSets
USE MixedAir, ONLY: SetOAControllerData,CheckOAControllerName
USE DataHeatBalance, ONLY: Zone
USE DataZoneEquipment, ONLY: ZoneEquipConfig, ERVStandAlone_Num
USE DataZoneControls, ONLY: HumidityControlZone, NumHumidityControlZones
USE Fans, ONLY: GetFanAvailSchPtr, GetFanType, GetFanDesignVolumeFlowRate, GetFanIndex, &
GetFanOutletNode
USE DataSizing, ONLY: AutoSize
USE General, ONLY: RoundSigDigits
USE HeatRecovery, ONLY: GetGenericSupplyAirFlowRate=>GetSupplyAirFlowRate, GetHeatExchangerObjectTypeNum, &
GetHXSupplyInletNode=>GetSupplyInletNode, GetHXSupplyOutletNode=>GetSupplyOutletNode, &
GetHXSecondaryInletNode=>GetSecondaryInletNode, GetHXSecondaryOutletNode=>GetSecondaryOutletNode
USE OutAirNodeManager, ONLY: CheckOutAirNodeNumber
USE CurveManager, ONLY: GetCurveIndex, GetCurveType
USE DataIPShortCuts
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 :: StandAloneERVIndex ! loop index
INTEGER :: StandAloneERVNum ! current Stand Alone ERV number
CHARACTER(len=MaxNameLength), ALLOCATABLE, &
DIMENSION(:) :: Alphas ! Alpha items for object
REAL(r64), ALLOCATABLE, DIMENSION(:) :: Numbers ! Numeric items for object
CHARACTER(Len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cAlphaFields
CHARACTER(Len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cNumericFields
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lAlphaBlanks
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lNumericBlanks
CHARACTER(len=MaxNameLength) :: CompSetSupplyFanInlet, CompSetSupplyFanOutlet
CHARACTER(len=MaxNameLength) :: CompSetExhaustFanInlet, CompSetExhaustFanOutlet
CHARACTER(len=MaxNameLength) :: CurrentModuleObject ! Object type for getting and error messages
INTEGER :: SAFanTypeNum ! Integer equivalent to fan type
INTEGER :: EAFanTypeNum ! Integer equivalent to fan type
INTEGER :: NumArg
INTEGER :: NumAlphas ! Number of Alphas for each GetObjectItem call
INTEGER :: NumNumbers ! Number of Numbers for each GetObjectItem call
INTEGER :: MaxAlphas ! Max between the two objects gotten here
INTEGER :: MaxNumbers ! Max between the two objects gotten here
INTEGER :: IOStatus ! Used in GetObjectItem
LOGICAL :: ErrorsFound=.FALSE. ! Set to true if errors in input, fatal at end of routine
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
INTEGER :: OutAirNum ! total number of CONTROLLER:OUTSIDE AIR objects
INTEGER :: NumERVCtrlrs ! total number of CONTROLLER:STAND ALONE ERV objects
INTEGER :: ERVControllerNum ! index to ERV controller
INTEGER :: WhichERV ! used in controller GetInput
REAL(r64) :: AirFlowRate ! used to find zone with humidistat
INTEGER :: NodeNumber ! used to find zone with humidistat
INTEGER :: HStatZoneNum ! used to find zone with humidistat
INTEGER :: NumHstatZone ! index to humidity controlled zones
INTEGER :: ControlledZoneNum = 0 ! used to find zone with humidistat
LOGICAL :: ZoneNodeFound = .FALSE. ! used to find zone with humidistat
LOGICAL :: HStatFound = .FALSE. ! used to find zone with humidistat
LOGICAL :: ErrFlag ! Error flag used in mining calls
REAL(r64) :: SAFanVolFlowRate ! supply air fan volumetric flow rate [m3/s]
REAL(r64) :: EAFanVolFlowRate ! exhaust air fan volumetric flow rate [m3/s]
REAL(r64) :: HXSupAirFlowRate ! HX supply air flow rate [m3/s]
REAL(r64) :: HighRHOARatio ! local variable for HighRHOAFlowRatio
LOGICAL :: ZoneInletNodeFound ! used for warning when zone node not listed in equipment connections
LOGICAL :: ZoneExhaustNodeFound ! used for warning when zone node not listed in equipment connections
INTEGER :: ZoneInletCZN ! used for warning when zone node not listed in equipment connections
INTEGER :: ZoneExhaustCZN ! used for warning when zone node not listed in equipment connections
CALL GetObjectDefMaxArgs('ZoneHVAC:EnergyRecoveryVentilator',NumArg,NumAlphas,NumNumbers)
MaxAlphas=NumAlphas
MaxNumbers=NumNumbers
CALL GetObjectDefMaxArgs('ZoneHVAC:EnergyRecoveryVentilator:Controller',NumArg,NumAlphas,NumNumbers)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
MaxNumbers=MAX(MaxNumbers,NumNumbers)
ALLOCATE(Alphas(MaxAlphas))
Alphas=' '
ALLOCATE(Numbers(MaxNumbers))
Numbers=0.0d0
ALLOCATE(cAlphaFields(MaxAlphas))
cAlphaFields=' '
ALLOCATE(cNumericFields(MaxNumbers))
cNumericFields=' '
ALLOCATE(lNumericBlanks(MaxNumbers))
lNumericBlanks = .FALSE.
ALLOCATE(lAlphaBlanks(MaxAlphas))
lAlphaBlanks = .FALSE.
GetERVInputFlag=.FALSE.
! find the number of each type of Stand Alone ERV unit
CurrentModuleObject = 'ZoneHVAC:EnergyRecoveryVentilator'
NumStandAloneERVs = GetNumObjectsFound(CurrentModuleObject)
! allocate the data structures
ALLOCATE(StandAloneERV(NumStandAloneERVs))
ALLOCATE(CheckEquipName(NumStandAloneERVs))
CheckEquipName=.true.
! loop over Stand Alone ERV units; get and load the input data
DO StandAloneERVIndex = 1,NumStandAloneERVs
CALL GetObjectItem(CurrentModuleObject,StandAloneERVIndex,Alphas,NumAlphas,Numbers,NumNumbers,IOStatus, &
AlphaBlank=lAlphaBlanks,NumBlank=lNumericBlanks, &
AlphaFieldnames=cAlphaFields,NumericFieldNames=cNumericFields)
StandAloneERVNum = StandAloneERVIndex ! separate variables in case other objects read by this module at some point later
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(Alphas(1),StandAloneERV%Name,StandAloneERVNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) Alphas(1)='xxxxx'
ENDIF
StandAloneERV(StandAloneERVNum)%Name = Alphas(1)
StandAloneERV(StandAloneERVNum)%UnitType = CurrentModuleObject
IF (lAlphaBlanks(2)) THEN
StandAloneERV(StandAloneERVNum)%SchedPtr = ScheduleAlwaysOn
ELSE
StandAloneERV(StandAloneERVNum)%SchedPtr = GetScheduleIndex(Alphas(2)) ! convert schedule name to pointer
IF (StandAloneERV(StandAloneERVNum)%SchedPtr .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//', "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//&
'" '//TRIM(cAlphaFields(2))//' not found = '//TRIM(Alphas(2)))
ErrorsFound=.TRUE.
ENDIF
END IF
CALL VerifyName(Alphas(3),StandAloneERV%HeatExchangerName,StandAloneERVNum-1,IsNotOK,IsBlank, &
'HeatExchanger:AirToAir:SensibleAndLatent')
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) Alphas(3)='xxxxx'
ENDIF
StandAloneERV(StandAloneERVNum)%HeatExchangerName = Alphas(3)
ErrFlag = .FALSE.
StandAloneERV(StandAloneERVNum)%HeatExchangerTypeNum = &
GetHeatExchangerObjectTypeNum(StandAloneERV(StandAloneERVNum)%HeatExchangerName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('... occurs in '//TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
ErrorsFound = .TRUE.
END IF
ErrFlag = .FALSE.
HXSupAirFlowRate = GetGenericSupplyAirFlowRate(StandAloneERV(StandAloneERVNum)%HeatExchangerName, ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('... occurs in '//TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
ErrorsFound = .TRUE.
END IF
StandAloneERV(StandAloneERVNum)%SupplyAirFanName = Alphas(4)
CALL VerifyName(Alphas(4),StandAloneERV%SupplyAirFanName,StandAloneERVNum-1,IsNotOK,IsBlank,'Fan:OnOff')
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) Alphas(4)='xxxxx'
ENDIF
ErrFlag = .FALSE.
CALL GetFanType(StandAloneERV(StandAloneERVNum)%SupplyAirFanName,SAFanTypeNum,ErrFlag, &
CurrentModuleObject,StandAloneERV(StandAloneERVNum)%Name)
IF(ErrFlag)THEN
ErrorsFound = .TRUE.
END IF
StandAloneERV(StandAloneERVNum)%SupplyAirFanType_Num = SAFanTypeNum
ErrFlag = .FALSE.
StandAloneERV(StandAloneERVNum)%SupplyAirFanSchPtr = GetFanAvailSchPtr(cFanTypes(SAFanTypeNum), &
StandAloneERV(StandAloneERVNum)%SupplyAirFanName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('... occurs in '//TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
ErrorsFound = .TRUE.
END IF
CALL GetFanIndex(StandAloneERV(StandAloneERVNum)%SupplyAirFanName,StandAloneERV(StandAloneERVNum)%SupplyAirFanIndex, &
ErrFlag,TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
!Set the SA Design Fan Volume Flow Rate
! get from fan module
ErrFlag = .FALSE.
SAFanVolFlowRate = &
GetFanDesignVolumeFlowRate(cFanTypes(SAFanTypeNum),StandAloneERV(StandAloneERVNum)%SupplyAirFanName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('... occurs in '//TRIM(CurrentModuleObject)//' ='//TRIM(StandAloneERV(StandAloneERVNum)%Name))
ErrorsFound=.TRUE.
ENDIF
StandAloneERV(StandAloneERVNum)%DesignSAFanVolFlowRate = SAFanVolFlowRate
StandAloneERV(StandAloneERVNum)%ExhaustAirFanName = Alphas(5)
CALL VerifyName(Alphas(5),StandAloneERV%ExhaustAirFanName,StandAloneERVNum-1,IsNotOK,IsBlank,'Fan:OnOff Name')
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) Alphas(5)='xxxxx'
ENDIF
ErrFlag = .FALSE.
CALL GetFanType(StandAloneERV(StandAloneERVNum)%ExhaustAirFanName,EAFanTypeNum,ErrFlag, &
CurrentModuleObject,StandAloneERV(StandAloneERVNum)%Name)
IF (.not. ErrFlag) THEN
StandAloneERV(StandAloneERVNum)%ExhaustAirFanType_Num = EAFanTypeNum
! error for fan availability schedule?
StandAloneERV(StandAloneERVNum)%ExhaustAirFanSchPtr = GetFanAvailSchPtr(cFanTypes(EAFanTypeNum), &
StandAloneERV(StandAloneERVNum)%ExhaustAirFanName,ErrFlag)
CALL GetFanIndex(StandAloneERV(StandAloneERVNum)%ExhaustAirFanName,StandAloneERV(StandAloneERVNum)%ExhaustAirFanIndex, &
ErrFlag,TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
ELSE
ErrorsFound = .TRUE.
END IF
!Set the EA Design Fan Volume Flow Rate
! get from fan module
ErrFlag = .FALSE.
EAFanVolFlowRate = &
GetFanDesignVolumeFlowRate(cFanTypes(EAFanTypeNum),StandAloneERV(StandAloneERVNum)%ExhaustAirFanName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('... occurs in '//TRIM(CurrentModuleObject)//' ='//TRIM(StandAloneERV(StandAloneERVNum)%Name))
ErrorsFound=.TRUE.
ENDIF
StandAloneERV(StandAloneERVNum)%DesignEAFanVolFlowRate = EAFanVolFlowRate
ErrFlag = .FALSE.
StandAloneERV(StandAloneERVNum)%SupplyAirInletNode = &
GetHXSupplyInletNode(StandAloneERV(StandAloneERVNum)%HeatExchangerName, ErrFlag)
StandAloneERV(StandAloneERVNum)%ExhaustAirInletNode = &
GetHXSecondaryInletNode(StandAloneERV(StandAloneERVNum)%HeatExchangerName, ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('... occurs in '//TRIM(CurrentModuleObject)//' ='//TRIM(StandAloneERV(StandAloneERVNum)%Name))
ErrorsFound=.TRUE.
ENDIF
ErrFlag = .FALSE.
StandAloneERV(StandAloneERVNum)%SupplyAirOutletNode = &
GetFanOutletNode(cFanTypes(SAFanTypeNum),StandAloneERV(StandAloneERVNum)%SupplyAirFanName,ErrFlag)
StandAloneERV(StandAloneERVNum)%ExhaustAirOutletNode = &
GetFanOutletNode(cFanTypes(EAFanTypeNum),StandAloneERV(StandAloneERVNum)%ExhaustAirFanName,ErrFlag)
IF (ErrFlag) THEN
CALL ShowContinueError('... occurs in '//TRIM(CurrentModuleObject)//' ='//TRIM(StandAloneERV(StandAloneERVNum)%Name))
ErrorsFound=.TRUE.
ENDIF
StandAloneERV(StandAloneERVNum)%SupplyAirInletNode = &
GetOnlySingleNode(NodeID(StandAloneERV(StandAloneERVNum)%SupplyAirInletNode), &
ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsParent)
StandAloneERV(StandAloneERVNum)%SupplyAirOutletNode = &
GetOnlySingleNode(NodeID(StandAloneERV(StandAloneERVNum)%SupplyAirOutletNode), &
ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent)
StandAloneERV(StandAloneERVNum)%ExhaustAirInletNode = &
GetOnlySingleNode(NodeID(StandAloneERV(StandAloneERVNum)%ExhaustAirInletNode), &
ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_Inlet,2,ObjectIsParent)
StandAloneERV(StandAloneERVNum)%ExhaustAirOutletNode = &
GetOnlySingleNode(NodeID(StandAloneERV(StandAloneERVNum)%ExhaustAirOutletNode), &
ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_ReliefAir,2,ObjectIsParent)
! Check that supply air inlet node is an OA node
IF (.not. CheckOutAirNodeNumber(StandAloneERV(StandAloneERVNum)%SupplyAirInletNode)) THEN
CALL ShowSevereError('For '//TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
CALL ShowContinueError(' Node name of supply air inlet node not valid Outdoor Air Node = '// &
TRIM(NodeID(StandAloneERV(StandAloneERVNum)%SupplyAirInletNode)))
CALL ShowContinueError('...does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.')
ErrorsFound=.true.
END IF
! Check to make sure inlet and exhaust nodes are listed in a ZoneHVAC:EquipmentConnections object
ZoneInletNodeFound = .FALSE.
ZoneExhaustNodeFound = .FALSE.
DO ControlledZoneNum = 1,NumOfZones
IF(.NOT. ZoneInletNodeFound)THEN
DO NodeNumber = 1,ZoneEquipConfig(ControlledZoneNum)%NumInletNodes
IF(ZoneEquipConfig(ControlledZoneNum)%InletNode(NodeNumber)==StandAloneERV(StandAloneERVNum)%SupplyAirOutletNode)THEN
ZoneInletNodeFound = .TRUE.
ZoneInletCZN = ControlledZoneNum
EXIT ! found zone inlet node
END IF
END DO
END IF
IF(.NOT. ZoneExhaustNodeFound)THEN
DO NodeNumber = 1,ZoneEquipConfig(ControlledZoneNum)%NumExhaustNodes
IF(ZoneEquipConfig(ControlledZoneNum)%ExhaustNode(NodeNumber)==StandAloneERV(StandAloneERVNum)%ExhaustAirInletNode)THEN
ZoneExhaustNodeFound = .TRUE.
ZoneExhaustCZN = ControlledZoneNum
EXIT ! found zone exhaust node
END IF
END DO
END IF
END DO
IF(.NOT. ZoneInletNodeFound)THEN
CALL ShowSevereError('For '//TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
CALL ShowContinueError('... Node name of supply air outlet node does not appear in a ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('... Supply air outlet node = '//TRIM(NodeID(StandAloneERV(StandAloneERVNum)%SupplyAirOutletNode)))
ErrorsFound=.true.
END IF
IF(.NOT. ZoneExhaustNodeFound)THEN
CALL ShowSevereError('For '//TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
CALL ShowContinueError('... Node name of exhaust air inlet node does not appear in a ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('... Exhaust air inlet node = '//TRIM(NodeID(StandAloneERV(StandAloneERVNum)%ExhaustAirInletNode)))
ErrorsFound=.true.
END IF
! If nodes are found, make sure they are in the same zone
IF(ZoneInletNodeFound .AND. ZoneExhaustNodeFound)THEN
IF(ZoneInletCZN /= ZoneExhaustCZN)THEN
CALL ShowSevereError('For '//TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
CALL ShowContinueError('... Node name of supply air outlet node and exhasut air inlet node must appear in the same '// &
'ZoneHVAC:EquipmentConnections object.')
CALL ShowContinueError('... Supply air outlet node = '//TRIM(NodeID(StandAloneERV(StandAloneERVNum)%SupplyAirOutletNode)))
CALL ShowContinueError('... ZoneHVAC:EquipmentConnections Zone Name = '//TRIM(ZoneEquipConfig(ZoneInletCZN)%ZoneName))
CALL ShowContinueError('... Exhaust air inlet node = '//TRIM(NodeID(StandAloneERV(StandAloneERVNum)%ExhaustAirInletNode)))
CALL ShowContinueError('... ZoneHVAC:EquipmentConnections Zone Name = '//TRIM(ZoneEquipConfig(ZoneExhaustCZN)%ZoneName))
ErrorsFound=.true.
END IF
END IF
StandAloneERV(StandAloneERVNum)%ControllerName = Alphas(6)
! If controller name is blank the ERV unit will operate with no controller
IF(lAlphaBlanks(6))THEN
StandAloneERV(StandAloneERVNum)%ControllerName = 'xxxxx'
StandAloneERV(StandAloneERVNum)%ControllerNameDefined = .FALSE.
ELSE
! Verify controller name in Stand Alone ERV object matches name of valid controller object
CALL VerifyName(Alphas(6),StandAloneERV%ControllerName,StandAloneERVNum-1,IsNotOK,IsBlank, &
'ZoneHVAC:EnergyRecoveryVentilator:Controller Name')
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) Alphas(6)='xxxxx'
ENDIF
IF(GetObjectItemNum('ZoneHVAC:EnergyRecoveryVentilator:Controller',StandAloneERV(StandAloneERVNum)%ControllerName) <= 0)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' controller '&
//'type ZoneHVAC:EnergyRecoveryVentilator:Controller not found = '//TRIM(Alphas(6)))
ErrorsFound = .TRUE.
ENDIF
ENDIF
IF (.NOT. lAlphaBlanks(7)) THEN
StandAloneERV(StandAloneERVNum)%AvailManagerListName = Alphas(7)
ZoneComp(ERVStandAlone_Num)%ZoneCompAvailMgrs(StandAloneERVNum)%AvailManagerListName = Alphas(7)
ENDIF
! Read supply and exhaust air flow rates
StandAloneERV(StandAloneERVNum)%SupplyAirVolFlow = Numbers(1)
StandAloneERV(StandAloneERVNum)%ExhaustAirVolFlow = Numbers(2)
! Read ventilation rate per floor area for autosizing HX and fans
StandAloneERV(StandAloneERVNum)%AirVolFlowPerFloorArea = Numbers(3)
StandAloneERV(StandAloneERVNum)%AirVolFlowPerOccupant = Numbers(4)
IF(StandAloneERV(StandAloneERVNum)%SupplyAirVolFlow == AutoSize .AND. SAFanVolFlowRate /= AutoSize)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
CALL ShowContinueError('... When autosizing ERV, supply air fan = '//TRIM(cFanTypes(SAFanTypeNum))//' "'// &
TRIM(StandAloneERV(StandAloneERVNum)%SupplyAirFanName)//'" must also be autosized.')
END IF
IF(StandAloneERV(StandAloneERVNum)%ExhaustAirVolFlow == AutoSize .AND. EAFanVolFlowRate /= AutoSize)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
CALL ShowContinueError('... When autosizing ERV, exhaust air fan = '//TRIM(cFanTypes(EAFanTypeNum))//' "'// &
TRIM(StandAloneERV(StandAloneERVNum)%ExhaustAirFanName)//'" must also be autosized.')
END IF
IF(StandAloneERV(StandAloneERVNum)%SupplyAirVolFlow == AutoSize .AND. HXSupAirFlowRate /= AutoSize)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
CALL ShowContinueError('... When autosizing ERV '//TRIM(cNumericFields(1))//', nominal supply air flow rate for heat '// &
'exchanger with name = '//TRIM(StandAloneERV(StandAloneERVNum)%HeatExchangerName)//' must also be autosized.')
END IF
IF(StandAloneERV(StandAloneERVNum)%ExhaustAirVolFlow == AutoSize .AND. HXSupAirFlowRate /= AutoSize)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
CALL ShowContinueError('... When autosizing ERV '//TRIM(cNumericFields(2))//', nominal supply air flow rate for heat '// &
'exchanger with name = '//TRIM(StandAloneERV(StandAloneERVNum)%HeatExchangerName)//' must also be autosized.')
END IF
! Compare the ERV SA flow rates to SA fan object.
IF (SAFanVolFlowRate /= AutoSize .and. StandAloneERV(StandAloneERVNum)%SupplyAirVolFlow /= AutoSize) THEN
IF (StandAloneERV(StandAloneERVNum)%SupplyAirVolFlow > SAFanVolFlowRate) THEN
CALL ShowWarningError(TRIM(CurrentModuleObject)//' = '//TRIM(StandAloneERV(StandAloneERVNum)%Name)// &
' has a '//TRIM(cNumericFields(1))//' > Max Volume Flow Rate defined in the associated fan object, should be <=')
CALL ShowContinueError('... Entered value='//TRIM(RoundSigDigits(StandAloneERV(StandAloneERVNum)%SupplyAirVolFlow,2))// &
'... Fan ['//TRIM(cFanTypes(SAFanTypeNum))//' "'//TRIM(StandAloneERV(StandAloneERVNum)%SupplyAirFanName)// &
'"] Max Value = '//TRIM(RoundSigDigits(SAFanVolFlowRate,2)))
CALL ShowContinueError(' The ERV '//TRIM(cNumericFields(1))//' is reset to the' &
//' supply air fan flow rate and the simulation continues.')
StandAloneERV(StandAloneERVNum)%SupplyAirVolFlow = SAFanVolFlowRate
ENDIF
ENDIF
IF (StandAloneERV(StandAloneERVNum)%SupplyAirVolFlow /= AutoSize) THEN
IF (StandAloneERV(StandAloneERVNum)%SupplyAirVolFlow <= 0.0d0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(StandAloneERV(StandAloneERVNum)%Name)// &
' has a '//TRIM(cNumericFields(1))//' <= 0.0, it must be >0.0')
CALL ShowContinueError('... Entered value='//TRIM(RoundSigDigits(StandAloneERV(StandAloneERVNum)%SupplyAirVolFlow,2)))
ErrorsFound=.TRUE.
ENDIF
ELSE
IF(StandAloneERV(StandAloneERVNum)%AirVolFlowPerFloorArea .EQ. 0.0d0 .AND. &
StandAloneERV(StandAloneERVNum)%AirVolFlowPerOccupant .EQ. 0.0d0)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
CALL ShowContinueError('... Autosizing '//TRIM(cNumericFields(1))//' requires at least one input for '// &
TRIM(cNumericFields(3))//' or '//TRIM(cNumericFields(4))//'.')
ErrorsFound=.TRUE.
END IF
! both inputs must be autosized
IF (StandAloneERV(StandAloneERVNum)%ExhaustAirVolFlow /= AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
CALL ShowContinueError('... When autosizing, '//TRIM(cNumericFields(1))//' and '//TRIM(cNumericFields(2))//&
' must both be autosized.')
ErrorsFound=.TRUE.
END IF
ENDIF
! Compare the ERV EA flow rates to EA fan object.
IF (EAFanVolFlowRate /= AutoSize .and. StandAloneERV(StandAloneERVNum)%ExhaustAirVolFlow /= AutoSize) THEN
IF (StandAloneERV(StandAloneERVNum)%ExhaustAirVolFlow > EAFanVolFlowRate) THEN
CALL ShowWarningError(TRIM(CurrentModuleObject)//' = '//TRIM(StandAloneERV(StandAloneERVNum)%Name)// &
' has an '//TRIM(cNumericFields(2))//' > Max Volume Flow Rate defined in the associated fan object, should be <=')
CALL ShowContinueError('... Entered value='//TRIM(RoundSigDigits(StandAloneERV(StandAloneERVNum)%ExhaustAirVolFlow,2))// &
'... Fan ['//TRIM(cFanTypes(EAFanTypeNum))//':'//TRIM(StandAloneERV(StandAloneERVNum)%ExhaustAirFanName)// &
'] Max Value = '//TRIM(RoundSigDigits(EAFanVolFlowRate,2)))
CALL ShowContinueError(' The ERV '//TRIM(cNumericFields(2))//' is reset to the' &
//' exhaust air fan flow rate and the simulation continues.')
StandAloneERV(StandAloneERVNum)%ExhaustAirVolFlow = EAFanVolFlowRate
ENDIF
ENDIF
IF (StandAloneERV(StandAloneERVNum)%ExhaustAirVolFlow /= AutoSize) THEN
IF (StandAloneERV(StandAloneERVNum)%ExhaustAirVolFlow <= 0.0d0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(StandAloneERV(StandAloneERVNum)%Name)// &
' has an '//TRIM(cNumericFields(2))//' <= 0.0, it must be >0.0')
CALL ShowContinueError('... Entered value='//TRIM(RoundSigDigits(StandAloneERV(StandAloneERVNum)%ExhaustAirVolFlow,2)))
ErrorsFound=.TRUE.
ENDIF
ELSE
IF(StandAloneERV(StandAloneERVNum)%AirVolFlowPerFloorArea .EQ. 0.0d0 .AND. &
StandAloneERV(StandAloneERVNum)%AirVolFlowPerOccupant .EQ. 0.0d0)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
CALL ShowContinueError('... Autosizing '//TRIM(cNumericFields(2))//' requires at least one input for '// &
TRIM(cNumericFields(3))//' or '//TRIM(cNumericFields(4))//'.')
ErrorsFound=.TRUE.
END IF
IF (StandAloneERV(StandAloneERVNum)%SupplyAirVolFlow /= AutoSize) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(StandAloneERV(StandAloneERVNum)%Name)//'"')
CALL ShowContinueError('... When autosizing, '//TRIM(cNumericFields(1))//' and '//TRIM(cNumericFields(2))//&
' must both be autosized.')
ErrorsFound=.TRUE.
END IF
ENDIF
! Add supply fan to component sets array
CompSetSupplyFanInlet = 'UNDEFINED'
CompSetSupplyFanOutlet = NodeID(StandAloneERV(StandAloneERVNum)%SupplyAirOutletNode)
! Add exhaust fan to component sets array
CompSetExhaustFanInlet = 'UNDEFINED'
CompSetExhaustFanOutlet = NodeID(StandAloneERV(StandAloneERVNum)%ExhaustAirOutletNode)
! Add HX to component sets array
CALL SetUpCompSets(StandAloneERV(StandAloneERVNum)%UnitType, StandAloneERV(StandAloneERVNum)%Name, &
'UNDEFINED',StandAloneERV(StandAloneERVNum)%HeatExchangerName,'UNDEFINED','UNDEFINED')
! Add supply fan to component sets array
CALL SetUpCompSets(StandAloneERV(StandAloneERVNum)%UnitType, StandAloneERV(StandAloneERVNum)%Name, &
'UNDEFINED',StandAloneERV(StandAloneERVNum)%SupplyAirFanName,CompSetSupplyFanInlet,CompSetSupplyFanOutlet)
! Add exhaust fan to component sets array
CALL SetUpCompSets(StandAloneERV(StandAloneERVNum)%UnitType, StandAloneERV(StandAloneERVNum)%Name, &
'UNDEFINED',StandAloneERV(StandAloneERVNum)%ExhaustAirFanName,CompSetExhaustFanInlet,CompSetExhaustFanOutlet)
! Verify HX name in Stand Alone ERV object matches name of valid HX object
IF(GetObjectItemNum('HeatExchanger:AirToAir:SensibleAndLatent',StandAloneERV(StandAloneERVNum)%HeatExchangerName) <= 0)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' heat exchanger '&
//'type HeatExchanger:AirToAir:SensibleAndLatent not found = ' &
//TRIM(StandAloneERV(StandAloneERVNum)%HeatExchangerName))
ErrorsFound = .TRUE.
END IF
! Verify supply air fan name in Stand Alone ERV object matches name of valid fan object
IF(GetObjectItemNum('Fan:OnOff',StandAloneERV(StandAloneERVNum)%SupplyAirFanName) <= 0)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' supply fan '&
//'type Fan:OnOff not found = '//TRIM(StandAloneERV(StandAloneERVNum)%SupplyAirFanName))
ErrorsFound = .TRUE.
END IF
! Verify exhaust air fan name in Stand Alone ERV object matches name of valid fan object
IF(GetObjectItemNum('Fan:OnOff',StandAloneERV(StandAloneERVNum)%ExhaustAirFanName) <= 0)THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' exhaust fan '&
//'type Fan:OnOff not found = '//TRIM(StandAloneERV(StandAloneERVNum)%ExhaustAirFanName))
ErrorsFound = .TRUE.
END IF
END DO
OutAirNum = GetNumObjectsFound('Controller:OutdoorAir')
CurrentModuleObject='ZoneHVAC:EnergyRecoveryVentilator:Controller'
NumERVCtrlrs = GetNumObjectsFound(CurrentModuleObject)
DO ERVControllerNum=1,NumERVCtrlrs
CALL GetObjectItem(CurrentModuleObject,ERVControllerNum,Alphas,NumAlphas,Numbers,NumNumbers,IOStatus, &
AlphaBlank=lAlphaBlanks,NumBlank=lNumericBlanks, &
AlphaFieldnames=cAlphaFields,NumericFieldNames=cNumericFields)
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL CheckOAControllerName(Alphas(1),OutAirNum,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) Alphas(1)='xxxxx'
ENDIF
OutAirNum=OutAirNum+1
CALL SetOAControllerData(OutAirNum,ErrorsFound,Name=Alphas(1))
CALL SetOAControllerData(OutAirNum,ErrorsFound,ControllerType=TRIM(CurrentModuleObject))
CALL SetOAControllerData(OutAirNum,ErrorsFound,ControllerType_Num=ControllerStandAloneERV)
WhichERV=FindItemInList(Alphas(1),StandAloneERV%ControllerName,NumStandAloneERVs)
IF (WhichERV /= 0) THEN
AirFlowRate=StandAloneERV(WhichERV)%SupplyAirVolFlow
StandAloneERV(WhichERV)%ControllerIndex = OutAirNum
ELSE
CALL ShowSevereError('GetERVController: Could not find ZoneHVAC:EnergyRecoveryVentilator with '// &
TRIM(cAlphaFields(1))//' = "'//TRIM(Alphas(1))//'"')
ErrorsFound=.TRUE.
AirFlowRate=-1000.d0
ENDIF
CALL SetOAControllerData(OutAirNum,ErrorsFound,MinOA=AirFlowRate)
CALL SetOAControllerData(OutAirNum,ErrorsFound,MaxOA=AirFlowRate)
! OAController(OutAirNum)%TempLim = Numbers(1)
IF (lNumericBlanks(1)) THEN
CALL SetOAControllerData(OutAirNum,ErrorsFound,TempLim=BlankNumeric)
ELSE
CALL SetOAControllerData(OutAirNum,ErrorsFound,TempLim=Numbers(1))
END IF
! OAController(OutAirNum)%TempLowLim = Numbers(2)
IF (lNumericBlanks(2)) THEN
CALL SetOAControllerData(OutAirNum,ErrorsFound,TempLowLim=BlankNumeric)
ELSE
CALL SetOAControllerData(OutAirNum,ErrorsFound,TempLowLim=Numbers(2))
END IF
! OAController(OutAirNum)%EnthLim = Numbers(3)
IF (lNumericBlanks(3)) THEN
CALL SetOAControllerData(OutAirNum,ErrorsFound,EnthLim=BlankNumeric)
ELSE
CALL SetOAControllerData(OutAirNum,ErrorsFound,EnthLim=Numbers(3))
END IF
! OAController(OutAirNum)%DPTempLim = Numbers(4)
IF (lNumericBlanks(4)) THEN
CALL SetOAControllerData(OutAirNum,ErrorsFound,DPTempLim=BlankNumeric)
ELSE
CALL SetOAControllerData(OutAirNum,ErrorsFound,DPTempLim=Numbers(4))
END IF
IF (WhichERV /= 0) THEN
NodeNumber=StandAloneERV(WhichERV)%SupplyAirInletNode
ELSE
NodeNumber=0
ENDIF
CALL SetOAControllerData(OutAirNum,ErrorsFound,OANode=NodeNumber)
! set the inlet node to also equal the OA node because this is a special controller for economizing stand alone ERV
! with the assumption that equipment is bypassed....(moved from module MixedAir)
CALL SetOAControllerData(OutAirNum,ErrorsFound,InletNode=NodeNumber)
IF (WhichERV /= 0) THEN
NodeNumber=StandAloneERV(WhichERV)%ExhaustAirInletNode
ELSE
NodeNumber=0
ENDIF
CALL SetOAControllerData(OutAirNum,ErrorsFound,RetNode=NodeNumber)
IF(.NOT. lAlphaBlanks(2))THEN
CALL SetOAControllerData(OutAirNum,ErrorsFound,EnthalpyCurvePtr=GetCurveIndex(Alphas(2)))
IF (GetCurveIndex(Alphas(2)) .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('...'//TRIM(cAlphaFields(2))//' not found:'//TRIM(Alphas(2)))
ErrorsFound = .TRUE.
ELSE
! Verify Curve Object, only legal types are Quadratic and Cubic
SELECT CASE(GetCurveType(GetCurveIndex(Alphas(2))))
CASE('QUADRATIC')
CASE('CUBIC')
CASE DEFAULT
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('...illegal '//TRIM(cAlphaFields(2))//' type for this object = '// &
TRIM(GetCurveType(GetCurveIndex(Alphas(2)))))
ErrorsFound=.true.
END SELECT
END IF
END IF
! Changed by AMIT for new implementation of the controller:outside air
IF (Alphas(3).EQ.'EXHAUSTAIRTEMPERATURELIMIT' .AND. Alphas(4).EQ.'EXHAUSTAIRENTHALPYLIMIT') THEN
CALL SetOAControllerData(OutAirNum, Errorsfound,Econotype = 'DIFFERENTIALDRYBULBANDENTHALPY')
ELSEIF (Alphas(3).EQ.'EXHAUSTAIRTEMPERATURELIMIT'.AND. Alphas(4).EQ.'NOEXHAUSTAIRENTHALPYLIMIT') THEN
CALL SetOAControllerData(OutAirNum, Errorsfound,Econotype = 'DIFFERENTIALDRYBULB')
ELSEIF (Alphas(3).EQ.'NOEXHAUSTAIRTEMPERATURELIMIT'.AND. Alphas(4).EQ.'EXHAUSTAIRENTHALPYLIMIT') THEN
CALL SetOAControllerData(OutAirNum, Errorsfound,Econotype = 'DIFFERENTIALENTHALPY')
ELSEIF (Alphas(3).EQ.'NOEXHAUSTAIRTEMPERATURELIMIT'.AND. Alphas(4).EQ.'NOEXHAUSTAIRENTHALPYLIMIT') THEN
IF ((.NOT.lNumericBlanks(1)) .OR. (.NOT.lNumericBlanks(3)) .OR. (.NOT.lNumericBlanks(4)) .OR. (.NOT.lAlphaBlanks(2)) ) THEN
! This means that any of the FIXED DRY BULB, FIXED ENTHALPY, FIXED DEW POINT AND DRY BULB OR
! ELECTRONIC ENTHALPY ECONOMIZER STRATEGY is present
CALL SetOAControllerData(OutAirNum, Errorsfound,Econotype = 'ECONOMIZER STRATEGY PRESENT')
END IF
ELSE IF((.NOT.lAlphaBlanks(3)).AND.(.NOT.lAlphaBlanks(4))) THEN
IF ((lNumericBlanks(1)) .AND. (lNumericBlanks(3)) .AND. (lNumericBlanks(4)) .AND. lAlphaBlanks(2) ) THEN
CALL ShowWarningError(TRIM(CurrentModuleObject)//' "'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('... Invalid '//TRIM(cAlphaFields(3))//TRIM(cAlphaFields(4))//' = '// &
TRIM(Alphas(3))//TRIM(Alphas(4)))
CALL ShowContinueError('... Assumed NO EXHAUST AIR TEMP LIMIT and NO EXHAUST AIR ENTHALPY LIMIT.')
CALL SetOAControllerData(OutAirNum, Errorsfound,Econotype = 'NOECONOMIZER')
ELSE
! This means that any of the FIXED DRY BULB, FIXED ENTHALPY, FIXED DEW POINT AND DRY BULB OR
! ELECTRONIC ENTHALPY ECONOMIZER STRATEGY is present
CALL SetOAControllerData(OutAirNum, Errorsfound,Econotype = 'ECONOMIZER STRATEGY PRESENT')
END IF
ELSE IF ((lAlphaBlanks(3)).AND.(.NOT.lAlphaBlanks(4))) THEN
IF ((lNumericBlanks(1)) .AND. (lNumericBlanks(3)) .AND. (lNumericBlanks(4)) .AND. lAlphaBlanks(2) ) THEN
CALL ShowWarningError(TRIM(CurrentModuleObject)//' "'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('... Invalid '//TRIM(cAlphaFields(4))//' = '//TRIM(Alphas(4)))
CALL ShowContinueError('... Assumed NO EXHAUST AIR ENTHALPY LIMIT.')
CALL SetOAControllerData(OutAirNum, Errorsfound,Econotype = 'NOECONOMIZER')
ELSE
! This means that any of the FIXED DRY BULB, FIXED ENTHALPY, FIXED DEW POINT AND DRY BULB OR
! ELECTRONIC ENTHALPY ECONOMIZER STRATEGY is present
CALL SetOAControllerData(OutAirNum, Errorsfound,Econotype = 'ECONOMIZER STRATEGY PRESENT')
END IF
ELSE IF ((.NOT.lAlphaBlanks(3)).AND.(lAlphaBlanks(4))) THEN
IF ((lNumericBlanks(1)) .AND. (lNumericBlanks(3)) .AND. (lNumericBlanks(4)) .AND. lAlphaBlanks(2) ) THEN
CALL ShowWarningError(TRIM(CurrentModuleObject)//' "'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('... Invalid '//TRIM(cAlphaFields(3))//' = '//TRIM(Alphas(3)))
CALL ShowContinueError('... Assumed NO EXHAUST AIR TEMP LIMIT ')
CALL SetOAControllerData(OutAirNum, Errorsfound,Econotype = 'NOECONOMIZER')
ELSE
! This means that any of the FIXED DRY BULB, FIXED ENTHALPY, FIXED DEW POINT AND DRY BULB OR
! ELECTRONIC ENTHALPY ECONOMIZER STRATEGY is present
CALL SetOAControllerData(OutAirNum, Errorsfound,Econotype = 'ECONOMIZER STRATEGY PRESENT')
END IF
ELSE !NO Economizer
CALL SetOAControllerData(OutAirNum, Errorsfound,Econotype = 'NOECONOMIZER')
END IF
CALL SetOAControllerData(OutAirNum,ErrorsFound,FixedMin=.FALSE.)
CALL SetOAControllerData(OutAirNum, Errorsfound,Bypasstype = 'MINIMUMFLOWWITHBYPASS')
! Initialize to zero in case high humidity control is NOT used and a schedule is entered
HighRHOARatio = 0.0d0
! READ Modify Air Flow Data
! High humidity control option is YES, read in additional data
IF(SameString(Alphas(6),'Yes'))THEN
HStatZoneNum = FindItemInList(Alphas(7),Zone%Name,NumOfZones)
CALL SetOAControllerData(OutAirNum,ErrorsFound,HumidistatZoneNum=HStatZoneNum)
! Get the node number for the zone with the humidistat
IF (HStatZoneNum > 0) THEN
ZoneNodeFound = .FALSE.
HStatFound = .FALSE.
DO ControlledZoneNum = 1,NumOfZones
IF (ZoneEquipConfig(ControlledZoneNum)%ActualZoneNum /= HStatZoneNum) CYCLE
! Find the controlled zone number for the specified humidistat location
CALL SetOAControllerData(OutAirNum,ErrorsFound,NodeNumofHumidistatZone=ZoneEquipConfig(ControlledZoneNum)%ZoneNode)
ZoneNodeFound = .TRUE.
EXIT ! found zone node
END DO
IF (.not. ZoneNodeFound) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('... Did not find Air Node (Zone with Humidistat)')
CALL ShowContinueError('... Specified '//TRIM(cAlphaFields(7))//' = '//TRIM(Alphas(7)))
CALL ShowContinueError('... A ZoneHVAC:EquipmentConnections object must be specified for this zone.')
ErrorsFound=.TRUE.
ELSE
DO NumHstatZone = 1, NumHumidityControlZones
IF(HumidityControlZone(NumHstatZone)%ActualZoneNum .NE. HStatZoneNum)CYCLE
HStatFound=.TRUE.
EXIT
END DO
IF (.not. HStatFound) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('... Did not find zone humidistat')
CALL ShowContinueError('... A ZoneControl:Humidistat object must be specified for this zone.')
ErrorsFound=.TRUE.
END IF
ENDIF
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' "'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('... Did not find Air Node (Zone with Humidistat)')
CALL ShowContinueError('... A ZoneHVAC:EquipmentConnections object must be specified for this zone.')
ErrorsFound=.TRUE.
END IF
IF(SameString(Alphas(8), 'Yes'))THEN
CALL SetOAControllerData(OutAirNum,ErrorsFound,ModifyDuringHighOAMoisture = .FALSE.)
ELSE
CALL SetOAControllerData(OutAirNum,ErrorsFound,ModifyDuringHighOAMoisture = .TRUE.)
END IF
ELSE IF (.NOT. SameString(Alphas(6),'No') .AND. NumAlphas .GT. 4 .AND. (.NOT. lAlphaBlanks(5)))THEN
CALL ShowWarningError(TRIM(CurrentModuleObject)//' "'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('... Invalid '//TRIM(cAlphaFields(6))//' = '//TRIM(Alphas(6)))
CALL ShowContinueError('... '//TRIM(cAlphaFields(6))//' is assumed to be "No" and the simulation continues.')
END IF ! IF(SameString(Alphas(6),'Yes'))THEN
IF(Numbers(5) .LE. 0.0d0 .AND. NumNumbers .GT. 4)THEN
CALL ShowWarningError(TRIM(CurrentModuleObject)//' "'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('... '//TRIM(cNumericFields(5))//' must be greater than 0.')
CALL ShowContinueError('... '//TRIM(cNumericFields(5))//' is reset to 1 and the simulation continues.')
HighRHOARatio = 1.0d0
ELSE IF(NumNumbers .GT. 4)THEN
HighRHOARatio = Numbers(5)
ELSE
HighRHOARatio = 1.0d0
END IF
CALL SetOAControllerData(OutAirNum,ErrorsFound,HighRHOAFlowRatio = HighRHOARatio)
IF (WhichERV /= 0) THEN
StandAloneERV(WhichERV)%HighRHOAFlowRatio=HighRHOARatio
END IF
! Check for a time of day outside air schedule
CALL SetOAControllerData(OutAirNum,ErrorsFound,EconomizerOASchedPtr=GetScheduleIndex(Alphas(5)))
IF(WhichERV /= 0)THEN
StandAloneERV(WhichERV)%EconomizerOASchedPtr = GetScheduleIndex(Alphas(5))
ErrFlag=.false.
! Compare the ERV SA fan flow rates to modified air flow rate.
CALL GetFanType(StandAloneERV(WhichERV)%SupplyAirFanName,SAFanTypeNum,ErrFlag, &
CurrentModuleObject,StandAloneERV(WhichERV)%Name)
IF (.not. ErrFlag) THEN
SAFanVolFlowRate = &
GetFanDesignVolumeFlowRate(cFanTypes(SAFanTypeNum),StandAloneERV(WhichERV)%SupplyAirFanName,ErrFlag)
IF (HighRHOARatio .GT. 1.0d0 .and. StandAloneERV(WhichERV)%SupplyAirVolFlow/=AutoSize .AND. SAFanVolFlowRate/=AutoSize) THEN
IF (StandAloneERV(WhichERV)%SupplyAirVolFlow*HighRHOARatio > SAFanVolFlowRate) THEN
CALL ShowWarningError(TRIM(CurrentModuleObject)//' "'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('... A '//TRIM(cNumericFields(5))//' was entered as ' &
//TRIM(RoundSigDigits(HighRHOARatio,4)))
CALL ShowContinueError('... This flow ratio results in a Supply Air Volume Flow Rate through the ERV which is '// &
'greater than the Max Volume specified in the supply air fan object.')
CALL ShowContinueError('... Associated fan object = '//TRIM(cFanTypes(SAFanTypeNum))//' "'// &
TRIM(StandAloneERV(WhichERV)%SupplyAirFanName)//'"')
CALL ShowContinueError('... Modified value = ' &
//TRIM(RoundSigDigits(StandAloneERV(WhichERV)%SupplyAirVolFlow*HighRHOARatio,2)))
CALL ShowContinueError(' ... Supply Fan Max Volume Flow Rate = '//TRIM(RoundSigDigits(SAFanVolFlowRate,2)))
CALL ShowContinueError('... The ERV supply air fan will limit the air flow through the ERV'// &
' and the simulation continues.')
ENDIF
ENDIF
ELSE
ErrorsFound=.true.
ENDIF
ErrFlag=.false.
! Compare the ERV EA fan flow rates to modified air flow rate.
CALL GetFanType(StandAloneERV(WhichERV)%ExhaustAirFanName,EAFanTypeNum,ErrFlag, &
CurrentModuleObject,StandAloneERV(WhichERV)%Name)
IF (.not. ErrFlag) THEN
EAFanVolFlowRate = &
GetFanDesignVolumeFlowRate(cFanTypes(EAFanTypeNum),StandAloneERV(WhichERV)%ExhaustAirFanName,ErrFlag)
IF (HighRHOARatio .GT. 1.0d0 .and. StandAloneERV(WhichERV)%ExhaustAirVolFlow /= AutoSize .AND. &
EAFanVolFlowRate /= AutoSize) THEN
IF (StandAloneERV(WhichERV)%ExhaustAirVolFlow*HighRHOARatio > EAFanVolFlowRate) THEN
CALL ShowWarningError('ZoneHVAC:EnergyRecoveryVentilator:Controller "'//TRIM(Alphas(1))//'"')
CALL ShowContinueError('... A '//TRIM(cNumericFields(5))//' was entered as ' &
//TRIM(RoundSigDigits(HighRHOARatio,4)))
CALL ShowContinueError('... This flow ratio results in an Exhaust Air Volume Flow Rate through the ERV which is '// &
'greater than the Max Volume specified in the exhaust air fan object.')
CALL ShowContinueError('... Associated fan object = '//TRIM(cFanTypes(EAFanTypeNum))//' "'// &
TRIM(StandAloneERV(WhichERV)%ExhaustAirFanName)//'"')
CALL ShowContinueError('... Modified value = ' &
//TRIM(RoundSigDigits(StandAloneERV(WhichERV)%ExhaustAirVolFlow*HighRHOARatio,2)))
CALL ShowContinueError(' ... Exhaust Fan Max Volume Flow Rate = '//TRIM(RoundSigDigits(EAFanVolFlowRate,2)))
CALL ShowContinueError('... The ERV exhaust air fan will limit the air flow through the ERV'// &
' and the simulation continues.')
ENDIF
ENDIF
ELSE
ErrorsFound=.true.
ENDIF
END IF ! IF(WhichERV /= 0)THEN
END DO
IF (ErrorsFound) THEN
CALL ShowFatalError('Errors found in getting ZoneHVAC:EnergyRecoveryVentilator input.')
END IF
! Setup report variables for the stand alone ERVs
DO StandAloneERVIndex = 1,NumStandAloneERVs
CALL SetupOutputVariable('Zone Ventilator Sensible Cooling Rate [W]',StandAloneERV(StandAloneERVIndex)%SensCoolingRate,&
'System','Average',StandAloneERV(StandAloneERVIndex)%Name)
CALL SetupOutputVariable('Zone Ventilator Sensible Cooling Energy [J]',&
StandAloneERV(StandAloneERVIndex)%SensCoolingEnergy,'System','Sum',&
StandAloneERV(StandAloneERVIndex)%Name)
CALL SetupOutputVariable('Zone Ventilator Latent Cooling Rate [W]',StandAloneERV(StandAloneERVIndex)%LatCoolingRate,&
'System','Average',StandAloneERV(StandAloneERVIndex)%Name)
CALL SetupOutputVariable('Zone Ventilator Latent Cooling Energy [J]',StandAloneERV(StandAloneERVIndex)%LatCoolingEnergy,&
'System','Sum',StandAloneERV(StandAloneERVIndex)%Name)
CALL SetupOutputVariable('Zone Ventilator Total Cooling Rate [W]',StandAloneERV(StandAloneERVIndex)%TotCoolingRate,&
'System','Average',StandAloneERV(StandAloneERVIndex)%Name)
CALL SetupOutputVariable('Zone Ventilator Total Cooling Energy [J]',StandAloneERV(StandAloneERVIndex)%TotCoolingEnergy,&
'System','Sum',StandAloneERV(StandAloneERVIndex)%Name)
CALL SetupOutputVariable('Zone Ventilator Sensible Heating Rate [W]',StandAloneERV(StandAloneERVIndex)%SensHeatingRate,&
'System','Average',StandAloneERV(StandAloneERVIndex)%Name)
CALL SetupOutputVariable('Zone Ventilator Sensible Heating Energy [J]',&
StandAloneERV(StandAloneERVIndex)%SensHeatingEnergy,'System','Sum',&
StandAloneERV(StandAloneERVIndex)%Name)
CALL SetupOutputVariable('Zone Ventilator Latent Heating Rate [W]',StandAloneERV(StandAloneERVIndex)%LatHeatingRate,&
'System','Average',StandAloneERV(StandAloneERVIndex)%Name)
CALL SetupOutputVariable('Zone Ventilator Latent Heating Energy [J]',StandAloneERV(StandAloneERVIndex)%LatHeatingEnergy,&
'System','Sum',StandAloneERV(StandAloneERVIndex)%Name)
CALL SetupOutputVariable('Zone Ventilator Total Heating Rate [W]',StandAloneERV(StandAloneERVIndex)%TotHeatingRate,&
'System','Average',StandAloneERV(StandAloneERVIndex)%Name)
CALL SetupOutputVariable('Zone Ventilator Total Heating Energy [J]',StandAloneERV(StandAloneERVIndex)%TotHeatingEnergy,&
'System','Sum',StandAloneERV(StandAloneERVIndex)%Name)
CALL SetupOutputVariable('Zone Ventilator Electric Power [W]',StandAloneERV(StandAloneERVIndex)%ElecUseRate,&
'System','Average',StandAloneERV(StandAloneERVIndex)%Name)
CALL SetupOutputVariable('Zone Ventilator Electric Energy [J]',StandAloneERV(StandAloneERVIndex)%ElecUseEnergy,&
'System','Sum',StandAloneERV(StandAloneERVIndex)%Name)
CALL SetupOutputVariable('Zone Ventilator Supply Fan Availability Status []',StandAloneERV(StandAloneERVIndex)%AvailStatus, &
'System','Average',StandAloneERV(StandAloneERVIndex)%Name)
END DO
DEALLOCATE(Alphas)
DEALLOCATE(Numbers)
DEALLOCATE(cAlphaFields)
DEALLOCATE(cNumericFields)
DEALLOCATE(lNumericBlanks)
DEALLOCATE(lAlphaBlanks)
RETURN
END SUBROUTINE GetStandAloneERV