SUBROUTINE GetDesiccantDehumidifierInput
! SUBROUTINE INFORMATION:
! AUTHOR Michael J. Witte, GARD Analytics, Inc.
! for Gas Research Institute
! DATE WRITTEN March 2001
! MODIFIED Jan 2005 M. J. Witte, GARD Analytics, Inc.
! Add new control type option:
! NODE LEAVING HUMRAT SETPOINT:BYPASS
! Change existing control type to:
! FIXED LEAVING HUMRAT SETPOINT:BYPASS
! Work supported by ASHRAE research project 1254-RP
! June 2007 R. Raustad, FSEC
! Added new dehumidifier type -- DESICCANT DEHUMIDIFIER
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Obtains input data for humidifiers and stores it in dehumidifier data structures.
! METHODOLOGY EMPLOYED:
! Uses InputProcessor "Get" routines to obtain data.
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem, VerifyName, SameString, GetObjectDefMaxArgs
USE NodeInputManager, ONLY: GetOnlySingleNode
USE BranchNodeConnections, ONLY: SetUpCompSets, TestCompSet
USE DXCoils, ONLY: GetDXCoilOutletNode=>GetCoilOutletNode,GetCoilCondenserInletNode, GetDXCoilBypassedFlowFrac, &
GetDXCoilIndex, GetDXCoilCapacity=>GetCoilCapacity
USE HeatRecovery, ONLY: GetSupplyOutletNode, GetSupplyInletNode, &
GetSecondaryInletNode, GetSecondaryOutletNode
USE HeatingCoils, ONLY: GetHeatingCoilInletNode=>GetCoilInletNode, GetHeatingCoilOutletNode=>GetCoilOutletNode, &
GetHeatReclaimSourceIndexNum=>GetHeatReclaimSourceIndex, GetHeatingCoilIndex=>GetCoilIndex, &
GetHeatingCoilControlNodeNum=>GetCoilControlNodeNum
USE WaterCoils, ONLY: GetCoilWaterInletNode, GetCoilMaxWaterFlowRate, GetWaterCoilIndex, &
GetWaterCoilInletNode=>GetCoilInletNode,GetWaterCoilOutletNode=>GetCoilOutletNode
USE SteamCoils, ONLY: GetSteamCoilAirInletNode=>GetCoilAirInletNode, GetSteamCoilIndex, &
GetSteamCoilAirOutletNode=>GetCoilAirOutletNode, &
GetSteamCoilSteamInletNode=>GetCoilSteamInletNode, &
GetCoilMaxSteamFlowRate=>GetCoilMaxSteamFlowRate, GetTypeOfCoil, ZoneLoadControl, &
GetSteamCoilControlNodeNum
USE OutAirNodeManager, ONLY: CheckOutAirNodeNumber, CheckAndAddAirNodeNumber
USE DataIPShortCuts
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER (len=*), PARAMETER :: RoutineName='GetDesiccantDehumidifierInput: ' ! include trailing blank space
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: DesicDehumIndex ! Loop index
INTEGER :: DesicDehumNum ! Current desiccant dehumidifier number
INTEGER :: NumAlphas ! Number of Alphas for each GetObjectItem call
INTEGER :: NumNumbers ! Number of Numbers for each GetObjectItem call
INTEGER :: IOStatus ! Used in GetObjectItem
LOGICAL :: ErrorsFound=.false. ! Set to true if errors in input, fatal at end of routine
LOGICAL :: ErrorsFound2=.false. ! Set to true if errors in input, fatal at end of routine
LOGICAL :: ErrorsFoundGeneric=.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
LOGICAL :: OANodeError ! Flag for check on outside air node
CHARACTER (len=MaxNameLength) :: RegenFanInlet ! Desiccant system regeneration air fan inlet node
CHARACTER (len=MaxNameLength) :: RegenFanOutlet ! Desiccant system regeneration air fan outlet node
CHARACTER (len=MaxNameLength) :: RegenCoilInlet ! Desiccant system regeneration air heater inlet node
CHARACTER (len=MaxNameLength) :: RegenCoilOutlet ! Desiccant system regeneration air heater outlet node
CHARACTER (len=MaxNameLength) :: ProcAirInlet ! HX process air inlet node
CHARACTER (len=MaxNameLength) :: ProcAirOutlet ! HX process air outlet node
CHARACTER (len=MaxNameLength) :: RegenAirInlet ! HX regeneration air inlet node
CHARACTER (len=MaxNameLength) :: RegenAirOutlet ! HX regeneration air outlet node
CHARACTER (len=MaxNameLength) :: CurrentModuleObject ! for ease in getting objects
INTEGER :: DesuperHeaterIndex ! Index of desuperheater heating coil
INTEGER :: RegenCoilControlNodeNum ! Control node number of regen heating coil
REAL(r64) :: CoilBypassedFlowFrac ! Bypass air fraction for multimode DX coils
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: Alphas ! Alpha input items for object
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cAlphaFields ! Alpha field names
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cNumericFields ! Numeric field names
REAL(r64), ALLOCATABLE, DIMENSION(:) :: Numbers ! Numeric input items for object
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lAlphaBlanks ! Logical array, alpha field input BLANK = .true.
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lNumericBlanks ! Logical array, numeric field input BLANK = .true.
INTEGER :: MaxNums=0 ! Maximum number of numeric input fields
INTEGER :: MaxAlphas=0 ! Maximum number of alpha input fields
INTEGER :: TotalArgs=0 ! Total number of alpha and numeric arguments (max) for a
! certain object in the input file
INTEGER :: RegenCoilAirInletNode ! regen heating coil air inlet node number
INTEGER :: RegenCoilAirOutletNode ! regen heating coil air outlet node number
LOGICAL :: ErrFlag ! local error flag
CHARACTER(len=MaxNameLength) :: RegenCoilType ! Regen heating coil type
CHARACTER(len=MaxNameLength) :: RegenCoilName ! Regen heating coil name
REAL(r64) :: SteamDensity = 0.0d0 ! density of steam at 100C
INTEGER :: SteamIndex ! steam coil Index
NumSolidDesicDehums = GetNumObjectsFound('Dehumidifier:Desiccant:NoFans')
NumGenericDesicDehums = GetNumObjectsFound('Dehumidifier:Desiccant:System')
NumDesicDehums = NumSolidDesicDehums + NumGenericDesicDehums
! allocate the data array
ALLOCATE(DesicDehum(NumDesicDehums))
CALL GetObjectDefMaxArgs('Dehumidifier:Desiccant:NoFans',TotalArgs,NumAlphas,NumNumbers)
MaxNums=MAX(MaxNums,NumNumbers)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
CALL GetObjectDefMaxArgs('Dehumidifier:Desiccant:System',TotalArgs,NumAlphas,NumNumbers)
MaxNums=MAX(MaxNums,NumNumbers)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
ALLOCATE(Alphas(MaxAlphas))
Alphas=' '
ALLOCATE(cAlphaFields(MaxAlphas))
cAlphaFields=' '
ALLOCATE(cNumericFields(MaxNums))
cNumericFields=' '
ALLOCATE(Numbers(MaxNums))
Numbers=0.0d0
ALLOCATE(lAlphaBlanks(MaxAlphas))
lAlphaBlanks=.true.
ALLOCATE(lNumericBlanks(MaxNums))
lNumericBlanks=.true.
! loop over solid desiccant dehumidifiers and load the input data
CurrentModuleObject = 'Dehumidifier:Desiccant:NoFans'
DO DesicDehumIndex = 1,NumSolidDesicDehums
RegenCoilAirInletNode = 0
RegenCoilAirOutletNode = 0
CALL GetObjectItem(CurrentModuleObject,DesicDehumIndex,Alphas,NumAlphas,Numbers,NumNumbers,IOStatus, &
NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
DesicDehumNum = DesicDehumIndex
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(Alphas(1),DesicDehum%Name,DesicDehumNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) Alphas(1)='xxxxx'
ENDIF
DesicDehum(DesicDehumNum)%Name = Alphas(1)
DesicDehum(DesicDehumNum)%DehumType = TRIM(CurrentModuleObject)
DesicDehum(DesicDehumNum)%DehumTypeCode = Solid
DesicDehum(DesicDehumNum)%Sched = Alphas(2)
IF (lAlphaBlanks(2)) THEN
DesicDehum(DesicDehumNum)%SchedPtr = ScheduleAlwaysOn
ELSE
DesicDehum(DesicDehumNum)%SchedPtr = GetScheduleIndex(Alphas(2)) ! convert schedule name to pointer
IF (DesicDehum(DesicDehumNum)%SchedPtr .EQ. 0) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//': invalid '//TRIM(cAlphaFields(2))// &
' entered ='//TRIM(Alphas(2))// &
' for '//TRIM(cAlphaFields(1))//'='//TRIM(Alphas(1)))
ErrorsFound=.true.
END IF
END IF
! For node connections, this object is both a parent and a non-parent, because the
! Desiccant wheel is not called out as a separate component, its nodes must be connected
! as ObjectIsNotParent. But for the Regen fan, the nodes are connected as ObjectIsParent
DesicDehum(DesicDehumNum)%ProcAirInNode = &
GetOnlySingleNode(Alphas(3),ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsNotParent)
DesicDehum(DesicDehumNum)%ProcAirOutNode = &
GetOnlySingleNode(Alphas(4),ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsNotParent)
DesicDehum(DesicDehumNum)%RegenAirInNode = &
GetOnlySingleNode(Alphas(5),ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_Inlet,2,ObjectIsNotParent)
DesicDehum(DesicDehumNum)%RegenFanInNode = &
GetOnlySingleNode(Alphas(6),ErrorsFound,TRIM(CurrentModuleObject),Alphas(1), &
NodeType_Air,NodeConnectionType_Internal,2,ObjectIsParent)
IF (SameString(Alphas(7),'LEAVING HUMRAT:BYPASS')) THEN
CALL ShowWarningError(RoutineName//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
CALL ShowContinueError('Obsolete '//TRIM(cAlphaFields(7))//' = '//TRIM(Alphas(7)))
CALL ShowContinueError('setting to LeavingMaximumHumidityRatioSetpoint')
DesicDehum(DesicDehumNum)%ControlType = FixedHumratBypass
END IF
IF (SameString(Alphas(7),'LeavingMaximumHumidityRatioSetpoint')) &
DesicDehum(DesicDehumNum)%ControlType = FixedHumratBypass
IF (SameString(Alphas(7),'SystemNodeMaximumHumidityRatioSetpoint')) &
DesicDehum(DesicDehumNum)%ControlType = NodeHumratBypass
IF (DesicDehum(DesicDehumNum)%ControlType == 0) THEN
CALL ShowWarningError(RoutineName//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
CALL ShowContinueError('Invalid '//TRIM(cAlphaFields(7))//' = '//TRIM(Alphas(7)))
CALL ShowContinueError('setting to LeavingMaximumHumidityRatioSetpoint')
DesicDehum(DesicDehumNum)%ControlType = FixedHumratBypass
END IF
DesicDehum(DesicDehumNum)%HumRatSet = Numbers(1)
DesicDehum(DesicDehumNum)%NomProcAirVolFlow = Numbers(2)
DesicDehum(DesicDehumNum)%NomProcAirVel = Numbers(3)
DesicDehum(DesicDehumNum)%RegenCoilType = Alphas(8)
DesicDehum(DesicDehumNum)%RegenCoilName = Alphas(9)
RegenCoilType = Alphas(8)
RegenCoilName = Alphas(9)
IF (SameString(DesicDehum(DesicDehumNum)%RegenCoilType,'Coil:Heating:Electric') .OR. &
SameString(DesicDehum(DesicDehumNum)%RegenCoilType,'Coil:Heating:Gas')) THEN
IF (SameString(DesicDehum(DesicDehumNum)%RegenCoilType,'Coil:Heating:Electric')) &
DesicDehum(DesicDehumNum)%RegenCoilType_Num = Coil_HeatingElectric
IF (SameString(DesicDehum(DesicDehumNum)%RegenCoilType,'Coil:Heating:Gas')) &
DesicDehum(DesicDehumNum)%RegenCoilType_Num = Coil_HeatingGas
CALL ValidateComponent(DesicDehum(DesicDehumNum)%RegenCoilType,DesicDehum(DesicDehumNum)%RegenCoilName, &
ErrorsFound2,TRIM(CurrentModuleObject)//'='//TRIM(Alphas(1)))
IF (ErrorsFound2) ErrorsFound = .TRUE.
CALL GetHeatingCoilIndex(DesicDehum(DesicDehumNum)%RegenCoilName,DesicDehum(DesicDehumNum)%RegenCoilIndex,&
ErrorsFound2)
IF (ErrorsFound2) ErrorsFound = .TRUE.
ELSEIF (SameString(DesicDehum(DesicDehumNum)%RegenCoilType,'Coil:Heating:Water')) THEN
DesicDehum(DesicDehumNum)%RegenCoilType_Num = Coil_HeatingWater
CALL ValidateComponent(RegenCoilType,RegenCoilName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ELSE ! mine data from heating coil object
ErrFlag = .FALSE.
DesicDehum(DesicDehumNum)%RegenCoilIndex = GetWaterCoilIndex('COIL:HEATING:WATER',RegenCoilName,ErrFlag)
IF (DesicDehum(DesicDehumNum)%RegenCoilIndex .EQ. 0) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//' illegal '//TRIM(cAlphaFields(9))//' = ' &
//TRIM(RegenCoilName))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the Heating Coil Hot water Inlet or control Node number
ErrFlag = .FALSE.
DesicDehum(DesicDehumNum)%CoilControlNode = GetCoilWaterInletNode('Coil:Heating:Water', &
RegenCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the Regeneration Heating Coil hot water max volume flow rate
ErrFlag = .FALSE.
DesicDehum(DesicDehumNum)%MaxCoilFluidFlow = GetCoilMaxWaterFlowRate('Coil:Heating:Water', &
RegenCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the Regeneration Heating Coil Inlet Node
ErrFlag = .FALSE.
RegenCoilAirInletNode = GetWaterCoilInletNode('Coil:Heating:Water',RegenCoilName,ErrFlag)
DesicDehum(DesicDehumNum)%RegenCoilInletNode = RegenCoilAirInletNode
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the Regeneration Heating Coil Outlet Node
ErrFlag = .FALSE.
RegenCoilAirOutletNode = GetWaterCoilOutletNode('Coil:Heating:Water',RegenCoilName,ErrFlag)
DesicDehum(DesicDehumNum)%RegenCoilOutletNode = RegenCoilAirOutletNode
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
ENDIF
ELSEIF (SameString(DesicDehum(DesicDehumNum)%RegenCoilType,'Coil:Heating:Steam')) THEN
DesicDehum(DesicDehumNum)%RegenCoilType_Num = Coil_HeatingSteam
CALL ValidateComponent(Alphas(8),RegenCoilName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ELSE ! mine data from the regeneration heating coil object
ErrFlag = .FALSE.
DesicDehum(DesicDehumNum)%RegenCoilIndex = GetSTeamCoilIndex('COIL:HEATING:STEAM',RegenCoilName,ErrFlag)
IF (DesicDehum(DesicDehumNum)%RegenCoilIndex .EQ. 0) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//' illegal '//TRIM(cAlphaFields(9))//' = ' &
//TRIM(RegenCoilName))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the regeneration Heating Coil steam inlet node number
ErrFlag = .FALSE.
DesicDehum(DesicDehumNum)%CoilControlNode = GetSteamCoilSteamInletNode('Coil:Heating:Steam',RegenCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the regeneration heating Coil steam max volume flow rate
DesicDehum(DesicDehumNum)%MaxCoilFluidFlow = &
GetCoilMaxSteamFlowRate(DesicDehum(DesicDehumNum)%RegenCoilIndex,ErrFlag)
IF (DesicDehum(DesicDehumNum)%MaxCoilFluidFlow .GT. 0.0d0)THEN
SteamIndex = 0 ! Function GetSatDensityRefrig will look up steam index if 0 is passed
SteamDensity=GetSatDensityRefrig("STEAM",TempSteamIn,1.0d0,SteamIndex,'Dehumidifier:Desiccant:NoFans')
DesicDehum(DesicDehumNum)%MaxCoilFluidFlow = DesicDehum(DesicDehumNum)%MaxCoilFluidFlow * SteamDensity
END IF
! Get the regeneration heating Coil Inlet Node
ErrFlag = .FALSE.
RegenCoilAirInletNode = &
GetSteamCoilAirInletNode(DesicDehum(DesicDehumNum)%RegenCoilIndex,RegenCoilName,ErrFlag)
DesicDehum(DesicDehumNum)%RegenCoilInletNode = RegenCoilAirInletNode
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the regeneration heating Coil Outlet Node
ErrFlag = .FALSE.
RegenCoilAirOutletNode = &
GetSteamCoilAirOutletNode(DesicDehum(DesicDehumNum)%RegenCoilIndex,RegenCoilName,ErrFlag)
DesicDehum(DesicDehumNum)%RegenCoilOutletNode = RegenCoilAirOutletNode
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
ENDIF
ELSE
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(8))//' = '//TRIM(DesicDehum(DesicDehumNum)%RegenCoilType))
ErrorsFound = .TRUE.
ENDIF
DesicDehum(DesicDehumNum)%NomRotorPower = Numbers(4)
DesicDehum(DesicDehumNum)%RegenFanType = Alphas(10)
DesicDehum(DesicDehumNum)%RegenFanName = Alphas(11)
CALL TestCompSet(DesicDehum(DesicDehumNum)%DehumType,DesicDehum(DesicDehumNum)%Name, &
Alphas(3), Alphas(4),'Process Air Nodes')
! Set up component set for regen coil
CALL SetUpCompSets(DesicDehum(DesicDehumNum)%DehumType, DesicDehum(DesicDehumNum)%Name, &
Alphas(8),Alphas(9),'UNDEFINED','UNDEFINED')
! Set up component set for regen fan
CALL SetUpCompSets(DesicDehum(DesicDehumNum)%DehumType, DesicDehum(DesicDehumNum)%Name, &
Alphas(10),Alphas(11),Alphas(6),'UNDEFINED')
IF ((.not. SameString(Alphas(12),'Default'))&
.AND. (SameString(Alphas(12),'UserCurves')) ) THEN
CALL ShowWarningError(RoutineName//TRIM(CurrentModuleObject)//': Invalid'//TRIM(cAlphaFields(12))//' = '//TRIM(Alphas(12)))
CALL ShowContinueError('resetting to Default')
DesicDehum(DesicDehumNum)%PerformanceModel_Num = PM_Default
END IF
IF (SameString(Alphas(12),'UserCurves')) THEN
DesicDehum(DesicDehumNum)%PerformanceModel_Num = PM_UserCurves
DesicDehum(DesicDehumNum)%ProcDryBulbCurvefTW= GetCurveIndex(Alphas(13))
IF (DesicDehum(DesicDehumNum)%ProcDryBulbCurvefTW .EQ. 0) THEN
CALL ShowSevereError(RoutineName//'Curve object='//TRIM(Alphas(13))//' not found.')
ErrorsFound2 = .TRUE.
ENDIF
DesicDehum(DesicDehumNum)%ProcDryBulbCurvefV = GetCurveIndex(Alphas(14))
IF (DesicDehum(DesicDehumNum)%ProcDryBulbCurvefV .EQ. 0) THEN
CALL ShowSevereError(RoutineName//'Curve object='//TRIM(Alphas(14))//' not found.')
ErrorsFound2 = .TRUE.
ENDIF
DesicDehum(DesicDehumNum)%ProcHumRatCurvefTW = GetCurveIndex(Alphas(15))
IF (DesicDehum(DesicDehumNum)%ProcHumRatCurvefTW .EQ. 0) THEN
CALL ShowSevereError(RoutineName//'Curve object='//TRIM(Alphas(15))//' not found.')
ErrorsFound2 = .TRUE.
ENDIF
DesicDehum(DesicDehumNum)%ProcHumRatCurvefV = GetCurveIndex(Alphas(16))
IF (DesicDehum(DesicDehumNum)%ProcHumRatCurvefV .EQ. 0) THEN
CALL ShowSevereError(RoutineName//'Curve object='//TRIM(Alphas(16))//' not found.')
ErrorsFound2 = .TRUE.
ENDIF
DesicDehum(DesicDehumNum)%RegenEnergyCurvefTW= GetCurveIndex(Alphas(17))
IF (DesicDehum(DesicDehumNum)%RegenEnergyCurvefTW .EQ. 0) THEN
CALL ShowSevereError(RoutineName//'Curve object='//TRIM(Alphas(17))//' not found.')
ErrorsFound2 = .TRUE.
ENDIF
DesicDehum(DesicDehumNum)%RegenEnergyCurvefV = GetCurveIndex(Alphas(18))
IF (DesicDehum(DesicDehumNum)%RegenEnergyCurvefV .EQ. 0) THEN
CALL ShowSevereError(RoutineName//'Curve object='//TRIM(Alphas(18))//' not found.')
ErrorsFound2 = .TRUE.
ENDIF
DesicDehum(DesicDehumNum)%RegenVelCurvefTW = GetCurveIndex(Alphas(19))
IF (DesicDehum(DesicDehumNum)%RegenVelCurvefTW .EQ. 0) THEN
CALL ShowSevereError(RoutineName//'Curve object='//TRIM(Alphas(19))//' not found.')
ErrorsFound2 = .TRUE.
ENDIF
DesicDehum(DesicDehumNum)%RegenVelCurvefV = GetCurveIndex(Alphas(20))
IF (DesicDehum(DesicDehumNum)%RegenVelCurvefV .EQ. 0) THEN
CALL ShowSevereError(RoutineName//'Curve object='//TRIM(Alphas(20))//' not found.')
ErrorsFound2 = .TRUE.
ENDIF
IF (ErrorsFound2) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
CALL ShowContinueError('Errors found in getting performance curves.')
ErrorsFound = .TRUE.
END IF
DesicDehum(DesicDehumNum)%NomRegenTemp = Numbers(5)
! Validate regen fan type, for user defined curves, can be constant or variable volume
IF ((SameString(DesicDehum(DesicDehumNum)%RegenFanType,'FAN:CONSTANTVOLUME')) .OR. &
(SameString(DesicDehum(DesicDehumNum)%RegenFanType,'FAN:VARIABLEVOLUME'))) THEN
CALL ValidateComponent(DesicDehum(DesicDehumNum)%RegenFanType,DesicDehum(DesicDehumNum)%RegenFanName, &
ErrorsFound2,TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
IF (ErrorsFound2) ErrorsFound = .TRUE.
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(10))//' = '//TRIM(DesicDehum(DesicDehumNum)%RegenFanType))
ErrorsFound = .TRUE.
ENDIF
ELSE
! If DEFAULT performance model, set operating limits curves. Unit is off outside this range
DesicDehum(DesicDehumNum)%PerformanceModel_Num = PM_Default
DesicDehum%MinProcAirInTemp = 1.67d0 ! 35 F
DesicDehum%MaxProcAirInTemp = 48.89d0 ! 120 F
DesicDehum%MinProcAirInHumRat = 0.002857d0 ! 20 gr/lb
DesicDehum%MaxProcAirInHumRat = 0.02857d0 ! 200 gr/lb
! If DEFAULT performance model, warn if curve names and nominal regen temp have values
IF ((.NOT. lAlphaBlanks(13)) .OR. (.NOT. lAlphaBlanks(14)) .OR. (.NOT. lAlphaBlanks(15)) .OR. &
(.NOT. lAlphaBlanks(16)) .OR. (.NOT. lAlphaBlanks(17)) .OR. (.NOT. lAlphaBlanks(18)) .OR. &
(.NOT. lAlphaBlanks(19)) .OR. (.NOT. lAlphaBlanks(20))) THEN
CALL ShowWarningError(TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
CALL ShowContinueError('DEFAULT performance selected, curve names and nominal regen temp will be ignored.')
ENDIF
IF (DesicDehum(DesicDehumNum)%NomProcAirVel > 4.064d0) THEN
CALL ShowWarningError(TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
CALL ShowContinueError(TRIM(cNumericFields(3))//' > 4.064 m/s.; Value in input='// &
TRIM(RoundSigDigits(DesicDehum(DesicDehumNum)%NomProcAirVel,3)))
CALL ShowContinueError('DEFAULT performance curves not valid outside 2.032 to 4.064 m/s (400 to 800 fpm).')
ENDIF
IF (DesicDehum(DesicDehumNum)%NomProcAirVel < 2.032d0) THEN
CALL ShowWarningError(TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
CALL ShowContinueError(TRIM(cNumericFields(3))//' < 2.032 m/s.; Value in input='// &
TRIM(RoundSigDigits(DesicDehum(DesicDehumNum)%NomProcAirVel,3)))
CALL ShowContinueError('DEFAULT performance curves not valid outside 2.032 to 4.064 m/s (400 to 800 fpm).')
ENDIF
! Validate regen fan type, for default curves, can only variable volume
IF (DesicDehum(DesicDehumNum)%RegenFanType == 'FAN:VARIABLEVOLUME') THEN
CALL ValidateComponent(DesicDehum(DesicDehumNum)%RegenFanType,DesicDehum(DesicDehumNum)%RegenFanName, &
ErrorsFound2,TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
IF (ErrorsFound2) ErrorsFound = .TRUE.
ELSE
CALL ShowSevereError(TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(10))//' = '//TRIM(DesicDehum(DesicDehumNum)%RegenFanType))
CALL ShowContinueError('For DEFAULT performance model, the regen fan type must be Fan:VariableVolume')
ErrorsFound = .TRUE.
ENDIF
ENDIF
ENDDO
DO DesicDehumIndex = 1,NumGenericDesicDehums
RegenCoilAirInletNode = 0
RegenCoilAirOutletNode = 0
CurrentModuleObject = 'Dehumidifier:Desiccant:System'
DesicDehumNum = DesicDehumIndex + NumSolidDesicDehums
DesicDehum(DesicDehumNum)%DehumType = TRIM(CurrentModuleObject)
DesicDehum(DesicDehumNum)%DehumTypeCode = Generic
CALL GetObjectItem(DesicDehum(DesicDehumNum)%DehumType,DesicDehumIndex,Alphas,NumAlphas,Numbers,NumNumbers, &
IOStatus,NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(Alphas(1),DesicDehum%Name,DesicDehumNum-1,IsNotOK,IsBlank,DesicDehum(DesicDehumNum)%DehumType//' Name')
IF (IsNotOK) THEN
ErrorsFoundGeneric=.true.
IF (IsBlank) Alphas(1)='xxxxx'
ENDIF
DesicDehum(DesicDehumNum)%Name = Alphas(1)
ErrorsFound2 = .FALSE.
CALL ValidateComponent(DesicDehum(DesicDehumNum)%DehumType,DesicDehum(DesicDehumNum)%Name, &
ErrorsFound2,DesicDehum(DesicDehumNum)%DehumType//' = "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
IF (ErrorsFound2) THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "' &
//TRIM(DesicDehum(DesicDehumNum)%Name)//'" is not unique')
ErrorsFoundGeneric=.TRUE.
ENDIF
DesicDehum(DesicDehumNum)%Sched = Alphas(2)
IF (lAlphaBlanks(2)) THEN
DesicDehum(DesicDehumNum)%SchedPtr = ScheduleAlwaysOn
ELSE
DesicDehum(DesicDehumNum)%SchedPtr = GetScheduleIndex(Alphas(2)) ! convert schedule name to pointer
IF (DesicDehum(DesicDehumNum)%SchedPtr .EQ. 0) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//': invalid '//TRIM(cAlphaFields(2))// &
' entered ='//TRIM(Alphas(2))// &
' for '//TRIM(cAlphaFields(1))//'='//TRIM(Alphas(1)))
ErrorsFound=.true.
END IF
END IF
DesicDehum(DesicDehumNum)%HXType = Alphas(3)
DesicDehum(DesicDehumNum)%HXName = Alphas(4)
IF (.NOT. SameString(DesicDehum(DesicDehumNum)%HXType,'HeatExchanger:Desiccant:BalancedFlow')) THEN
CALL ShowWarningError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' = "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('Invalid '//TRIM(cAlphaFields(3))//' = '//TRIM(DesicDehum(DesicDehumNum)%HXType))
ErrorsFoundGeneric=.TRUE.
ELSE
DesicDehum(DesicDehumNum)%HXTypeNum = BalancedHX
END IF
ErrorsFound2 = .FALSE.
CALL ValidateComponent(DesicDehum(DesicDehumNum)%HXType,DesicDehum(DesicDehumNum)%HXName, &
ErrorsFound2,DesicDehum(DesicDehumNum)%DehumType//' = "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
IF (ErrorsFound2) ErrorsFoundGeneric = .TRUE.
ErrorsFound2 = .FALSE.
DesicDehum(DesicDehumNum)%HXProcInNode = &
GetSecondaryInletNode(DesicDehum(DesicDehumNum)%HXName, ErrorsFound2)
IF(ErrorsFound2)THEN
CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
ErrorsFoundGeneric=.TRUE.
END IF
ProcAirInlet = NodeID(DesicDehum(DesicDehumNum)%HXProcInNode)
DesicDehum(DesicDehumNum)%ProcAirInNode = GetOnlySingleNode(ProcAirInlet,ErrorsFound,&
DesicDehum(DesicDehumNum)%DehumType,DesicDehum(DesicDehumNum)%Name, &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsParent)
ErrorsFound2 = .FALSE.
DesicDehum(DesicDehumNum)%HXProcOutNode = &
GetSecondaryOutletNode(DesicDehum(DesicDehumNum)%HXName, ErrorsFound2)
IF(ErrorsFound2)THEN
CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
ErrorsFoundGeneric=.TRUE.
END IF
ProcAirOutlet = NodeID(DesicDehum(DesicDehumNum)%HXProcOutNode)
DesicDehum(DesicDehumNum)%ProcAirOutNode = GetOnlySingleNode(ProcAirOutlet,ErrorsFound,&
DesicDehum(DesicDehumNum)%DehumType,DesicDehum(DesicDehumNum)%Name, &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent)
CALL TestCompSet(DesicDehum(DesicDehumNum)%DehumType,DesicDehum(DesicDehumNum)%Name, &
ProcAirInlet,ProcAirOutlet,'Process Air Nodes')
ErrorsFound2 = .FALSE.
DesicDehum(DesicDehumNum)%HXRegenInNode = &
GetSupplyInletNode(DesicDehum(DesicDehumNum)%HXName, ErrorsFound2)
IF(ErrorsFound2)THEN
CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
ErrorsFoundGeneric=.TRUE.
END IF
ErrorsFound2 = .FALSE.
DesicDehum(DesicDehumNum)%HXRegenOutNode = &
GetSupplyOutletNode(DesicDehum(DesicDehumNum)%HXName, ErrorsFound2)
IF(ErrorsFound2)THEN
CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
ErrorsFoundGeneric=.TRUE.
END IF
DesicDehum(DesicDehumNum)%ControlNodeNum = &
GetOnlySingleNode(Alphas(5),ErrorsFound,DesicDehum(DesicDehumNum)%DehumType,DesicDehum(DesicDehumNum)%Name, &
NodeType_Air,NodeConnectionType_Sensor,1,ObjectIsNotParent)
IF (DesicDehum(DesicDehumNum)%ControlNodeNum .EQ. 0) THEN
CALL ShowContinueError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' = "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowSevereError(TRIM(cAlphaFields(5))//' must be specified.')
ErrorsFoundGeneric=.TRUE.
ENDIF
DesicDehum(DesicDehumNum)%RegenFanType = Alphas(6)
DesicDehum(DesicDehumNum)%RegenFanName = Alphas(7)
IF (SameString(DesicDehum(DesicDehumNum)%RegenFanType,'Fan:OnOff') .OR. &
SameString(DesicDehum(DesicDehumNum)%RegenFanType,'Fan:ConstantVolume')) THEN
ErrorsFound2 = .FALSE.
CALL ValidateComponent(DesicDehum(DesicDehumNum)%RegenFanType,DesicDehum(DesicDehumNum)%RegenFanName, &
ErrorsFound2,DesicDehum(DesicDehumNum)%DehumType// ' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
IF (ErrorsFound2) ErrorsFoundGeneric = .TRUE.
ELSE
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(6))//' = '//TRIM(DesicDehum(DesicDehumNum)%RegenFanType))
ErrorsFoundGeneric = .TRUE.
ENDIF
IF (SameString(Alphas(8),'DrawThrough') ) THEN
DesicDehum(DesicDehumNum)%RegenFanPlacement = DrawThru
ELSEIF (SameString(Alphas(8),'BlowThrough') ) THEN
DesicDehum(DesicDehumNum)%RegenFanPlacement = BlowThru
ELSE
CALL ShowWarningError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(8))//' = '//TRIM(Alphas(8)))
CALL ShowContinueError('...resetting to DEFAULT of DRAW THROUGH')
DesicDehum(DesicDehumNum)%RegenFanPlacement = DrawThru
END IF
ErrorsFound2 = .FALSE.
DesicDehum(DesicDehumNum)%RegenFanInNode = &
GetFanInletNode(DesicDehum(DesicDehumNum)%RegenFanType, &
DesicDehum(DesicDehumNum)%RegenFanName,ErrorsFound2)
IF(ErrorsFound2)THEN
CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
ErrorsFoundGeneric=.TRUE.
END IF
ErrorsFound2 = .FALSE.
DesicDehum(DesicDehumNum)%RegenFanOutNode = &
GetFanOutletNode(DesicDehum(DesicDehumNum)%RegenFanType, &
DesicDehum(DesicDehumNum)%RegenFanName,ErrorsFound2)
CALL GetFanIndex(DesicDehum(DesicDehumNum)%RegenFanName,DesicDehum(DesicDehumNum)%RegenFanIndex,ErrorsFound2, &
DesicDehum(DesicDehumNum)%RegenFanType)
IF(ErrorsFound2)THEN
CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
ErrorsFoundGeneric = .TRUE.
END IF
DesicDehum(DesicDehumNum)%RegenCoilType = Alphas(9)
DesicDehum(DesicDehumNum)%RegenCoilName = Alphas(10)
RegenCoilType = Alphas(9)
RegenCoilName = Alphas(10)
DesicDehum(DesicDehumNum)%RegenSetPointTemp = Numbers(1)
IF (.NOT. lAlphaBlanks(10))Then
IF (SameString(DesicDehum(DesicDehumNum)%RegenCoilType,'Coil:Heating:Electric') .OR. &
SameString(DesicDehum(DesicDehumNum)%RegenCoilType,'Coil:Heating:Gas')) THEN
IF (SameString(DesicDehum(DesicDehumNum)%RegenCoilType,'Coil:Heating:Electric')) &
DesicDehum(DesicDehumNum)%RegenCoilType_Num = Coil_HeatingElectric
IF (SameString(DesicDehum(DesicDehumNum)%RegenCoilType,'Coil:Heating:Gas')) &
DesicDehum(DesicDehumNum)%RegenCoilType_Num = Coil_HeatingGas
ErrorsFound2 = .FALSE.
CALL ValidateComponent(RegenCoilType,RegenCoilName,ErrorsFound2, &
DesicDehum(DesicDehumNum)%DehumType//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
IF (ErrorsFound2) ErrorsFoundGeneric = .TRUE.
IF(DesicDehum(DesicDehumNum)%RegenSetPointTemp .LE. 0.0d0)THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError(TRIM(cNumericFields(1))//' must be greater than 0.')
ErrorsFoundGeneric = .TRUE.
END IF
ErrorsFound2 = .FALSE.
DesicDehum(DesicDehumNum)%RegenCoilInletNode = GetHeatingCoilInletNode(RegenCoilType,RegenCoilName,ErrorsFound2)
IF(ErrorsFound2)THEN
CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
ErrorsFoundGeneric=.TRUE.
END IF
ErrorsFound2 = .FALSE.
DesicDehum(DesicDehumNum)%RegenCoilOutletNode = GetHeatingCoilOutletNode(RegenCoilType,RegenCoilName,ErrorsFound2)
IF(ErrorsFound2)THEN
CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
ErrorsFoundGeneric=.TRUE.
END IF
ErrorsFound2=.FALSE.
CALL GetHeatingCoilIndex(RegenCoilName,DesicDehum(DesicDehumNum)%RegenCoilIndex,ErrorsFound2)
IF(ErrorsFound2)THEN
CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
ErrorsFoundGeneric=.TRUE.
END IF
ErrorsFound2=.FALSE.
RegenCoilControlNodeNum = GetHeatingCoilControlNodeNum(RegenCoilType,RegenCoilName,ErrorsFound2)
IF(ErrorsFound2)THEN
CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
ErrorsFoundGeneric=.TRUE.
END IF
IF(RegenCoilControlNodeNum .GT. 0)THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError(TRIM(cNumericFields(1))//' is specified as '// &
TRIM(RoundSigDigits(DesicDehum(DesicDehumNum)%RegenSetPointTemp,3))//' C in this object.')
CALL ShowContinueError(' Do not specify a coil temperature setpoint node name in the regeneration air heater object.')
CALL ShowContinueError('...'//TRIM(cAlphaFields(9))//' = '//TRIM(DesicDehum(DesicDehumNum)%RegenCoilType))
CALL ShowContinueError('...'//TRIM(cAlphaFields(10))//' = '//TRIM(DesicDehum(DesicDehumNum)%RegenCoilName))
CALL ShowContinueError('...heating coil temperature setpoint node = '//TRIM(NodeID(RegenCoilControlNodeNum)))
CALL ShowContinueError('...leave the heating coil temperature setpoint node name blank in the regen heater object.')
ErrorsFoundGeneric = .TRUE.
END IF
ELSEIF (SameString(DesicDehum(DesicDehumNum)%RegenCoilType,'Coil:Heating:Water')) THEN
DesicDehum(DesicDehumNum)%RegenCoilType_Num = Coil_HeatingWater
CALL ValidateComponent(RegenCoilType,RegenCoilName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ELSE ! mine data from heating coil object
ErrFlag = .FALSE.
DesicDehum(DesicDehumNum)%RegenCoilIndex = GetWaterCoilIndex('COIL:HEATING:WATER',RegenCoilName,ErrFlag)
IF (DesicDehum(DesicDehumNum)%RegenCoilIndex .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cAlphaFields(9))//' = ' &
//TRIM(RegenCoilName))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
IF(DesicDehum(DesicDehumNum)%RegenSetPointTemp .LE. 0.0d0)THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError(TRIM(cNumericFields(1))//' must be greater than 0.')
ErrorsFoundGeneric = .TRUE.
END IF
! Get the Heating Coil Hot water Inlet or control Node number
ErrFlag = .FALSE.
DesicDehum(DesicDehumNum)%CoilControlNode = GetCoilWaterInletNode('Coil:Heating:Water', &
RegenCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the Regeneration Heating Coil hot water max volume flow rate
ErrFlag = .FALSE.
DesicDehum(DesicDehumNum)%MaxCoilFluidFlow = GetCoilMaxWaterFlowRate('Coil:Heating:Water', &
RegenCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the Regeneration Heating Coil Inlet Node
ErrFlag = .FALSE.
RegenCoilAirInletNode = GetWaterCoilInletNode('Coil:Heating:Water',RegenCoilName,ErrFlag)
DesicDehum(DesicDehumNum)%RegenCoilInletNode = RegenCoilAirInletNode
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the Regeneration Heating Coil Outlet Node
ErrFlag = .FALSE.
RegenCoilAirOutletNode = GetWaterCoilOutletNode('Coil:Heating:Water',RegenCoilName,ErrFlag)
DesicDehum(DesicDehumNum)%RegenCoilOutletNode = RegenCoilAirOutletNode
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
ENDIF
ELSEIF (SameString(DesicDehum(DesicDehumNum)%RegenCoilType,'Coil:Heating:Steam')) THEN
DesicDehum(DesicDehumNum)%RegenCoilType_Num = Coil_HeatingSteam
CALL ValidateComponent(RegenCoilType,RegenCoilName,IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('...occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(Alphas(1)))
ErrorsFound=.TRUE.
ELSE ! mine data from the regeneration heating coil object
IF(DesicDehum(DesicDehumNum)%RegenSetPointTemp .LE. 0.0d0)THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError(TRIM(cNumericFields(1))//' must be greater than 0.')
ErrorsFoundGeneric = .TRUE.
END IF
ErrFlag = .FALSE.
DesicDehum(DesicDehumNum)%RegenCoilIndex = GetSTeamCoilIndex('COIL:HEATING:STEAM',RegenCoilName,ErrFlag)
IF (DesicDehum(DesicDehumNum)%RegenCoilIndex .EQ. 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//' illegal '//TRIM(cAlphaFields(9))//' = ' &
//TRIM(RegenCoilName))
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the regeneration Heating Coil steam inlet node number
ErrFlag = .FALSE.
DesicDehum(DesicDehumNum)%CoilControlNode = GetSteamCoilSteamInletNode('Coil:Heating:Steam',RegenCoilName,ErrFlag)
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the regeneration heating Coil steam max volume flow rate
DesicDehum(DesicDehumNum)%MaxCoilFluidFlow = &
GetCoilMaxSteamFlowRate(DesicDehum(DesicDehumNum)%RegenCoilIndex,ErrFlag)
IF (DesicDehum(DesicDehumNum)%MaxCoilFluidFlow .GT. 0.0d0)THEN
SteamIndex = 0 ! Function GetSatDensityRefrig will look up steam index if 0 is passed
SteamDensity=GetSatDensityRefrig("STEAM",TempSteamIn,1.0d0,SteamIndex,'Dehumidifier:Desiccant:NoFans')
DesicDehum(DesicDehumNum)%MaxCoilFluidFlow = DesicDehum(DesicDehumNum)%MaxCoilFluidFlow * SteamDensity
END IF
! Get the regeneration heating Coil Inlet Node
ErrFlag = .FALSE.
RegenCoilAirInletNode = &
GetSteamCoilAirInletNode(DesicDehum(DesicDehumNum)%RegenCoilIndex,RegenCoilName,ErrFlag)
DesicDehum(DesicDehumNum)%RegenCoilInletNode = RegenCoilAirInletNode
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
! Get the regeneration heating Coil Outlet Node
ErrFlag = .FALSE.
RegenCoilAirOutletNode = &
GetSteamCoilAirOutletNode(DesicDehum(DesicDehumNum)%RegenCoilIndex,RegenCoilName,ErrFlag)
DesicDehum(DesicDehumNum)%RegenCoilOutletNode = RegenCoilAirOutletNode
IF(ErrFlag)THEN
CALL ShowContinueError('Occurs in '//TRIM(CurrentModuleObject)//' = '//TRIM(DesicDehum(DesicDehumNum)%Name))
ErrorsFound = .TRUE.
END IF
ENDIF
ErrorsFound2=.FALSE.
RegenCoilControlNodeNum = GetSteamCoilControlNodeNum(RegenCoilType,RegenCoilName,ErrorsFound2)
IF(ErrorsFound2)THEN
CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
ErrorsFoundGeneric=.TRUE.
END IF
IF(RegenCoilControlNodeNum .GT. 0)THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError(TRIM(cNumericFields(1))//' is specified as '// &
TRIM(RoundSigDigits(DesicDehum(DesicDehumNum)%RegenSetPointTemp,3))//' C in this object.')
CALL ShowContinueError(' Do not specify a coil temperature setpoint node name in the regeneration air heater object.')
CALL ShowContinueError('...'//TRIM(cAlphaFields(9))//' = '//TRIM(DesicDehum(DesicDehumNum)%RegenCoilType))
CALL ShowContinueError('...'//TRIM(cAlphaFields(10))//' = '//TRIM(DesicDehum(DesicDehumNum)%RegenCoilName))
CALL ShowContinueError('...heating coil temperature setpoint node = '//TRIM(NodeID(RegenCoilControlNodeNum)))
CALL ShowContinueError('...leave the heating coil temperature setpoint node name blank in the regen heater object.')
ErrorsFoundGeneric = .TRUE.
END IF
ELSE
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(9))//' = '//TRIM(DesicDehum(DesicDehumNum)%RegenCoilType))
ErrorsFoundGeneric = .TRUE.
END IF
ENDIF
RegenAirInlet = NodeID(DesicDehum(DesicDehumNum)%HXRegenInNode)
RegenAirOutlet = NodeID(DesicDehum(DesicDehumNum)%HXRegenOutNode)
RegenFanInlet = NodeID(DesicDehum(DesicDehumNum)%RegenFanInNode)
RegenFanOutlet = NodeID(DesicDehum(DesicDehumNum)%RegenFanOutNode)
IF (.NOT. lAlphaBlanks(10))Then
RegenCoilInlet = NodeID(DesicDehum(DesicDehumNum)%RegenCoilInletNode)
RegenCoilOutlet = NodeID(DesicDehum(DesicDehumNum)%RegenCoilOutletNode)
ENDIF
CALL SetUpCompSets(DesicDehum(DesicDehumNum)%DehumType, DesicDehum(DesicDehumNum)%Name, &
DesicDehum(DesicDehumNum)%HXType,DesicDehum(DesicDehumNum)%HXName, &
ProcAirInlet,ProcAirOutlet)
CALL SetUpCompSets(DesicDehum(DesicDehumNum)%DehumType, DesicDehum(DesicDehumNum)%Name, &
DesicDehum(DesicDehumNum)%RegenFanType,DesicDehum(DesicDehumNum)%RegenFanName, &
RegenFanInlet,RegenFanOutlet)
IF (.NOT. lAlphaBlanks(10))THEN
CALL SetUpCompSets(DesicDehum(DesicDehumNum)%DehumType, DesicDehum(DesicDehumNum)%Name, &
DesicDehum(DesicDehumNum)%RegenCoilType,DesicDehum(DesicDehumNum)%RegenCoilName, &
RegenCoilInlet,RegenCoilOutlet)
ENDIF
IF (DesicDehum(DesicDehumNum)%RegenFanPlacement == BlowThru)THEN
DesicDehum(DesicDehumNum)%RegenAirInNode = GetOnlySingleNode(RegenFanInlet,ErrorsFound,&
DesicDehum(DesicDehumNum)%DehumType,DesicDehum(DesicDehumNum)%Name, &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsParent)
DesicDehum(DesicDehumNum)%RegenAirOutNode = GetOnlySingleNode(RegenAirOutlet,ErrorsFound,&
DesicDehum(DesicDehumNum)%DehumType,DesicDehum(DesicDehumNum)%Name, &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent)
IF (.NOT. lAlphaBlanks(10))THEN
IF (DesicDehum(DesicDehumNum)%RegenFanOutNode /= DesicDehum(DesicDehumNum)%RegenCoilInletNode)THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('Regen fan outlet node name and regen heater inlet node name do not match for fan ' &
//'placement: Blow Through')
CALL ShowContinueError('...Regen fan outlet node = '//TRIM(NodeID(DesicDehum(DesicDehumNum)%RegenFanOutNode)))
CALL ShowContinueError('...Regen heater inlet node = '//TRIM(NodeID(DesicDehum(DesicDehumNum)%RegenCoilInletNode)))
ErrorsFoundGeneric = .TRUE.
ENDIF
IF (DesicDehum(DesicDehumNum)%RegenCoilOutletNode /= DesicDehum(DesicDehumNum)%HXRegenInNode)THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('Regen heater outlet node name and desiccant heat exchanger regen inlet node name do not ' &
//'match for fan placement: Blow Through')
CALL ShowContinueError('...Regen heater outlet node = '//TRIM(NodeID(DesicDehum(DesicDehumNum)%RegenCoilOutletNode)))
CALL ShowContinueError('...HX regen inlet node = '//TRIM(NodeID(DesicDehum(DesicDehumNum)%HXRegenInNode)))
ErrorsFoundGeneric = .TRUE.
ENDIF
ELSE
IF (DesicDehum(DesicDehumNum)%RegenFanOutNode /= DesicDehum(DesicDehumNum)%HXRegenInNode)THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('Regen fan outlet node name and desiccant heat exchanger inlet node name do not match for fan ' &
//'placement: Blow Through')
CALL ShowContinueError('...Regen fan outlet node = '//TRIM(NodeID(DesicDehum(DesicDehumNum)%RegenFanOutNode)))
CALL ShowContinueError('...Desiccant HX inlet node = '//TRIM(NodeID(DesicDehum(DesicDehumNum)%HXRegenInNode)))
ErrorsFoundGeneric = .TRUE.
ENDIF
ENDIF
ELSE ! ELSE for IF (DesicDehum(DesicDehumNum)%RegenFanPlacement == BlowThru)THEN
DesicDehum(DesicDehumNum)%RegenAirOutNode = GetOnlySingleNode(RegenFanOutlet,ErrorsFound,&
DesicDehum(DesicDehumNum)%DehumType,DesicDehum(DesicDehumNum)%Name, &
NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsParent)
IF (.NOT. lAlphaBlanks(10)) THEN
DesicDehum(DesicDehumNum)%RegenAirInNode = GetOnlySingleNode(RegenCoilInlet,ErrorsFound,&
DesicDehum(DesicDehumNum)%DehumType,DesicDehum(DesicDehumNum)%Name, &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsParent)
IF (DesicDehum(DesicDehumNum)%RegenCoilOutletNode /= DesicDehum(DesicDehumNum)%HXRegenInNode)THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('Regen heater outlet node name and desiccant heat exchanger regen inlet node name do not ' &
//'match for fan placement: Draw Through')
CALL ShowContinueError('...Regen heater outlet node = '//TRIM(NodeID(DesicDehum(DesicDehumNum)%RegenCoilOutletNode)))
CALL ShowContinueError('...HX regen inlet node = '//TRIM(NodeID(DesicDehum(DesicDehumNum)%HXRegenInNode)))
ErrorsFoundGeneric = .TRUE.
ENDIF
ELSE
DesicDehum(DesicDehumNum)%RegenAirInNode = GetOnlySingleNode(RegenAirInlet,ErrorsFound,&
DesicDehum(DesicDehumNum)%DehumType,DesicDehum(DesicDehumNum)%Name, &
NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsParent)
ENDIF
IF (DesicDehum(DesicDehumNum)%RegenFanInNode /= DesicDehum(DesicDehumNum)%HXRegenOutNode)THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('Regen fan inlet node name and desiccant heat exchanger regen outlet node name do not match ' &
//'for fan placement: Draw Through')
CALL ShowContinueError('...Regen fan inlet node = '//TRIM(NodeID(DesicDehum(DesicDehumNum)%RegenFanInNode)))
CALL ShowContinueError('...HX regen outlet node = '//TRIM(NodeID(DesicDehum(DesicDehumNum)%HXRegenOutNode)))
ErrorsFoundGeneric = .TRUE.
ENDIF
ENDIF
DesicDehum(DesicDehumNum)%CoolingCoilType = Alphas(11)
DesicDehum(DesicDehumNum)%CoolingCoilName = Alphas(12)
IF (.NOT. lAlphaBlanks(12))THEN
IF ((SameString(DesicDehum(DesicDehumNum)%CoolingCoilType,'COIL:COOLING:DX:SINGLESPEED')) .OR. &
(SameString(DesicDehum(DesicDehumNum)%CoolingCoilType,'COIL:COOLING:DX:TWOSTAGEWITHHUMIDITYCONTROLMODE'))) THEN
ErrorsFound2 = .FALSE.
CALL ValidateComponent(DesicDehum(DesicDehumNum)%CoolingCoilType,DesicDehum(DesicDehumNum)%CoolingCoilName, &
ErrorsFound2,DesicDehum(DesicDehumNum)%DehumType//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
IF (ErrorsFound2) ErrorsFoundGeneric = .TRUE.
ELSE !ELSE for IF (DesicDehum(DesicDehumNum)%CoolingCoilType == 'COIL:COOLING:DX:SINGLESPEED' or MultiMode)THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//'='//TRIM(DesicDehum(DesicDehumNum)%Name))
CALL ShowContinueError('Illegal '//TRIM(cAlphaFields(11))//' = '//TRIM(DesicDehum(DesicDehumNum)%CoolingCoilType))
ErrorsFoundGeneric = .TRUE.
END IF
ErrorsFound2 = .FALSE.
DesicDehum(DesicDehumNum)%CoolingCoilOutletNode = &
GetDXCoilOutletNode(DesicDehum(DesicDehumNum)%CoolingCoilType, &
DesicDehum(DesicDehumNum)%CoolingCoilName,ErrorsFound2)
DesicDehum(DesicDehumNum)%CompanionCoilCapacity = GetDXCoilCapacity(DesicDehum(DesicDehumNum)%CoolingCoilType, &
DesicDehum(DesicDehumNum)%CoolingCoilName,ErrorsFound2)
IF(ErrorsFound2)CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%CoolingCoilName)//'"')
ErrorsFound2 = .FALSE.
CALL GetDXCoilIndex(DesicDehum(DesicDehumNum)%CoolingCoilName,DesicDehum(DesicDehumNum)%DXCoilIndex, &
ErrorsFound2, DesicDehum(DesicDehumNum)%CoolingCoilType)
IF(ErrorsFound2)CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%CoolingCoilName)//'"')
ENDIF ! (DesicDehum(DesicDehumNum)%CoolingCoilName /= Blank)THEN
IF (SameString(Alphas(13),'Yes')) THEN
DesicDehum(DesicDehumNum)%CoilUpstreamOfProcessSide = Yes
ELSE IF (lAlphaBlanks(13)) THEN
DesicDehum(DesicDehumNum)%CoilUpstreamOfProcessSide = No
ELSEIF (SameString(Alphas(13),'No')) THEN
DesicDehum(DesicDehumNum)%CoilUpstreamOfProcessSide = No
ELSE
CALL ShowWarningError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('Invalid choice for '//TRIM(cAlphaFields(13))//' = ' &
//TRIM(Alphas(13)))
CALL ShowContinueError('...resetting to the default value of No')
DesicDehum(DesicDehumNum)%CoilUpstreamOfProcessSide = No
END IF
IF (SameString(Alphas(14),'Yes')) THEN
DesicDehum(DesicDehumNum)%Preheat = Yes
ELSEIF (SameString(Alphas(14),'No')) THEN
DesicDehum(DesicDehumNum)%Preheat = No
ELSEIF (lAlphaBlanks(14)) THEN
DesicDehum(DesicDehumNum)%Preheat = No
ELSE
CALL ShowWarningError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('Invalid choice for '//TRIM(cAlphaFields(14))//' = '//TRIM(Alphas(14)))
CALL ShowContinueError('...resetting to the default value of NO')
DesicDehum(DesicDehumNum)%Preheat = No
END IF
IF(DesicDehum(DesicDehumNum)%DXCoilIndex .GT. 0)THEN
IF(DesicDehum(DesicDehumNum)%Preheat == Yes)THEN ! Companion coil waste heat used for regeneration of desiccant
ErrorsFound2 = .FALSE.
DesuperHeaterIndex = GetHeatReclaimSourceIndexNum(DesicDehum(DesicDehumNum)%CoolingCoilType, &
DesicDehum(DesicDehumNum)%CoolingCoilName,ErrorsFound2)
IF (ErrorsFound2)THEN
CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
ErrorsFoundGeneric = .TRUE.
END IF
IF(DesuperHeaterIndex .GT. 0) THEN
CALL ShowWarningError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//'='//TRIM(DesicDehum(DesicDehumNum)%Name))
CALL ShowContinueError('A Coil:Heating:Desuperheater object should not be used when condenser waste heat is '// &
'reclaimed for desiccant regeneration.')
CALL ShowContinueError('A Coil:Heating:Desuperheater object was found using waste heat from the ' &
//TRIM(DesicDehum(DesicDehumNum)%CoolingCoilType)//' "'//&
TRIM(DesicDehum(DesicDehumNum)%CoolingCoilName)//'" object.')
! ErrorsFoundGeneric = .TRUE.
END IF
END IF
ErrorsFound2 = .FALSE.
DesicDehum(DesicDehumNum)%CondenserInletNode = GetCoilCondenserInletNode(DesicDehum(DesicDehumNum)%CoolingCoilType, &
DesicDehum(DesicDehumNum)%CoolingCoilName,ErrorsFound2)
IF(DesicDehum(DesicDehumNum)%CondenserInletNode .EQ. 0 .AND. DesicDehum(DesicDehumNum)%Preheat .EQ. Yes)THEN
DesicDehum(DesicDehumNum)%CondenserInletNode = GetOnlySingleNode(&
TRIM(DesicDehum(DesicDehumNum)%CoolingCoilName)//' Condenser Inlet Node', &
ErrorsFound,TRIM(DesicDehum(DesicDehumNum)%DehumType),TRIM(DesicDehum(DesicDehumNum)%Name), &
NodeType_Air,NodeConnectionType_OutsideAirReference, 2, ObjectIsNotParent)
CALL CheckAndAddAirNodeNumber(DesicDehum(DesicDehumNum)%CondenserInletNode,OANodeError)
IF(.NOT. OANodeError)THEN
CALL ShowWarningError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('The '//TRIM(cAlphaFields(14))//' input is specified as Yes and a condenser air'// &
' inlet node name was not specified for the companion cooling coil.')
CALL ShowContinueError('Adding condenser inlet air node for '//TRIM(DesicDehum(DesicDehumNum)%CoolingCoilType)//' "'// &
TRIM(DesicDehum(DesicDehumNum)%CoolingCoilName)//'"')
CALL ShowContinueError('...condenser inlet air node name = '// &
TRIM(NodeID(DesicDehum(DesicDehumNum)%CondenserInletNode)))
CALL ShowContinueError('...this node name will be specified as an outdoor air node.')
END IF
ELSE IF(DesicDehum(DesicDehumNum)%Preheat .EQ. Yes)THEN
IF (.NOT. CheckOutAirNodeNumber(DesicDehum(DesicDehumNum)%CondenserInletNode)) THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('The regeneration air inlet node must be specified as an outdoor air node '// &
'when '//TRIM(cAlphaFields(14))//' is specified as Yes.')
ErrorsFoundGeneric = .TRUE.
END IF
END IF
END IF
IF (CheckOutAirNodeNumber(DesicDehum(DesicDehumNum)%RegenAirInNode)) THEN
DesicDehum(DesicDehumNum)%RegenInletIsOutsideAirNode = .TRUE.
END IF
IF(DesicDehum(DesicDehumNum)%DXCoilIndex .EQ. 0 .AND. DesicDehum(DesicDehumNum)%Preheat == Yes) THEN
CALL ShowWarningError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//'='//TRIM(DesicDehum(DesicDehumNum)%Name))
CALL ShowContinueError('A valid '//TRIM(cAlphaFields(12))//' must be used when condenser waste heat is '// &
'reclaimed for desiccant regeneration.')
CALL ShowContinueError('... '//TRIM(cAlphaFields(11))//' = '//TRIM(DesicDehum(DesicDehumNum)%CoolingCoilType))
CALL ShowContinueError('... '//TRIM(cAlphaFields(12))//' = '//TRIM(DesicDehum(DesicDehumNum)%CoolingCoilName))
ErrorsFoundGeneric = .TRUE.
END IF
IF(DesicDehum(DesicDehumNum)%DXCoilIndex .GT. 0 .AND. DesicDehum(DesicDehumNum)%CoilUpstreamOfProcessSide == Yes) THEN
ErrorsFound2 = .FALSE.
CoilBypassedFlowFrac = GetDXCoilBypassedFlowFrac(DesicDehum(DesicDehumNum)%CoolingCoilType, &
DesicDehum(DesicDehumNum)%CoolingCoilName, ErrorsFound2)
IF(ErrorsFound2)CALL ShowContinueError('...occurs in '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%CoolingCoilName)//'"')
IF(CoilBypassedFlowFrac .GT. 0.0d0)THEN
CALL ShowWarningError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//'='//TRIM(DesicDehum(DesicDehumNum)%Name))
CALL ShowContinueError('A DX coil bypassed air flow fraction greater than 0 may not be used when the input for '// &
TRIM(cAlphaFields(13))//' is specified as Yes.')
CALL ShowContinueError('A DX coil with a bypassed air flow fraction greater than 0 may be upstream of the process '// &
'inlet however the input for '//TRIM(cAlphaFields(13))//' must be specified as No.')
CALL ShowContinueError('... '//TRIM(cAlphaFields(11))//' = '//TRIM(DesicDehum(DesicDehumNum)%CoolingCoilType))
CALL ShowContinueError('... '//TRIM(cAlphaFields(12))//' = '//TRIM(DesicDehum(DesicDehumNum)%CoolingCoilName))
ErrorsFoundGeneric = .TRUE.
END IF
ELSE IF(DesicDehum(DesicDehumNum)%DXCoilIndex .EQ. 0 .AND. DesicDehum(DesicDehumNum)%CoilUpstreamOfProcessSide == Yes) THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('A valid companion coil must be specified when '// &
TRIM(cAlphaFields(13))//' is specified as Yes.')
ErrorsFoundGeneric = .TRUE.
END IF
IF(.NOT. DesicDehum(DesicDehumNum)%RegenInletIsOutsideAirNode .AND. DesicDehum(DesicDehumNum)%Preheat == Yes) THEN
CALL ShowWarningError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//'='//TRIM(DesicDehum(DesicDehumNum)%Name))
CALL ShowContinueError('The desiccant dehumidifier regeneration air inlet must be specified as an outdoor air node'// &
' when '//TRIM(cAlphaFields(14))//' is specified as Yes.')
CALL ShowContinueError('... desiccant dehumidifier regeneration air inlet node name = '// &
TRIM(NodeID(DesicDehum(DesicDehumNum)%RegenAirInNode)))
ErrorsFoundGeneric = .TRUE.
END IF
IF(DesicDehum(DesicDehumNum)%CoilUpstreamOfProcessSide == Yes)THEN
IF(DesicDehum(DesicDehumNum)%ProcAirInNode .NE. DesicDehum(DesicDehumNum)%CoolingCoilOutletNode)THEN
CALL ShowSevereError('For '//TRIM(DesicDehum(DesicDehumNum)%DehumType)// &
' "'//TRIM(DesicDehum(DesicDehumNum)%Name)//'"')
CALL ShowContinueError('Node names are inconsistent in companion cooling coil and desiccant heat exchanger objects.')
CALL ShowContinueError('For companion cooling coil = '//TRIM(DesicDehum(DesicDehumNum)%CoolingCoilType)//' "'// &
TRIM(DesicDehum(DesicDehumNum)%CoolingCoilName)//'"')
CALL ShowContinueError('The outlet node name in cooling coil = '// &
TRIM(NodeID(DesicDehum(DesicDehumNum)%CoolingCoilOutletNode)))
CALL ShowContinueError('For desiccant heat exchanger = '//TRIM(DesicDehum(DesicDehumNum)%HXType)//' "'// &
TRIM(DesicDehum(DesicDehumNum)%HXName)//'"')
CALL ShowContinueError('The process air inlet node name = '// &
TRIM(NodeID(DesicDehum(DesicDehumNum)%ProcAirInNode)))
CALL ShowFatalError('...previous error causes program termination.')
END IF
END IF
!Exhaust Fan input
DesicDehum(DesicDehumNum)%ExhaustFanMaxVolFlowRate = Numbers(2)
DesicDehum(DesicDehumNum)%ExhaustFanMaxPower = Numbers(3)
DesicDehum(DesicDehumNum)%ExhaustFanCurveIndex = GetCurveIndex(Alphas(15))
IF(.NOT. SameString(GetCurveType(DesicDehum(DesicDehumNum)%ExhaustFanCurveIndex),' '))THEN
SELECT CASE(GetCurveType(DesicDehum(DesicDehumNum)%ExhaustFanCurveIndex))
CASE('CUBIC')
CASE('QUADRATIC')
CASE DEFAULT
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//', "'//TRIM(DesicDehum(DesicDehumNum)%Name)// &
'" illegal Part Load Fraction Correlation Curve (function of part-load ratio) type for this object = '// &
TRIM(GetCurveType(DesicDehum(DesicDehumNum)%ExhaustFanCurveIndex)))
ErrorsFoundGeneric=.true.
END SELECT
END IF
IF(DesicDehum(DesicDehumNum)%Preheat == Yes)THEN
ErrorsFound2 = .FALSE.
IF (DesicDehum(DesicDehumNum)%ExhaustFanMaxVolFlowRate <= 0)THEN
ErrorsFound2 =.TRUE.
ENDIF
IF (DesicDehum(DesicDehumNum)%ExhaustFanMaxPower <= 0)THEN
ErrorsFound2 =.TRUE.
ENDIF
IF(ErrorsFound2)THEN
CALL ShowSevereError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name//'"'))
CALL ShowContinueError(TRIM(cNumericFields(2))//' and '//TRIM(cNumericFields(3))// &
' must be defined if '//TRIM(cAlphaFields(14))//' field is "Yes".')
END IF
ELSE IF(DesicDehum(DesicDehumNum)%Preheat == No)THEN
IF(DesicDehum(DesicDehumNum)%ExhaustFanMaxVolFlowRate .GT. 0.0d0)THEN
CALL ShowWarningError(TRIM(DesicDehum(DesicDehumNum)%DehumType)//' "'//TRIM(DesicDehum(DesicDehumNum)%Name//'"'))
CALL ShowContinueError(TRIM(cNumericFields(2))// &
' should be 0 if '//TRIM(cAlphaFields(14))//' field is "No".')
CALL ShowContinueError('...'//TRIM(cNumericFields(2))//' will not be used and is reset to 0.')
DesicDehum(DesicDehumNum)%ExhaustFanMaxVolFlowRate = 0.0d0
END IF
END IF
ENDDO
! SET UP OUTPUTS
DO DesicDehumNum=1,NumSolidDesicDehums
! Setup Report variables for the Desiccant Dehumidifiers
CALL SetupOutputVariable('Dehumidifier Removed Water Mass [kg]',DesicDehum(DesicDehumNum)%WaterRemove,&
'System','Sum',DesicDehum(DesicDehumNum)%Name)
CALL SetupOutputVariable('Dehumidifier Removed Water Mass Flow Rate [kg/s]',DesicDehum(DesicDehumNum)%WaterRemoveRate,&
'System','Average',DesicDehum(DesicDehumNum)%Name)
CALL SetupOutputVariable('Dehumidifier Part Load Ratio []',DesicDehum(DesicDehumNum)%PartLoad,'System',&
'Average',DesicDehum(DesicDehumNum)%Name)
CALL SetupOutputVariable('Dehumidifier Electric Power [W]',DesicDehum(DesicDehumNum)%ElecUseRate,'System',&
'Average',DesicDehum(DesicDehumNum)%Name)
CALL SetupOutputVariable('Dehumidifier Electric Energy [J]',DesicDehum(DesicDehumNum)%ElecUseEnergy,'System',&
'Sum',DesicDehum(DesicDehumNum)%Name, &
ResourceTypeKey='Electricity',GroupKey='System',EndUseKey='Cooling')
CALL SetupOutputVariable('Dehumidifier Regeneration Specific Energy [J/kgWater]',&
DesicDehum(DesicDehumNum)%SpecRegenEnergy,&
'System','Average',DesicDehum(DesicDehumNum)%Name)
CALL SetupOutputVariable('Dehumidifier Regeneration Rate [W]',DesicDehum(DesicDehumNum)%QRegen,'System','Average',&
DesicDehum(DesicDehumNum)%Name)
CALL SetupOutputVariable('Dehumidifier Regeneration Energy [J]',DesicDehum(DesicDehumNum)%RegenEnergy,'System','Sum',&
DesicDehum(DesicDehumNum)%Name)
CALL SetupOutputVariable('Dehumidifier Regeneration Air Speed [m/s]',DesicDehum(DesicDehumNum)%RegenAirVel,&
'System','Average',DesicDehum(DesicDehumNum)%Name)
CALL SetupOutputVariable('Dehumidifier Regeneration Air Mass Flow Rate [kg/s]',&
DesicDehum(DesicDehumNum)%RegenAirInMassFlowRate,'System','Average',&
DesicDehum(DesicDehumNum)%Name)
CALL SetupOutputVariable('Dehumidifier Process Air Mass Flow Rate [kg/s]',&
DesicDehum(DesicDehumNum)%ProcAirInMassFlowRate,'System','Average',&
DesicDehum(DesicDehumNum)%Name)
END DO
DO DesicDehumNum=1,NumGenericDesicDehums
! Setup Report variables for the Desiccant Dehumidifiers
CALL SetupOutputVariable('Dehumidifier Removed Water Mass [kg]',DesicDehum(DesicDehumNum)%WaterRemove,&
'System','Sum',DesicDehum(DesicDehumNum)%Name)
CALL SetupOutputVariable('Dehumidifier Removed Water Mass Flow Rate [kg/s]',DesicDehum(DesicDehumNum)%WaterRemoveRate,&
'System','Average',DesicDehum(DesicDehumNum)%Name)
CALL SetupOutputVariable('Dehumidifier Part Load Ratio []',DesicDehum(DesicDehumNum)%PartLoad,'System',&
'Average',DesicDehum(DesicDehumNum)%Name)
IF(DesicDehum(DesicDehumNum)%ExhaustFanMaxVolFlowRate .GT. 0)THEN
CALL SetupOutputVariable('Dehumidifier Exhaust Fan Electric Power [W]',DesicDehum(DesicDehumNum)%ExhaustFanPower,&
'System','Average',DesicDehum(DesicDehumNum)%Name)
CALL SetupOutputVariable('Dehumidifier Exhaust Fan Electric Energy [J]', &
DesicDehum(DesicDehumNum)%ExhaustFanElecConsumption,'System',&
'Sum',DesicDehum(DesicDehumNum)%Name, &
ResourceTypeKey='Electricity',GroupKey='System',EndUseKey='Cooling')
END IF
END DO
IF (ErrorsFound) THEN
CALL ShowFatalError('Errors found in getting Dehumidifier:Desiccant:NoFans input')
ELSEIF (ErrorsFoundGeneric) THEN
CALL ShowFatalError('Errors found in getting DESICCANT DEHUMIDIFIER input')
END IF
DEALLOCATE(Alphas)
DEALLOCATE(cAlphaFields)
DEALLOCATE(cNumericFields)
DEALLOCATE(Numbers)
DEALLOCATE(lAlphaBlanks)
DEALLOCATE(lNumericBlanks)
RETURN
END SUBROUTINE GetDesiccantDehumidifierInput