Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE GetWaterCoilInput
! SUBROUTINE INFORMATION:
! AUTHOR Richard Liesen
! DATE WRITTEN April 1998
! MODIFIED April 2004: Rahul Chillar
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Obtains input data for coils and stores it in coil data structures
! METHODOLOGY EMPLOYED:
! Uses "Get" routines to read in data.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataSizing, ONLY: AutoSize
USE InputProcessor
USE NodeInputManager, ONLY: GetOnlySingleNode
USE BranchNodeConnections, ONLY: TestCompSet
USE WaterManager, ONLY: SetupTankSupplyComponent
USE DataIPShortCuts
USE GlobalNames, ONLY: VerifyUniqueCoilName
USE SetPointManager, ONLY: NodeHasSPMCtrlVarType, iCtrlVarType_Temp, iCtrlVarType_HumRat
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='GetWaterCoilInput: ' ! include trailing blank space
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: CoilNum ! The WaterCoil that you are currently loading input into
INTEGER :: NumSimpHeat=0
INTEGER :: NumFlatFin=0
INTEGER :: NumCooling=0
INTEGER :: SimpHeatNum
INTEGER :: FlatFinNum
INTEGER :: CoolingNum
INTEGER :: NumAlphas
INTEGER :: NumNums
INTEGER :: IOSTAT
CHARACTER(len=MaxNameLength) :: CurrentModuleObject ! for ease in getting objects
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: AlphArray ! 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(:) :: NumArray ! 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
LOGICAL :: ErrorsFound = .false. ! If errors detected in input
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
LOGICAL :: errflag
! Flow
NumSimpHeat = GetNumObjectsFound('Coil:Heating:Water')
NumFlatFin = GetNumObjectsFound('Coil:Cooling:Water:DetailedGeometry')
NumCooling = GetNumObjectsFound('Coil:Cooling:Water')
NumWaterCoils = NumSimpHeat + NumFlatFin + NumCooling
IF (NumWaterCoils.GT.0) THEN
ALLOCATE(WaterCoil(NumWaterCoils))
ALLOCATE(WaterTempCoolCoilErrs(NumWaterCoils))
WaterTempCoolCoilErrs=0
ALLOCATE(PartWetCoolCoilErrs(NumWaterCoils))
PartWetCoolCoilErrs=0
ALLOCATE(CheckEquipName(NumWaterCoils))
CheckEquipName=.true.
ENDIF
CALL GetObjectDefMaxArgs('Coil:Heating:Water',TotalArgs,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
CALL GetObjectDefMaxArgs('Coil:Cooling:Water:DetailedGeometry',TotalArgs,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
CALL GetObjectDefMaxArgs('Coil:Cooling:Water',TotalArgs,NumAlphas,NumNums)
MaxNums=MAX(MaxNums,NumNums)
MaxAlphas=MAX(MaxAlphas,NumAlphas)
ALLOCATE(AlphArray(MaxAlphas))
AlphArray=' '
ALLOCATE(cAlphaFields(MaxAlphas))
cAlphaFields=' '
ALLOCATE(cNumericFields(MaxNums))
cNumericFields=' '
ALLOCATE(NumArray(MaxNums))
NumArray=0.0d0
ALLOCATE(lAlphaBlanks(MaxAlphas))
lAlphaBlanks=.true.
ALLOCATE(lNumericBlanks(MaxNums))
lNumericBlanks=.true.
CurrentModuleObject = 'Coil:Heating:Water'
! Get the data for simple heating coils
DO SimpHeatNum = 1, NumSimpHeat
CoilNum= SimpHeatNum
CALL GetObjectItem(CurrentModuleObject,SimpHeatNum,AlphArray, &
NumAlphas,NumArray,NumNums,IOSTAT, &
NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(AlphArray(1),WaterCoil%Name,CoilNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) AlphArray(1)='xxxxx'
ENDIF
CALL VerifyUniqueCoilName(CurrentModuleObject,AlphArray(1),errflag,TRIM(CurrentModuleObject)//' Name')
IF (errflag) THEN
ErrorsFound=.true.
ENDIF
WaterCoil(CoilNum)%Name = AlphArray(1)
WaterCoil(CoilNum)%Schedule = AlphArray(2)
IF (lAlphaBlanks(2)) THEN
WaterCoil(CoilNum)%SchedPtr = ScheduleAlwaysOn
ELSE
WaterCoil(CoilNum)%SchedPtr = GetScheduleIndex(AlphArray(2))
IF (WaterCoil(CoilNum)%SchedPtr == 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//': invalid '//TRIM(cAlphaFields(2))// &
' entered ='//TRIM(AlphArray(2))// &
' for '//TRIM(cAlphaFields(1))//'='//TRIM(AlphArray(1)))
ErrorsFound=.TRUE.
END IF
ENDIF
WaterCoil(CoilNum)%WaterCoilTypeA = 'Heating'
WaterCoil(CoilNum)%WaterCoilType = CoilType_Heating ! 'Heating'
WaterCoil(CoilNum)%WaterCoilModelA = 'SIMPLE'
WaterCoil(CoilNum)%WaterCoilModel = CoilModel_Simple ! 'SIMPLE'
WaterCoil(CoilNum)%WaterCoilType_Num = WaterCoil_SimpleHeating
WaterCoil(CoilNum)%UACoil = NumArray(1)
WaterCoil(CoilNum)%UACoilVariable = WaterCoil(CoilNum)%UACoil
WaterCoil(CoilNum)%MaxWaterVolFlowRate = NumArray(2)
WaterCoil(CoilNum)%WaterInletNodeNum = &
GetOnlySingleNode(AlphArray(3),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1),NodeType_Water, &
NodeConnectionType_Inlet,2,ObjectIsNotParent)
WaterCoil(CoilNum)%WaterOutletNodeNum = &
GetOnlySingleNode(AlphArray(4),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1),NodeType_Water, &
NodeConnectionType_Outlet,2,ObjectIsNotParent)
WaterCoil(CoilNum)%AirInletNodeNum = &
GetOnlySingleNode(AlphArray(5),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1),NodeType_Air, &
NodeConnectionType_Inlet,1,ObjectIsNotParent)
WaterCoil(CoilNum)%AirOutletNodeNum = &
GetOnlySingleNode(AlphArray(6),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1),NodeType_Air, &
NodeConnectionType_Outlet,1,ObjectIsNotParent)
SELECT CASE (AlphArray(7))
CASE ('UFACTORTIMESAREAANDDESIGNWATERFLOWRATE')
WaterCoil(CoilNum)%CoilPerfInpMeth = UAandFlow
CASE ('NOMINALCAPACITY')
WaterCoil(CoilNum)%CoilPerfInpMeth = NomCap
CASE DEFAULT
! will be caught by input processor
WaterCoil(CoilNum)%CoilPerfInpMeth = UAandFlow
END SELECT
WaterCoil(CoilNum)%DesTotWaterCoilLoad = NumArray(3)
IF (WaterCoil(CoilNum)%UACoil == Autosize .and. WaterCoil(CoilNum)%CoilPerfInpMeth == UAandFlow) &
WaterCoil(CoilNum)%RequestingAutosize=.true.
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate == Autosize .and. WaterCoil(CoilNum)%CoilPerfInpMeth == UAandFlow) &
WaterCoil(CoilNum)%RequestingAutosize=.true.
IF (WaterCoil(CoilNum)%DesTotWaterCoilLoad == Autosize .and. WaterCoil(CoilNum)%CoilPerfInpMeth == NomCap) &
WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%DesInletWaterTemp = NumArray(4)
WaterCoil(CoilNum)%DesInletAirTemp = NumArray(5)
WaterCoil(CoilNum)%DesOutletWaterTemp = NumArray(6)
WaterCoil(CoilNum)%DesOutletAirTemp = NumArray(7)
WaterCoil(CoilNum)%RatioAirSideToWaterSideConvect = NumArray(8)
IF (WaterCoil(CoilNum)%DesInletWaterTemp <= WaterCoil(CoilNum)%DesOutletWaterTemp) THEN
CALL ShowSevereError('For '//TRIM(CurrentModuleObject)//', ' // TRIM(AlphArray(1)))
CALL ShowContinueError(' the '//TRIM(cNumericFields(4))//' must be greater than the '//TRIM(cNumericFields(6))//'.')
ErrorsFound = .TRUE.
END IF
IF (WaterCoil(CoilNum)%DesInletAirTemp >= WaterCoil(CoilNum)%DesOutletAirTemp) THEN
CALL ShowSevereError('For '//TRIM(CurrentModuleObject)//', ' // TRIM(AlphArray(1)))
CALL ShowContinueError(' the '//TRIM(cNumericFields(5))//' must be less than the '//TRIM(cNumericFields(7))//'.')
ErrorsFound = .TRUE.
END IF
IF (WaterCoil(CoilNum)%DesInletAirTemp >= WaterCoil(CoilNum)%DesInletWaterTemp) THEN
CALL ShowSevereError('For '//TRIM(CurrentModuleObject)//', ' // TRIM(AlphArray(1)))
CALL ShowContinueError(' the '//TRIM(cNumericFields(5))//' must be less than the '//TRIM(cNumericFields(4))//'.')
ErrorsFound = .TRUE.
END IF
CALL TestCompSet(TRIM(CurrentModuleObject),AlphArray(1),AlphArray(3),AlphArray(4),'Water Nodes')
CALL TestCompSet(TRIM(CurrentModuleObject),AlphArray(1),AlphArray(5),AlphArray(6),'Air Nodes')
!Setup the Simple Heating Coil reporting variables
CALL SetupOutputVariable('Heating Coil Heating Energy [J]', WaterCoil(CoilNum)%TotWaterHeatingCoilEnergy, &
'System','Sum',WaterCoil(CoilNum)%Name, &
ResourceTypeKey='ENERGYTRANSFER',EndUseKey='HEATINGCOILS',GroupKey='System')
CALL SetupOutputVariable('Heating Coil Source Side Heat Transfer Energy [J]', &
WaterCoil(CoilNum)%TotWaterHeatingCoilEnergy, &
'System','Sum',WaterCoil(CoilNum)%Name, &
ResourceTypeKey='PLANTLOOPHEATINGDEMAND',EndUseKey='HEATINGCOILS',GroupKey='System')
CALL SetupOutputVariable('Heating Coil Heating Rate [W]', WaterCoil(CoilNum)%TotWaterHeatingCoilRate, &
'System','Average',WaterCoil(CoilNum)%Name)
CALL SetupOutputVariable('Heating Coil U Factor Times Area Value [W/K]', WaterCoil(CoilNum)%UACoilVariable, &
'System','Average',WaterCoil(CoilNum)%Name)
END DO
CurrentModuleObject = 'Coil:Cooling:Water:DetailedGeometry'
! Get the data for detailed cooling coils.
DO FlatFinNum = 1, NumFlatFin
CoilNum= NumSimpHeat + FlatFinNum
CALL GetObjectItem(CurrentModuleObject,FlatFinNum, &
AlphArray,NumAlphas,NumArray,NumNums,IOSTAT, &
NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(AlphArray(1),WaterCoil%Name,CoilNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) AlphArray(1)='xxxxx'
ENDIF
CALL VerifyUniqueCoilName(CurrentModuleObject,AlphArray(1),errflag,TRIM(CurrentModuleObject)//' Name')
IF (errflag) THEN
ErrorsFound=.true.
ENDIF
WaterCoil(CoilNum)%Name = AlphArray(1)
WaterCoil(CoilNum)%Schedule = AlphArray(2)
IF (lAlphaBlanks(2)) THEN
WaterCoil(CoilNum)%SchedPtr = ScheduleAlwaysOn
ELSE
WaterCoil(CoilNum)%SchedPtr = GetScheduleIndex(AlphArray(2))
IF (WaterCoil(CoilNum)%SchedPtr == 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//': invalid '//TRIM(cAlphaFields(2))// &
' entered ='//TRIM(AlphArray(2))// &
' for '//TRIM(cAlphaFields(1))//'='//TRIM(AlphArray(1)))
ErrorsFound=.TRUE.
END IF
ENDIF
WaterCoil(CoilNum)%WaterCoilTypeA = 'Cooling'
WaterCoil(CoilNum)%WaterCoilType = CoilType_Cooling ! 'Cooling'
WaterCoil(CoilNum)%WaterCoilModelA = 'DETAILED FLAT FIN'
WaterCoil(CoilNum)%WaterCoilModel = CoilModel_Detailed ! 'DETAILED FLAT FIN'
WaterCoil(CoilNum)%WaterCoilType_Num = WaterCoil_DetFlatFinCooling
WaterCoil(CoilNum)%MaxWaterVolFlowRate = NumArray(1)
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%TubeOutsideSurfArea = NumArray(2)
IF (WaterCoil(CoilNum)%TubeOutsideSurfArea == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%TotTubeInsideArea = NumArray(3)
IF (WaterCoil(CoilNum)%TotTubeInsideArea == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%FinSurfArea = NumArray(4)
IF (WaterCoil(CoilNum)%FinSurfArea == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%MinAirFlowArea = NumArray(5)
IF (WaterCoil(CoilNum)%MinAirFlowArea == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%CoilDepth = NumArray(6)
IF (WaterCoil(CoilNum)%CoilDepth == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%FinDiam = NumArray(7)
IF (WaterCoil(CoilNum)%FinDiam == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%FinThickness = NumArray(8)
IF ( WaterCoil(CoilNum)%FinThickness .LE. 0.0d0 ) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//': '//TRIM(cNumericFields(8))// &
' must be > 0.0, for '//TRIM(cAlphaFields(1))//' = '//TRIM(WaterCoil(CoilNum)%Name))
ErrorsFound = .TRUE.
END IF
WaterCoil(CoilNum)%TubeInsideDiam = NumArray(9)
WaterCoil(CoilNum)%TubeOutsideDiam = NumArray(10)
WaterCoil(CoilNum)%TubeThermConductivity= NumArray(11)
IF ( WaterCoil(CoilNum)%TubeThermConductivity .LE. 0.0d0 ) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//': '//TRIM(cNumericFields(11))// &
' must be > 0.0, for '//TRIM(cAlphaFields(1))//' = '//TRIM(WaterCoil(CoilNum)%Name))
ErrorsFound = .TRUE.
END IF
WaterCoil(CoilNum)%FinThermConductivity = NumArray(12)
IF ( WaterCoil(CoilNum)%FinThermConductivity .LE. 0.0d0 ) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//': '//TRIM(cNumericFields(12))// &
' must be > 0.0, for '//TRIM(cAlphaFields(1))//' = '//TRIM(WaterCoil(CoilNum)%Name))
ErrorsFound = .TRUE.
END IF
WaterCoil(CoilNum)%FinSpacing = NumArray(13)
WaterCoil(CoilNum)%TubeDepthSpacing = NumArray(14)
WaterCoil(CoilNum)%NumofTubeRows = NumArray(15)
WaterCoil(CoilNum)%NumofTubesperRow = NumArray(16)
IF (WaterCoil(CoilNum)%NumofTubesperRow == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%WaterInletNodeNum = &
GetOnlySingleNode(AlphArray(3),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1),NodeType_Water, &
NodeConnectionType_Inlet,2,ObjectIsNotParent)
WaterCoil(CoilNum)%WaterOutletNodeNum = &
GetOnlySingleNode(AlphArray(4),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1),NodeType_Water, &
NodeConnectionType_Outlet,2,ObjectIsNotParent)
WaterCoil(CoilNum)%AirInletNodeNum = &
GetOnlySingleNode(AlphArray(5),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1),NodeType_Air, &
NodeConnectionType_Inlet,1,ObjectIsNotParent)
WaterCoil(CoilNum)%AirOutletNodeNum = &
GetOnlySingleNode(AlphArray(6),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1),NodeType_Air, &
NodeConnectionType_Outlet,1,ObjectIsNotParent)
! A7 ; \field Name of Water Storage Tank for Condensate Collection
WaterCoil(CoilNum)%CondensateCollectName = AlphArray(7)
IF (lAlphaBlanks(7)) THEN
WaterCoil(CoilNum)%CondensateCollectMode = CondensateDiscarded
ELSE
WaterCoil(CoilNum)%CondensateCollectMode = CondensateToTank
CALL SetupTankSupplyComponent(WaterCoil(CoilNum)%Name,TRIM(CurrentModuleObject), &
WaterCoil(CoilNum)%CondensateCollectName, ErrorsFound, WaterCoil(CoilNum)%CondensateTankID, &
WaterCoil(CoilNum)%CondensateTankSupplyARRID )
ENDIF
CALL TestCompSet(TRIM(CurrentModuleObject),AlphArray(1),AlphArray(3),AlphArray(4),'Water Nodes')
CALL TestCompSet(TRIM(CurrentModuleObject),AlphArray(1),AlphArray(5),AlphArray(6),'Air Nodes')
! Setup Report variables for the Detailed Flat Fin Cooling Coils
CALL SetupOutputVariable('Cooling Coil Total Cooling Energy [J]', WaterCoil(CoilNum)%TotWaterCoolingCoilEnergy, &
'System','Sum',WaterCoil(CoilNum)%Name, &
ResourceTypeKey='ENERGYTRANSFER',EndUseKey='COOLINGCOILS',GroupKey='System')
CALL SetupOutputVariable('Cooling Coil Source Side Heat Transfer Energy [J]', &
WaterCoil(CoilNum)%TotWaterCoolingCoilEnergy, &
'System','Sum',WaterCoil(CoilNum)%Name, &
ResourceTypeKey='PLANTLOOPCOOLINGDEMAND',EndUseKey='COOLINGCOILS',GroupKey='System')
CALL SetupOutputVariable('Cooling Coil Sensible Cooling Energy [J]',WaterCoil(CoilNum)%SenWaterCoolingCoilEnergy, &
'System','Sum',WaterCoil(CoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Total Cooling Rate [W]', WaterCoil(CoilNum)%TotWaterCoolingCoilRate, &
'System','Average',WaterCoil(CoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Sensible Cooling Rate [W]', WaterCoil(CoilNum)%SenWaterCoolingCoilRate, &
'System','Average',WaterCoil(CoilNum)%Name)
IF (WaterCoil(CoilNum)%CondensateCollectMode == CondensateToTank) THEN
CALL SetupOutputVariable('Cooling Coil Condensate Volume Flow Rate [m3/s]',WaterCoil(CoilNum)%CondensateVdot,&
'System','Average', WaterCoil(CoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Condensate Volume [m3]',WaterCoil(CoilNum)%CondensateVol,&
'System','Sum', WaterCoil(CoilNum)%Name, &
ResourceTypeKey='OnSiteWater', &
EndUseKey='Condensate', GroupKey='System')
ENDIF
END DO
CurrentModuleObject = 'Coil:Cooling:Water'
! Get the data for Cooling coils.
DO CoolingNum = 1, NumCooling
CoilNum= NumSimpHeat + NumFlatFin + CoolingNum
CALL GetObjectItem(CurrentModuleObject,CoolingNum, &
AlphArray,NumAlphas,NumArray,NumNums,IOSTAT, &
NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(AlphArray(1),WaterCoil%Name,CoilNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) AlphArray(1)='xxxxx'
ENDIF
CALL VerifyUniqueCoilName(CurrentModuleObject,AlphArray(1),errflag,TRIM(CurrentModuleObject)//' Name')
IF (errflag) THEN
ErrorsFound=.true.
ENDIF
WaterCoil(CoilNum)%Name = AlphArray(1)
WaterCoil(CoilNum)%Schedule = AlphArray(2)
IF (lAlphaBlanks(2)) THEN
WaterCoil(CoilNum)%SchedPtr = ScheduleAlwaysOn
ELSE
WaterCoil(CoilNum)%SchedPtr = GetScheduleIndex(AlphArray(2))
IF (WaterCoil(CoilNum)%SchedPtr == 0) THEN
CALL ShowSevereError(TRIM(CurrentModuleObject)//': invalid '//TRIM(cAlphaFields(2))// &
' entered ='//TRIM(AlphArray(2))// &
' for '//TRIM(cAlphaFields(1))//'='//TRIM(AlphArray(1)))
ErrorsFound=.TRUE.
END IF
ENDIF
WaterCoil(CoilNum)%WaterCoilTypeA = 'Cooling'
WaterCoil(CoilNum)%WaterCoilType = CoilType_Cooling ! 'Cooling'
WaterCoil(CoilNum)%WaterCoilModelA = 'Cooling'
WaterCoil(CoilNum)%WaterCoilModel = CoilModel_Cooling ! 'Cooling'
WaterCoil(CoilNum)%WaterCoilType_Num = WaterCoil_Cooling
WaterCoil(CoilNum)%MaxWaterVolFlowRate = NumArray(1) !Liquid mass flow rate at Design kg/s
IF (WaterCoil(CoilNum)%MaxWaterVolFlowRate == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%DesAirVolFlowRate = NumArray(2) !Dry air mass flow rate at Design (kg/s)
IF (WaterCoil(CoilNum)%DesAirVolFlowRate == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%DesInletWaterTemp = NumArray(3) !Entering water temperature at Design C
IF (WaterCoil(CoilNum)%DesInletWaterTemp == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%DesInletAirTemp = NumArray(4) !Entering air dry bulb temperature at Design(C)
IF (WaterCoil(CoilNum)%DesInletAirTemp == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%DesOutletAirTemp = NumArray(5) !Leaving air dry bulb temperature at Design(C)
IF (WaterCoil(CoilNum)%DesOutletAirTemp == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%DesInletAirHumRat = NumArray(6) !Entering air humidity ratio at Design
IF (WaterCoil(CoilNum)%DesInletAirHumRat == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%DesOutletAirHumRat = NumArray(7) !Leaving air humidity ratio at Design
IF (WaterCoil(CoilNum)%DesOutletAirHumRat == Autosize) WaterCoil(CoilNum)%RequestingAutosize=.true.
WaterCoil(CoilNum)%WaterInletNodeNum = &
GetOnlySingleNode(AlphArray(3),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1),NodeType_Water, &
NodeConnectionType_Inlet,2,ObjectIsNotParent)
WaterCoil(CoilNum)%WaterOutletNodeNum = &
GetOnlySingleNode(AlphArray(4),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1),NodeType_Water, &
NodeConnectionType_Outlet,2,ObjectIsNotParent)
WaterCoil(CoilNum)%AirInletNodeNum = &
GetOnlySingleNode(AlphArray(5),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1),NodeType_Air, &
NodeConnectionType_Inlet,1,ObjectIsNotParent)
WaterCoil(CoilNum)%AirOutletNodeNum = &
GetOnlySingleNode(AlphArray(6),ErrorsFound,TRIM(CurrentModuleObject),AlphArray(1),NodeType_Air, &
NodeConnectionType_Outlet,1,ObjectIsNotParent)
SELECT CASE (AlphArray(7))
!The default is SimpleAnalysis = 2. and DetailedAnalysis =1
CASE ('SIMPLEANALYSIS')
WaterCoil(CoilNum)%CoolingCoilAnalysisMode = SimpleAnalysis
CASE ('DETAILEDANALYSIS')
WaterCoil(CoilNum)%CoolingCoilAnalysisMode = DetailedAnalysis
CASE DEFAULT
WaterCoil(CoilNum)%CoolingCoilAnalysisMode = SimpleAnalysis
END SELECT
SELECT CASE (AlphArray(8))
!The default is CrossFlow = 2. and CounterFlow=1
CASE ('CROSSFLOW')
WaterCoil(CoilNum)%HeatExchType = CrossFlow
CASE ('COUNTERFLOW')
WaterCoil(CoilNum)%HeatExchType = CounterFlow
CASE DEFAULT
WaterCoil(CoilNum)%HeatExchType = CrossFlow
END SELECT
!A9; \field Name of Water Storage Tank for Condensate Collection
WaterCoil(CoilNum)%CondensateCollectName = AlphArray(9)
IF (lAlphaBlanks(9)) THEN
WaterCoil(CoilNum)%CondensateCollectMode = CondensateDiscarded
ELSE
WaterCoil(CoilNum)%CondensateCollectMode = CondensateToTank
CALL SetupTankSupplyComponent(WaterCoil(CoilNum)%Name, TRIM(CurrentModuleObject), &
WaterCoil(CoilNum)%CondensateCollectName, ErrorsFound, WaterCoil(CoilNum)%CondensateTankID, &
WaterCoil(CoilNum)%CondensateTankSupplyARRID )
ENDIF
CALL TestCompSet(TRIM(CurrentModuleObject),AlphArray(1),AlphArray(3),AlphArray(4),'Water Nodes')
CALL TestCompSet(TRIM(CurrentModuleObject),AlphArray(1),AlphArray(5),AlphArray(6),'Air Nodes')
! Setup Report variables for the Design input Cooling Coils
CALL SetupOutputVariable('Cooling Coil Total Cooling Energy [J]', &
WaterCoil(CoilNum)%TotWaterCoolingCoilEnergy, &
'System','Sum',WaterCoil(CoilNum)%Name, &
ResourceTypeKey='ENERGYTRANSFER',EndUseKey='COOLINGCOILS',GroupKey='System')
CALL SetupOutputVariable('Cooling Coil Source Side Heat Transfer Energy [J]', &
WaterCoil(CoilNum)%TotWaterCoolingCoilEnergy, &
'System','Sum',WaterCoil(CoilNum)%Name, &
ResourceTypeKey='PLANTLOOPCOOLINGDEMAND',EndUseKey='COOLINGCOILS',GroupKey='System')
CALL SetupOutputVariable('Cooling Coil Sensible Cooling Energy [J]',WaterCoil(CoilNum)%SenWaterCoolingCoilEnergy, &
'System','Sum',WaterCoil(CoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Total Cooling Rate [W]', WaterCoil(CoilNum)%TotWaterCoolingCoilRate, &
'System','Average',WaterCoil(CoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Sensible Cooling Rate [W]', WaterCoil(CoilNum)%SenWaterCoolingCoilRate, &
'System','Average',WaterCoil(CoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Wetted Area Fraction []', WaterCoil(CoilNum)%SurfAreaWetFraction, &
'System','Average',WaterCoil(CoilNum)%Name)
IF (WaterCoil(CoilNum)%CondensateCollectMode == CondensateToTank) THEN
CALL SetupOutputVariable('Cooling Coil Condensate Volume Flow Rate [m3/s]',WaterCoil(CoilNum)%CondensateVdot,&
'System','Average', WaterCoil(CoilNum)%Name)
CALL SetupOutputVariable('Cooling Coil Condensate Volume [m3]',WaterCoil(CoilNum)%CondensateVol,&
'System','Sum', WaterCoil(CoilNum)%Name, &
ResourceTypeKey='OnSiteWater', &
EndUseKey='Condensate', GroupKey='System')
ENDIF
END DO
IF (ErrorsFound) THEN
CALL ShowFatalError(RoutineName//'Errors found in getting input.')
ENDIF
DEALLOCATE(AlphArray)
DEALLOCATE(cAlphaFields)
DEALLOCATE(cNumericFields)
DEALLOCATE(NumArray)
DEALLOCATE(lAlphaBlanks)
DEALLOCATE(lNumericBlanks)
RETURN
END SUBROUTINE GetWaterCoilInput