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 GetWaterUseInput
! SUBROUTINE INFORMATION:
! AUTHOR Peter Graham Ellis
! DATE WRITTEN August 2006
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
!
! METHODOLOGY EMPLOYED:
! Standard EnergyPlus methodology.
! USE STATEMENTS:
USE InputProcessor, ONLY: GetObjectDefMaxArgs, GetNumObjectsFound, FindItemInList, GetObjectItem, VerifyName
USE DataIPShortCuts ! Data for field names, blank numerics
USE ScheduleManager, ONLY: GetScheduleIndex
USE NodeInputManager, ONLY: GetOnlySingleNode
USE BranchNodeConnections, ONLY: TestCompSet
USE DataLoopNode
USE DataHeatBalance
USE WaterManager, ONLY:SetupTankSupplyComponent,SetupTankDemandComponent
USE Psychrometrics, ONLY: RhoH2O
USE PlantUtilities, ONLY: RegisterPlantCompDesignFlow
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: Blank = ' '
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL :: ErrorsFound = .FALSE. ! Set to true if errors in input, fatal at end of routine
INTEGER :: IOStatus ! Used in GetObjectItem
LOGICAL :: IsBlank ! TRUE if the name is blank
LOGICAL :: IsNotOk ! TRUE if there was a problem with a list name
INTEGER :: NumAlphas ! Number of Alphas for each GetObjectItem call
INTEGER :: NumNumbers ! Number of Numbers for each GetObjectItem call
!unused1208 INTEGER :: NumArgs
INTEGER :: WaterEquipNum
INTEGER :: WaterConnNum
INTEGER :: AlphaNum
INTEGER :: thisWaterEquipNum
! FLOW:
cCurrentModuleObject = 'WaterUse:Equipment'
NumWaterEquipment = GetNumObjectsFound(cCurrentModuleObject)
IF (NumWaterEquipment > 0) THEN
ALLOCATE(WaterEquipment(NumWaterEquipment))
DO WaterEquipNum = 1, NumWaterEquipment
CALL GetObjectItem( cCurrentModuleObject, WaterEquipNum, cAlphaArgs, NumAlphas, rNumericArgs, NumNumbers, IOStatus, &
AlphaBlank=lAlphaFieldBlanks, AlphaFieldnames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(1), WaterEquipment%Name, WaterEquipNum-1, IsNotOK, IsBlank, TRIM(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound = .TRUE.
IF (IsBlank) cAlphaArgs(1) = 'xxxxx'
END IF
WaterEquipment(WaterEquipNum)%Name = cAlphaArgs(1)
WaterEquipment(WaterEquipNum)%EndUseSubcatName = cAlphaArgs(2)
WaterEquipment(WaterEquipNum)%PeakVolFlowRate = rNumericArgs(1)
IF ((NumAlphas > 2) .AND. ( .NOT. lAlphaFieldBlanks(3) )) THEN
WaterEquipment(WaterEquipNum)%FlowRateFracSchedule = GetScheduleIndex(cAlphaArgs(3))
! If no FlowRateFracSchedule, fraction defaults to 1.0
IF (WaterEquipment(WaterEquipNum)%FlowRateFracSchedule == 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(3))//'='//TRIM(cAlphaArgs(3)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
ErrorsFound = .TRUE.
END IF
END IF
IF ((NumAlphas > 3) .AND. (.NOT. lAlphaFieldBlanks(4))) THEN
WaterEquipment(WaterEquipNum)%TargetTempSchedule = GetScheduleIndex(cAlphaArgs(4))
IF (WaterEquipment(WaterEquipNum)%TargetTempSchedule == 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(4))//'='//TRIM(cAlphaArgs(4)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
ErrorsFound = .TRUE.
END IF
END IF
IF ((NumAlphas > 4) .AND. (.NOT. lAlphaFieldBlanks(5))) THEN
WaterEquipment(WaterEquipNum)%HotTempSchedule = GetScheduleIndex(cAlphaArgs(5))
! If no HotTempSchedule, there is no hot water.
! HotTempSchedule is ignored if connected to a plant loop via WATER USE CONNECTIONS
IF (WaterEquipment(WaterEquipNum)%HotTempSchedule == 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(5))//'='//TRIM(cAlphaArgs(5)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
ErrorsFound = .TRUE.
END IF
END IF
IF ((NumAlphas > 5) .AND. ( .NOT. lAlphaFieldBlanks(6))) THEN
WaterEquipment(WaterEquipNum)%ColdTempSchedule = GetScheduleIndex(cAlphaArgs(6))
! If no ColdTempSchedule, temperatures will be calculated by WATER MAINS TEMPERATURES object
IF (WaterEquipment(WaterEquipNum)%ColdTempSchedule == 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(6))//'='//TRIM(cAlphaArgs(6)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
ErrorsFound = .TRUE.
END IF
END IF
IF ((NumAlphas > 6) .AND. (.NOT. lAlphaFieldBlanks(7) )) THEN
WaterEquipment(WaterEquipNum)%Zone = FindItemInList(cAlphaArgs(7), Zone%Name, NumOfZones)
IF (WaterEquipment(WaterEquipNum)%Zone == 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(7))//'='//TRIM(cAlphaArgs(7)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
ErrorsFound = .TRUE.
END IF
END IF
IF ((NumAlphas > 7) .AND. (.NOT. lAlphaFieldBlanks(8) )) THEN
WaterEquipment(WaterEquipNum)%SensibleFracSchedule = GetScheduleIndex(cAlphaArgs(8))
IF (WaterEquipment(WaterEquipNum)%SensibleFracSchedule == 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(8))//'='//TRIM(cAlphaArgs(8)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
ErrorsFound = .TRUE.
END IF
END IF
IF ((NumAlphas > 8) .AND. (.NOT. lAlphaFieldBlanks(9) )) THEN
WaterEquipment(WaterEquipNum)%LatentFracSchedule = GetScheduleIndex(cAlphaArgs(9))
IF (WaterEquipment(WaterEquipNum)%LatentFracSchedule == 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(9))//'='//TRIM(cAlphaArgs(9)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
ErrorsFound = .TRUE.
END IF
END IF
END DO ! WaterEquipNum
IF (ErrorsFound) CALL ShowFatalError('Errors found in processing input for '//TRIM(cCurrentModuleObject))
END IF
cCurrentModuleObject = 'WaterUse:Connections'
NumWaterConnections = GetNumObjectsFound(cCurrentModuleObject)
IF (NumWaterConnections > 0) THEN
ALLOCATE(WaterConnections(NumWaterConnections))
DO WaterConnNum = 1, NumWaterConnections
CALL GetObjectItem(cCurrentModuleObject, WaterConnNum, cAlphaArgs, NumAlphas, rNumericArgs, NumNumbers, IOStatus, &
AlphaBlank=lAlphaFieldBlanks, AlphaFieldnames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(1), WaterConnections%Name, WaterConnNum-1, IsNotOK, IsBlank, TRIM(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound = .TRUE.
IF (IsBlank) cAlphaArgs(1) = 'xxxxx'
END IF
WaterConnections(WaterConnNum)%Name = cAlphaArgs(1)
IF ((.NOT. lAlphaFieldBlanks(2)) .OR. (.NOT. lAlphaFieldBlanks(3))) THEN
WaterConnections(WaterConnNum)%InletNode = GetOnlySingleNode(cAlphaArgs(2), ErrorsFound, TRIM(cCurrentModuleObject), &
cAlphaArgs(1), NodeType_Water, NodeConnectionType_Inlet, 1, ObjectIsNotParent)
WaterConnections(WaterConnNum)%OutletNode = GetOnlySingleNode(cAlphaArgs(3), ErrorsFound, TRIM(cCurrentModuleObject), &
cAlphaArgs(1), NodeType_Water,NodeConnectionType_Outlet, 1, ObjectIsNotParent)
! Check plant connections
CALL TestCompSet(TRIM(cCurrentModuleObject),cAlphaArgs(1), cAlphaArgs(2), cAlphaArgs(3), 'DHW Nodes')
ELSE
! If no plant nodes are connected, simulate in stand-alone mode.
WaterConnections(WaterConnNum)%StandAlone = .TRUE.
END IF
IF (.NOT. lAlphaFieldBlanks(4) ) THEN
CALL SetupTankDemandComponent(WaterConnections(WaterConnNum)%Name, TRIM(cCurrentModuleObject), cAlphaArgs(4), ErrorsFound, &
WaterConnections(WaterConnNum)%SupplyTankNum, WaterConnections(WaterConnNum)%TankDemandID)
END IF
IF (.NOT. lAlphaFieldBlanks(5) ) THEN
CALL SetupTankSupplyComponent(WaterConnections(WaterConnNum)%Name, TRIM(cCurrentModuleObject), cAlphaArgs(5), ErrorsFound, &
WaterConnections(WaterConnNum)%RecoveryTankNum, WaterConnections(WaterConnNum)%TankSupplyID)
END IF
IF (.NOT. lAlphaFieldBlanks(6) ) THEN
WaterConnections(WaterConnNum)%HotTempSchedule = GetScheduleIndex(cAlphaArgs(6))
! If no HotTempSchedule, there is no hot water.
! HotTempSchedule is ignored if connected to a plant loop via WATER USE CONNECTIONS
IF (WaterConnections(WaterConnNum)%HotTempSchedule == 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(6))//'='//TRIM(cAlphaArgs(6)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
ErrorsFound = .TRUE.
END IF
END IF
IF (.NOT. lAlphaFieldBlanks(7) ) THEN
WaterConnections(WaterConnNum)%ColdTempSchedule = GetScheduleIndex(cAlphaArgs(7))
! If no ColdTempSchedule, temperatures will be calculated by WATER MAINS TEMPERATURES object
IF (WaterConnections(WaterConnNum)%ColdTempSchedule == 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(7))//'='//TRIM(cAlphaArgs(7)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
ErrorsFound = .TRUE.
END IF
END IF
IF ((.NOT. lAlphaFieldBlanks(8) ) .AND. (cAlphaArgs(8) /= 'NONE')) THEN
WaterConnections(WaterConnNum)%HeatRecovery = .TRUE.
SELECT CASE (cAlphaArgs(8))
CASE ('IDEAL')
WaterConnections(WaterConnNum)%HeatRecoveryHX = HeatRecoveryHXIdeal
CASE ('COUNTERFLOW')
WaterConnections(WaterConnNum)%HeatRecoveryHX = HeatRecoveryHXCounterFlow
CASE ('CROSSFLOW')
WaterConnections(WaterConnNum)%HeatRecoveryHX = HeatRecoveryHXCrossFlow
CASE DEFAULT
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(8))//'='//TRIM(cAlphaArgs(8)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
ErrorsFound = .TRUE.
END SELECT
SELECT CASE (cAlphaArgs(9))
CASE ('PLANT')
WaterConnections(WaterConnNum)%HeatRecoveryConfig = HeatRecoveryConfigPlant
CASE ('EQUIPMENT')
WaterConnections(WaterConnNum)%HeatRecoveryConfig = HeatRecoveryConfigEquipment
CASE ('PLANTANDEQUIPMENT')
WaterConnections(WaterConnNum)%HeatRecoveryConfig = HeatRecoveryConfigPlantAndEquip
CASE DEFAULT
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(9))//'='//TRIM(cAlphaArgs(9)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
ErrorsFound = .TRUE.
END SELECT
END IF
WaterConnections(WaterConnNum)%HXUA = rNumericArgs(1)
ALLOCATE(WaterConnections(WaterConnNum)%WaterEquipment(NumAlphas - 9))
DO AlphaNum = 10, NumAlphas
WaterEquipNum = FindItemInList(cAlphaArgs(AlphaNum), WaterEquipment%Name, NumWaterEquipment)
IF (WaterEquipNum == 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(AlphaNum))//'='//TRIM(cAlphaArgs(AlphaNum)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
ErrorsFound = .TRUE.
ELSE
IF (WaterEquipment(WaterEquipNum)%Connections > 0) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//' = '//TRIM(cAlphaArgs(1))// &
': WaterUse:Equipment = '//TRIM(cAlphaArgs(AlphaNum))//' is already referenced by another object.')
ErrorsFound = .TRUE.
ELSE
WaterEquipment(WaterEquipNum)%Connections = WaterConnNum
WaterConnections(WaterConnNum)%NumWaterEquipment = WaterConnections(WaterConnNum)%NumWaterEquipment + 1
WaterConnections(WaterConnNum)%WaterEquipment(WaterConnections(WaterConnNum)%NumWaterEquipment) = WaterEquipNum
WaterConnections(WaterConnNum)%PeakVolFlowRate = WaterConnections(WaterConnNum)%PeakVolFlowRate &
+ WaterEquipment(WaterEquipNum)%PeakVolFlowRate ! this does not include possible multipliers
END IF
END IF
END DO
END DO ! WaterConnNum
IF (ErrorsFound) CALL ShowFatalError('Errors found in processing input for '//TRIM(cCurrentModuleObject))
IF (NumWaterConnections > 0) THEN
ALLOCATE(CheckEquipName(NumWaterConnections) )
ALLOCATE(CheckPlantLoop(NumWaterConnections) )
CheckEquipName = .TRUE.
CheckPlantLoop = .TRUE.
ENDIF
END IF
! determine connection's peak mass flow rates.
IF (NumWaterConnections > 0) THEN
DO WaterConnNum = 1, NumWaterConnections
WaterConnections(WaterConnNum)%PeakMassFlowRate = 0.0D0
Do WaterEquipNum = 1, WaterConnections(WaterConnNum)%NumWaterEquipment
thisWaterEquipNum = WaterConnections(WaterConnNum)%WaterEquipment(WaterEquipNum)
IF (WaterEquipment(thisWaterEquipNum)%zone > 0) then
WaterConnections(WaterConnNum)%PeakMassFlowRate = WaterConnections(WaterConnNum)%PeakMassFlowRate &
+ WaterEquipment(thisWaterEquipNum)%PeakVolFlowRate * RhoH2O(InitConvTemp) &
* Zone(WaterEquipment(thisWaterEquipNum)%zone)%Multiplier &
* Zone(WaterEquipment(thisWaterEquipNum)%zone)%ListMultiplier
ELSE ! can't have multipliers
WaterConnections(WaterConnNum)%PeakMassFlowRate = WaterConnections(WaterConnNum)%PeakMassFlowRate &
+ WaterEquipment(thisWaterEquipNum)%PeakVolFlowRate * RhoH2O(InitConvTemp)
ENDIF
ENDDO
CALL RegisterPlantCompDesignFlow(WaterConnections(WaterConnNum)%InletNode, &
WaterConnections(WaterConnNum)%PeakMassFlowRate/RhoH2O(InitConvTemp) )
ENDDO
ENDIF
! Setup EQUIPMENT report variables (now that connections have been established)
! CurrentModuleObject='WaterUse:Equipment'
DO WaterEquipNum = 1, NumWaterEquipment
CALL SetupOutputVariable('Water Use Equipment Hot Water Mass Flow Rate [kg/s]', &
WaterEquipment(WaterEquipNum)%HotMassFlowRate, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Cold Water Mass Flow Rate [kg/s]', &
WaterEquipment(WaterEquipNum)%ColdMassFlowRate, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Total Mass Flow Rate [kg/s]', &
WaterEquipment(WaterEquipNum)%TotalMassFlowRate, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Hot Water Volume Flow Rate [m3/s]', &
WaterEquipment(WaterEquipNum)%HotVolFlowRate, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Cold Water Volume Flow Rate [m3/s]', &
WaterEquipment(WaterEquipNum)%ColdVolFlowRate, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Total Volume Flow Rate [m3/s]', &
WaterEquipment(WaterEquipNum)%TotalVolFlowRate, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Hot Water Volume [m3]', &
WaterEquipment(WaterEquipNum)%HotVolume, 'System', 'Sum', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Cold Water Volume [m3]', &
WaterEquipment(WaterEquipNum)%ColdVolume, 'System', 'Sum', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Total Volume [m3]', &
WaterEquipment(WaterEquipNum)%TotalVolume, 'System', 'Sum', WaterEquipment(WaterEquipNum)%Name, &
ResourceTypeKey='Water', EndUseKey='WATERSYSTEMS', EndUseSubKey=WaterEquipment(WaterEquipNum)%EndUseSubcatName, &
GroupKey='Plant')
CALL SetupOutputVariable('Water Use Equipment Mains Water Volume [m3]', &
WaterEquipment(WaterEquipNum)%TotalVolume, 'System', 'Sum', WaterEquipment(WaterEquipNum)%Name, &
ResourceTypeKey='MainsWater', EndUseKey='WATERSYSTEMS', EndUseSubKey=WaterEquipment(WaterEquipNum)%EndUseSubcatName, &
GroupKey='Plant')
CALL SetupOutputVariable('Water Use Equipment Hot Water Temperature [C]', &
WaterEquipment(WaterEquipNum)%HotTemp, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Cold Water Temperature [C]', &
WaterEquipment(WaterEquipNum)%ColdTemp, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Target Water Temperature [C]', &
WaterEquipment(WaterEquipNum)%TargetTemp, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Mixed Water Temperature [C]', &
WaterEquipment(WaterEquipNum)%MixedTemp, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Drain Water Temperature [C]', &
WaterEquipment(WaterEquipNum)%DrainTemp, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Heating Rate [W]', &
WaterEquipment(WaterEquipNum)%Power, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
IF (WaterEquipment(WaterEquipNum)%Connections == 0) THEN
CALL SetupOutputVariable('Water Use Equipment Heating Energy [J]', &
WaterEquipment(WaterEquipNum)%Energy, 'System', 'Sum', WaterEquipment(WaterEquipNum)%Name, &
ResourceTypeKey='DISTRICTHEATING', EndUseKey='WATERSYSTEMS', &
EndUseSubKey=WaterEquipment(WaterEquipNum)%EndUseSubcatName, GroupKey='Plant')
ELSE IF (WaterConnections(WaterEquipment(WaterEquipNum)%Connections)%StandAlone) THEN
CALL SetupOutputVariable('Water Use Equipment Heating Energy [J]', &
WaterEquipment(WaterEquipNum)%Energy, 'System', 'Sum', WaterEquipment(WaterEquipNum)%Name, &
ResourceTypeKey='DISTRICTHEATING', EndUseKey='WATERSYSTEMS', &
EndUseSubKey=WaterEquipment(WaterEquipNum)%EndUseSubcatName, GroupKey='Plant')
ELSE ! The EQUIPMENT is coupled to a plant loop via a CONNECTIONS object
CALL SetupOutputVariable('Water Use Equipment Heating Energy [J]', &
WaterEquipment(WaterEquipNum)%Energy, 'System', 'Sum', WaterEquipment(WaterEquipNum)%Name, &
ResourceTypeKey='ENERGYTRANSFER', EndUseKey='WATERSYSTEMS', &
EndUseSubKey=WaterEquipment(WaterEquipNum)%EndUseSubcatName, GroupKey='Plant')
END IF
IF (WaterEquipment(WaterEquipNum)%Zone > 0) THEN
CALL SetupOutputVariable('Water Use Equipment Zone Sensible Heat Gain Rate [W]', &
WaterEquipment(WaterEquipNum)%SensibleRate, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Zone Sensible Heat Gain Energy [J]', &
WaterEquipment(WaterEquipNum)%SensibleEnergy, 'System', 'Sum', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Zone Latent Gain Rate [W]', &
WaterEquipment(WaterEquipNum)%LatentRate, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Zone Latent Gain Energy [J]', &
WaterEquipment(WaterEquipNum)%LatentEnergy, 'System', 'Sum', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Zone Moisture Gain Mass Flow Rate [kg/s]', &
WaterEquipment(WaterEquipNum)%MoistureRate, 'System', 'Average', WaterEquipment(WaterEquipNum)%Name)
CALL SetupOutputVariable('Water Use Equipment Zone Moisture Gain Mass [kg]', &
WaterEquipment(WaterEquipNum)%MoistureMass, 'System', 'Sum', WaterEquipment(WaterEquipNum)%Name)
CALL SetupZoneInternalGain(WaterEquipment(WaterEquipNum)%Zone, &
'WaterUse:Equipment', &
WaterEquipment(WaterEquipNum)%Name, &
IntGainTypeOf_WaterUseEquipment, &
ConvectionGainRate = WaterEquipment(WaterEquipNum)%SensibleRateNoMultiplier, &
LatentGainRate = WaterEquipment(WaterEquipNum)%LatentRateNoMultiplier)
END IF
END DO ! WaterEquipNum
! Setup CONNECTIONS report variables (don't put any on meters; they are metered at WATER USE EQUIPMENT level)
! CurrentModuleObject='WaterUse:Connections'
DO WaterConnNum = 1, NumWaterConnections
CALL SetupOutputVariable('Water Use Connections Hot Water Mass Flow Rate [kg/s]', &
WaterConnections(WaterConnNum)%HotMassFlowRate, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Cold Water Mass Flow Rate [kg/s]', &
WaterConnections(WaterConnNum)%ColdMassFlowRate, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Total Mass Flow Rate [kg/s]', &
WaterConnections(WaterConnNum)%TotalMassFlowRate, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Drain Water Mass Flow Rate [kg/s]', &
WaterConnections(WaterConnNum)%DrainMassFlowRate, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Heat Recovery Mass Flow Rate [kg/s]', &
WaterConnections(WaterConnNum)%RecoveryMassFlowRate, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Hot Water Volume Flow Rate [m3/s]', &
WaterConnections(WaterConnNum)%HotVolFlowRate, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Cold Water Volume Flow Rate [m3/s]', &
WaterConnections(WaterConnNum)%ColdVolFlowRate, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Total Volume Flow Rate [m3/s]', &
WaterConnections(WaterConnNum)%TotalVolFlowRate, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Hot Water Volume [m3]', &
WaterConnections(WaterConnNum)%HotVolume, 'System', 'Sum', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Cold Water Volume [m3]', &
WaterConnections(WaterConnNum)%ColdVolume, 'System', 'Sum', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Total Volume [m3]', &
WaterConnections(WaterConnNum)%TotalVolume, 'System', 'Sum', WaterConnections(WaterConnNum)%Name) !, &
! ResourceTypeKey='Water', EndUseKey='DHW', EndUseSubKey=EndUseSubcategoryName, GroupKey='Plant')
! tHIS WAS double counting
CALL SetupOutputVariable('Water Use Connections Hot Water Temperature [C]', &
WaterConnections(WaterConnNum)%HotTemp, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Cold Water Temperature [C]', &
WaterConnections(WaterConnNum)%ColdTemp, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Drain Water Temperature [C]', &
WaterConnections(WaterConnNum)%DrainTemp, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Return Water Temperature [C]', &
WaterConnections(WaterConnNum)%ReturnTemp, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Waste Water Temperature [C]', &
WaterConnections(WaterConnNum)%WasteTemp, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Heat Recovery Water Temperature [C]', &
WaterConnections(WaterConnNum)%RecoveryTemp, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Heat Recovery Effectiveness []', &
WaterConnections(WaterConnNum)%Effectiveness, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Heat Recovery Rate [W]', &
WaterConnections(WaterConnNum)%RecoveryRate, 'System', 'Average', WaterConnections(WaterConnNum)%Name)
CALL SetupOutputVariable('Water Use Connections Heat Recovery Energy [J]', &
WaterConnections(WaterConnNum)%RecoveryEnergy, 'System', 'Sum', WaterConnections(WaterConnNum)%Name)
! Does this go on a meter?
! To do: Add report variable for starved flow when tank can't deliver?
IF (.NOT. WaterConnections(WaterConnNum)%StandAlone) THEN
CALL SetupOutputVariable('Water Use Connections Plant Hot Water Energy [J]', &
WaterConnections(WaterConnNum)%Energy, 'System', 'Sum', WaterConnections(WaterConnNum)%Name, &
ResourceTypeKey='PLANTLOOPHEATINGDEMAND', EndUseKey='WATERSYSTEMS', GroupKey='Plant')
END IF
END DO ! WaterConnNum
RETURN
END SUBROUTINE GetWaterUseInput