SUBROUTINE GetPlantInput
! SUBROUTINE INFORMATION:
! AUTHOR Sankaranarayanan K P
! DATE WRITTEN April 2005
! MODIFIED
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine gets input either through the Plant Loop derived type
! or by calls out to the branch manager to obtain data. By the end of
! the routine the module level derived type Loop should be fully allocated
! and fully populated.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor
USE NodeInputManager
USE BranchInputManager
USE Pipes, ONLY: InitializePipes
USE PipeHeatTransfer, ONLY: InitializeHeatTransferPipes
USE DataGlobals, ONLY: outputfiledebug
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: NumHalfLoops
INTEGER :: LoopNum ! DO loop counter for loops
INTEGER :: HalfLoopNum
INTEGER :: NumOfPipesinLoop
INTEGER :: SysPipeNum
INTEGER :: LoopSideNum
INTEGER :: BranchNum ! DO loop counter for branches
INTEGER :: CompNum ! DO loop counter for components
INTEGER :: NodeNum ! DO loop counter for nodes
INTEGER :: PipeNum ! Counter for pipes
INTEGER :: Outlet
INTEGER :: Inlet
INTEGER :: NumParams
INTEGER :: NumAlphas
INTEGER :: NumNumbers
INTEGER :: SplitNum
INTEGER :: MixNum
INTEGER :: NumConnectorsInLoop
INTEGER :: ConnNum
INTEGER :: Pos
INTEGER :: TotCompsOnBranch
INTEGER :: MaxNumAlphas
INTEGER :: MaxNumNumbers
LOGICAL :: SplitInBranch
LOGICAL :: MixerOutBranch
LOGICAL :: ErrorsFound=.false.
LOGICAL :: DemandSideHasPump
LOGICAL :: ASeriesBranchHasPump
LOGICAL :: AParallelBranchHasPump
CHARACTER(len=16) :: LoopIdentifier
CHARACTER(len=MaxNameLength),ALLOCATABLE,SAVE,DIMENSION(:) :: BranchNames ! Branch names from GetBranchList call
CHARACTER(len=MaxNameLength),ALLOCATABLE,SAVE,DIMENSION(:) :: CompTypes ! Branch names from GetBranchList call
CHARACTER(len=MaxNameLength),ALLOCATABLE,SAVE,DIMENSION(:) :: CompNames ! Branch names from GetBranchList call
INTEGER,ALLOCATABLE,SAVE,DIMENSION(:) :: CompCtrls ! Branch names from GetBranchList call
CHARACTER(len=MaxNameLength),ALLOCATABLE,SAVE,DIMENSION(:) :: InletNodeNames ! Node names from GetBranchData call
CHARACTER(len=MaxNameLength),ALLOCATABLE,SAVE,DIMENSION(:) :: OutletNodeNames ! Node names from GetBranchData call
INTEGER,ALLOCATABLE,SAVE,DIMENSION(:) :: InletNodeNumbers ! Node numbers from GetBranchData call
INTEGER,ALLOCATABLE,SAVE,DIMENSION(:) :: OutletNodeNumbers ! Node numbers from GetBranchData call
LOGICAL,ALLOCATABLE,SAVE,DIMENSION(:) :: SplitOutBranch
LOGICAL,ALLOCATABLE,SAVE,DIMENSION(:) :: MixerInBranch
LOGICAL errflag
INTEGER GeneralEquipType
INTEGER TypeOfNum
INTEGER LoopNuminArray
CALL GetObjectDefMaxArgs('Connector:Splitter',NumParams,NumAlphas,NumNumbers)
MaxNumAlphas=NumAlphas
MaxNumNumbers=NumNumbers
CALL GetObjectDefMaxArgs('Connector:Mixer',NumParams,NumAlphas,NumNumbers)
MaxNumAlphas=MAX(MaxNumAlphas,NumAlphas)
MaxNumNumbers=MAX(MaxNumNumbers,NumNumbers)
! FLOW:
! TotNumLoops = NumPlantLoops + NumCondLoops !Needed when including condenser.
NumHalfLoops = 2*TotNumLoops !Will be NumLoops when condenser added
NumPipes = 0
NumPlantPipes = 0
NumCondPipes = 0
ALLOCATE (LoopPipe(NumHalfLoops))
HalfLoopNum = 0
SysPipeNum=0
DO LoopNum = 1, TotNumLoops ! Begin demand side loops ... When condenser is added becomes NumLoops
DemandSideHasPump = .FALSE.
TempLoop%LoopHasConnectionComp = .FALSE.
TempLoop%Name=PlantLoop(LoopNum)%Name
DO LoopSideNum = DemandSide, SupplySide
ASeriesBranchHasPump = .FALSE.
AParallelBranchHasPump = .FALSE.
NumOfPipesinLoop = 0 ! Initialization
HalfLoopNum = HalfLoopNum + 1
TempLoop%ByPassExists = .FALSE.
IF(PlantLoop(LoopNum)%TypeofLoop == Plant .AND. LoopSideNum == DemandSide) THEN
LoopIdentifier = 'Plant Demand'
ELSE IF(PlantLoop(LoopNum)%TypeofLoop == Plant .AND. LoopSideNum == SupplySide) THEN
LoopIdentifier = 'Plant Supply'
ELSE IF(PlantLoop(LoopNum)%TypeofLoop == Condenser .AND. LoopSideNum == DemandSide) THEN
LoopIdentifier = 'Condenser Demand'
ELSE IF(PlantLoop(LoopNum)%TypeofLoop == Condenser .AND. LoopSideNum == SupplySide) THEN
LoopIdentifier = 'Condenser Supply'
END IF
TempLoop%BranchList = PlantLoop(LoopNum)%LoopSide(LoopSideNum)%BranchList
TempLoop%ConnectList = PlantLoop(LoopNum)%LoopSide(LoopSideNum)%ConnectList
! Get the branch list and size the Branch portion of the Loop derived type
TempLoop%TotalBranches=NumBranchesInBranchList(TempLoop%BranchList)
ALLOCATE(BranchNames(TempLoop%TotalBranches))
BranchNames=' '
CALL GetBranchList(TempLoop%Name,TempLoop%BranchList, &
TempLoop%TotalBranches,BranchNames,TRIM(LoopIdentifier))
ALLOCATE (TempLoop%Branch(TempLoop%TotalBranches))
! Cycle through all of the branches and set up the node data
DO BranchNum = 1, TempLoop%TotalBranches
TempLoop%Branch(BranchNum)%Name = BranchNames(BranchNum)
TempLoop%Branch(BranchNum)%TotalComponents=NumCompsInBranch(BranchNames(BranchNum))
TempLoop%Branch(BranchNum)%IsByPass = .FALSE.
ALLOCATE(CompTypes(TempLoop%Branch(BranchNum)%TotalComponents))
CompTypes=' '
ALLOCATE(CompNames(TempLoop%Branch(BranchNum)%TotalComponents))
CompNames=' '
ALLOCATE(CompCtrls(TempLoop%Branch(BranchNum)%TotalComponents))
CompCtrls=0
ALLOCATE(InletNodeNames(TempLoop%Branch(BranchNum)%TotalComponents))
InletNodeNames=' '
ALLOCATE(InletNodeNumbers(TempLoop%Branch(BranchNum)%TotalComponents))
InletNodeNumbers=0
ALLOCATE(OutletNodeNames(TempLoop%Branch(BranchNum)%TotalComponents))
OutletNodeNames=' '
ALLOCATE(OutletNodeNumbers(TempLoop%Branch(BranchNum)%TotalComponents))
OutletNodeNumbers=0
CALL GetBranchData(TempLoop%Name,BranchNames(BranchNum), &
TempLoop%Branch(BranchNum)%MaxVolFlowRate, & ! Why is this Vdot and not mdot?
TempLoop%Branch(BranchNum)%PressureCurveType, &
TempLoop%Branch(BranchNum)%PressureCurveIndex, &
TempLoop%Branch(BranchNum)%TotalComponents, &
CompTypes,CompNames, &
InletNodeNames,InletNodeNumbers, &
OutletNodeNames,OutletNodeNumbers,ErrorsFound)
ALLOCATE (TempLoop%Branch(BranchNum)%Comp(TempLoop%Branch(BranchNum)%TotalComponents))
DO CompNum = 1, TempLoop%Branch(BranchNum)%TotalComponents
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType =UnknownStatusOpSchemeType
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf = CompTypes(CompNum)
IF (SameString(CompTypes(CompNum),'Pipe:Adiabatic')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num = TypeOf_Pipe
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Pipe
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = NoControlOpSchemeType
ELSE IF (SameString(CompTypes(CompNum),'Pipe:Adiabatic:Steam')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num = TypeOf_PipeSteam
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Pipe
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = NoControlOpSchemeType
ELSE IF (SameString(CompTypes(CompNum),'Pipe:Outdoor')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num = TypeOf_PipeExterior
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Pipe
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = NoControlOpSchemeType
ELSE IF (SameString(CompTypes(CompNum),'Pipe:Indoor')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num = TypeOf_PipeInterior
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Pipe
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = NoControlOpSchemeType
ELSE IF (SameString(CompTypes(CompNum),'Pipe:Underground')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num = TypeOf_PipeUnderground
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Pipe
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = NoControlOpSchemeType
ELSE IF (SameString(CompTypes(CompNum),'PipingSystem:Underground:PipeCircuit')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num = TypeOf_PipingSystemPipeCircuit
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Pipe
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = NoControlOpSchemeType
ELSEIF (SameString(CompTypes(CompNum)(1:4),'Pump') .or. SameString(CompTypes(CompNum)(1:13),'HeaderedPumps') ) THEN
IF (SameString(CompTypes(CompNum)(1:18),'Pump:VariableSpeed')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num = TypeOf_PumpVariableSpeed
ELSE IF (SameString(CompTypes(CompNum)(1:18),'Pump:ConstantSpeed')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num = TypeOf_PumpConstantSpeed
ELSE IF (SameString(CompTypes(CompNum)(1:29),'Pump:VariableSpeed:Condensate')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num = TypeOf_PumpCondensate
ELSE IF (SameString(CompTypes(CompNum)(1:27),'HeaderedPumps:ConstantSpeed')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num = TypeOf_PumpBankConstantSpeed
ELSE IF (SameString(CompTypes(CompNum)(1:27),'HeaderedPumps:VariableSpeed')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num = TypeOf_PumpBankVariableSpeed
ELSE
!discover unsupported equipment on branches.
CALL ShowSevereError('GetPlantInput: trying to process a pump type that is not supported, dev note')
CALL ShowContinueError('Component Type ='//TRIM(CompTypes(CompNum)) )
END IF
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Pump
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = PumpOpSchemeType
IF(LoopSideNum == DemandSide) DemandSideHasPump = .TRUE.
IF(BranchNum==1 .OR. BranchNum==TempLoop%TotalBranches)THEN
ASeriesBranchHasPump = .TRUE.
ELSE
AParallelBranchHasPump = .TRUE.
END IF
CALL StoreAPumpOnCurrentTempLoop(LoopNum, LoopSideNum, BranchNum, CompNum, CompNames(CompNum), &
OutletNodeNumbers(CompNum), AParallelBranchHasPump)
ELSEIF (SameString(CompTypes(CompNum),'WaterHeater:Mixed')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_WtrHeaterMixed
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_WaterThermalTank
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum),'WaterHeater:Stratified')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_WtrHeaterStratified
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_WaterThermalTank
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum),'ChillerHeater:Absorption:Directfired')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Chiller_DFAbsorption
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Chiller
ELSEIF (SameString(CompTypes(CompNum),'ChillerHeater:Absorption:DoubleEffect')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Chiller_ExhFiredAbsorption
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Chiller
ELSEIF (SameString(CompTypes(CompNum),'ThermalStorage:ChilledWater:Mixed')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_ChilledWaterTankMixed
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_ThermalStorage
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum),'ThermalStorage:ChilledWater:Stratified')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_ChilledWaterTankStratified
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_ThermalStorage
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum),'WaterUse:Connections')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_WaterUseConnection
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_WaterUse
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum),'Coil:Cooling:Water')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CoilWaterCooling
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_DemandCoil
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum),'Coil:Cooling:Water:DetailedGeometry')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CoilWaterDetailedFlatCooling
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_DemandCoil
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum),'Coil:Heating:Water')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CoilWaterSimpleHeating
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_DemandCoil
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum),'Coil:Heating:Steam')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CoilSteamAirHeating
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_DemandCoil
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum),'SolarCollector:FlatPlate:Water')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_SolarCollectorFlatPlate
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_SolarCollector
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UncontrolledOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum),'SolarCollector:IntegralCollectorStorage')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_SolarCollectorICS
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_SolarCollector
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UncontrolledOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum),'LoadProfile:Plant')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_PlantLoadProfile
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_LoadProfile
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'GroundHeatExchanger:Vertical') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_GrndHtExchgVertical
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_GroundHeatExchanger
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UncontrolledOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'GroundHeatExchanger:Surface') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_GrndHtExchgSurface
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_GroundHeatExchanger
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UncontrolledOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'GroundHeatExchanger:Pond') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_GrndHtExchgPond
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_GroundHeatExchanger
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UncontrolledOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Chiller:Electric:EIR') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Chiller_ElectricEIR
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Chiller
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'Chiller:Electric:ReformulatedEIR') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Chiller_ElectricReformEIR
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Chiller
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'Chiller:Electric') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Chiller_Electric
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Chiller
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'Chiller:EngineDriven') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Chiller_EngineDriven
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Chiller
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'Chiller:CombustionTurbine') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Chiller_CombTurbine
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Chiller
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'Chiller:ConstantCOP') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Chiller_ConstCOP
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Chiller
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'Boiler:HotWater') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Boiler_Simple
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Boiler
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Boiler:Steam') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Boiler_Steam
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Boiler
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Chiller:Absorption:Indirect') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Chiller_Indirect_Absorption
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Chiller
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'Chiller:Absorption') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Chiller_Absorption
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Chiller
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'CoolingTower:SingleSpeed') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CoolingTower_SingleSpd
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_CoolingTower
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'CoolingTower:TwoSpeed') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CoolingTower_TwoSpd
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_CoolingTower
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'CoolingTower:VariableSpeed') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CoolingTower_VarSpd
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_CoolingTower
ELSEIF (SameString(CompTypes(CompNum), 'CoolingTower:VariableSpeed:Merkel') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CoolingTower_VarSpdMerkel
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_CoolingTower
ELSEIF (SameString(CompTypes(CompNum), 'Generator:FuelCell:ExhaustGasToWaterHeatExchanger') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Generator_FCExhaust
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Generator
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'WaterHeater:HeatPump') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_HeatPumpWtrHeater
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_WaterThermalTank
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'HeatPump:WatertoWater:EquationFit:Cooling') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_HPWaterEFCooling
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_HeatPump
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'HeatPump:WatertoWater:EquationFit:Heating') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_HPWaterEFHeating
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_HeatPump
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'HeatPump:WaterToWater:ParameterEstimation:Heating') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_HPWaterPEHeating
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_HeatPump
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'HeatPump:WaterToWater:ParameterEstimation:Cooling') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_HPWaterPECooling
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_HeatPump
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'AirConditioner:VariableRefrigerantFlow') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_HeatPumpVRF
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_HeatPump
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'DistrictCooling') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_PurchChilledWater
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Purchased
ELSEIF (SameString(CompTypes(CompNum), 'DistrictHeating') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_PurchHotWater
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Purchased
ELSEIF (SameString(CompTypes(CompNum), 'ThermalStorage:Ice:Simple') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_TS_IceSimple
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_ThermalStorage
ELSEIF (SameString(CompTypes(CompNum), 'ThermalStorage:Ice:Detailed') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_TS_IceDetailed
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_ThermalStorage
ELSEIF (SameString(CompTypes(CompNum), 'TemperingValve') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_ValveTempering
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Valve
ELSEIF (SameString(CompTypes(CompNum), 'HeatExchanger:FluidToFluid') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_FluidToFluidPlantHtExchg
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_HeatExchanger
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = FreeRejectionOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'Generator:MicroTurbine') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Generator_MicroTurbine
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Generator
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Generator:InternalCombustionEngine') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Generator_ICEngine
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Generator
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Generator:CombustionTurbine') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Generator_CTurbine
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Generator
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Generator:MicroCHP') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Generator_MicroCHP
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Generator
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Generator:FuelCell:StackCooler') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Generator_FCStackCooler
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Generator
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Fluidcooler:SingleSpeed') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_FluidCooler_SingleSpd
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_FluidCooler
ELSEIF (SameString(CompTypes(CompNum), 'Fluidcooler:TwoSpeed') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_FluidCooler_TwoSpd
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_FluidCooler
ELSEIF (SameString(CompTypes(CompNum), 'EvaporativeFluidcooler:SingleSpeed') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_EvapFluidCooler_SingleSpd
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_EvapFluidCooler
ELSEIF (SameString(CompTypes(CompNum), 'EvaporativeFluidcooler:TwoSpeed') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_EvapFluidCooler_TwoSpd
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_EvapFluidCooler
ELSEIF (SameString(CompTypes(CompNum), 'SolarCollector:FlatPlate:PhotovoltaicThermal') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_PVTSolarCollectorFlatPlate
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_SolarCollector
IF (LoopSideNum == DemandSide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (LoopSideNum == SupplySide) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ENDIF
ELSEIF (SameString(CompTypes(CompNum), 'CentralHeatPumpSystem') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CentralGroundSourceHeatPump
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_CentralHeatPumpSystem
!now deal with demand components of the ZoneHVAC type served by ControlCompOutput
ELSEIF (SameString(CompTypes(CompNum), 'ZoneHVAC:Baseboard:RadiantConvective:Water') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Baseboard_Rad_Conv_Water
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_ZoneHVACDemand
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'ZoneHVAC:Baseboard:Convective:Water') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Baseboard_Conv_Water
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_ZoneHVACDemand
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'ZoneHVAC:Baseboard:RadiantConvective:Steam') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_Baseboard_Rad_Conv_Steam
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_ZoneHVACDemand
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'ZoneHVAC:LowTemperatureRadiant:VariableFlow') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_LowTempRadiant_VarFlow
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_ZoneHVACDemand
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'ZoneHVAC:LowTemperatureRadiant:ConstantFlow') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_LowTempRadiant_ConstFlow
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_ZoneHVACDemand
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'AirTerminal:SingleDuct:ConstantVolume:CooledBeam') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CooledBeamAirTerminal
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_ZoneHVACDemand
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_MultiSpeedHeatPumpRecovery
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_ZoneHVACDemand
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'AirLoopHVAC:UnitarySystem') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_UnitarySystemRecovery
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_ZoneHVACDemand
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Coil:Heating:WaterToAirHeatPump:EquationFit') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CoilWAHPHeatingEquationFit
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_DemandCoil
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Coil:Cooling:WaterToAirHeatPump:EquationFit') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CoilWAHPCoolingEquationFit
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_DemandCoil
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CoilVSWAHPHeatingEquationFit
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_DemandCoil
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CoilVSWAHPCoolingEquationFit
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_DemandCoil
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Coil:Heating:WaterToAirHeatPump:ParameterEstimation') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CoilWAHPHeatingParamEst
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_DemandCoil
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Coil:Cooling:WaterToAirHeatPump:ParameterEstimation') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_CoilWAHPCoolingParamEst
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_DemandCoil
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Refrigeration:Condenser:WaterCooled') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_RefrigSystemWaterCondenser
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Refrigeration
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Refrigeration:CompressorRack') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_RefrigerationWaterCoolRack
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Refrigeration
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'PlantComponent:UserDefined') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = Typeof_PlantComponentUserDefined
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_PlantComponent
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'Coil:UserDefined') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = Typeof_CoilUserDefined
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_PlantComponent
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'ZoneHVAC:ForcedAir:UserDefined') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_ZoneHVACAirUserDefined
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_PlantComponent
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'AirTerminal:SingleDuct:UserDefined') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_AirTerminalUserDefined
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_PlantComponent
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UnknownStatusOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'PlantComponent:TemperatureSource')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_WaterSource
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_PlantComponent
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = UncontrolledOpSchemeType
ELSEIF (SameString(CompTypes(CompNum), 'GroundHeatExchanger:HorizontalTrench') ) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num = TypeOf_GrndHtExchgHorizTrench
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_Pipe
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = TypeOf_GrndHtExchgHorizTrench
ELSEIF (SameString(CompTypes(CompNum),'Coil:Cooling:DX:SingleSpeed:ThermalStorage')) THEN
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_num = TypeOf_PackagedTESCoolingCoil
TempLoop%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GenEquipTypes_DemandCoil
TempLoop%Branch(BranchNum)%Comp(CompNum)%CurOpSchemeType = DemandOpSchemeType
ELSE
!discover unsupported equipment on branches.
CALL ShowSevereError('GetPlantInput: Branch="'//trim(BranchNames(BranchNum))//'", invalid component on branch.')
CALL ShowContinueError('...invalid component type="'//trim(CompTypes(CompNum))// &
'", name="'//trim(CompNames(CompNum))//'".')
! ErrorsFound=.true.
ENDIF
TempLoop%Branch(BranchNum)%Comp(CompNum)%Name = CompNames(CompNum)
TempLoop%Branch(BranchNum)%Comp(CompNum)%NodeNameIn = InletNodeNames(CompNum)
TempLoop%Branch(BranchNum)%Comp(CompNum)%NodeNumIn = InletNodeNumbers(CompNum)
TempLoop%Branch(BranchNum)%Comp(CompNum)%NodeNameOut = OutletNodeNames(CompNum)
TempLoop%Branch(BranchNum)%Comp(CompNum)%NodeNumOut = OutletNodeNumbers(CompNum)
! Increment pipe counter if component is a pipe
IF (TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_Pipe .or. &
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeInterior .or. &
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeExterior .or. &
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeUnderground .or. &
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeSteam) THEN
NumOfPipesinLoop = NumOfPipesinLoop + 1
IF(PlantLoop(LoopNum)%TypeOfLoop == Plant) THEN
NumPlantPipes = NumPlantPipes + 1
ELSE IF(PlantLoop(LoopNum)%TypeOfLoop == Condenser) THEN
NumCondPipes = NumCondPipes + 1
END IF
NumPipes = NumPipes + 1
END IF
TempLoop%Branch(BranchNum)%NodeNumIn = &
TempLoop%Branch(BranchNum)%Comp(1)%NodeNumIn
! find branch outlet node
TempLoop%Branch(BranchNum)%NodeNumOut = &
TempLoop%Branch(BranchNum)%Comp(TempLoop%Branch(BranchNum)%TotalComponents)%NodeNumOut
END DO
DEALLOCATE(CompTypes)
DEALLOCATE(CompNames)
DEALLOCATE(CompCtrls)
DEALLOCATE(InletNodeNames)
DEALLOCATE(InletNodeNumbers)
DEALLOCATE(OutletNodeNames)
DEALLOCATE(OutletNodeNumbers)
END DO
DEALLOCATE(BranchNames)
IF(ASeriesBranchHasPump .AND. AParallelBranchHasPump) THEN
CALL ShowSevereError('Current version does not support Loop pumps and branch pumps together')
CALL ShowContinueError('Occurs in loop '// TRIM(TempLoop%Name))
ErrorsFound = .TRUE.
! ELSE IF(.NOT. ASeriesBranchHasPump .AND. .NOT. TempLoop%BranchPump .AND. (LoopSideNum .NE. DemandSide)) THEN
! CALL ShowSevereError('PlantLoop does not have a pump. A pump is required in each loop')
! CALL ShowContinueError('Occurs in loop '// TRIM(TempLoop%Name))
! ErrorsFound = .TRUE.
END IF
!DSU? IF(TempLoop%BranchPump) THEN
! ! This makes sure we aren't trying to run a common pipe simulation with branch pumps
! IF (PlantLoop(LoopNum)%CommonPipeType .NE. CommonPipe_No) THEN
! CALL ShowSevereError('Current version cannot simulate a common pipe plant loop with branch pipes.')
! CALL ShowContinueError('To correct, place supply pump on first branch of supply side.')
! CALL ShowContinueError('Error occurs in PlantLoop = '//TRIM(PlantLoop(LoopNum)%Name))
! CALL ShowFatalError('Program terminates due to above conditions.')
! END IF
! Not sure why we can't do steam with branch pumps, but this is moved here from the Demand Calc procedure
!DSU? IF(PlantLoop(LoopNum)%FluidType==NodeType_Steam) Then
! !STEAM: Plant Loop Fluid Type is Steam: Calc loop Demand For STEAM cannot be done with branch pumps
! CALL ShowSevereError('FluidType=STEAM:Branch Pumps cannot be used in a STEAM Loop')
! CALL ShowContinueError('Occurs in PlantLoop='//TRIM(PlantLoop(LoopNum)%Name))
! CALL ShowFatalError('Program terminates due to above conditions.')
! END IF
! END IF
!DSU? End Pump Checks
! Obtain the Splitter and Mixer information
IF(TempLoop%ConnectList == '') THEN
NumofSplitters = 0
NumofMixers = 0
ELSE
errflag=.false.
CALL GetNumSplitterMixerInConntrList(TempLoop%Name,TempLoop%ConnectList,NumofSplitters,NumofMixers,errflag)
if (errflag) then
ErrorsFound=.true.
endif
if (NumofSplitters /= NumofMixers) then
CALL ShowSevereError('GetPlantInput: Loop Name='//TRIM(TempLoop%Name)//', ConnectorList='// &
TRIM(TempLoop%ConnectList)// &
', unequal number of splitters and mixers')
ErrorsFound=.true.
endif
END IF
IF(NumofSplitters .GT. 0)Then
TempLoop%SplitterExists = .TRUE.
Else
TempLoop%SplitterExists = .FALSE.
End If
IF(NumofMixers .GT. 0)Then
TempLoop%MixerExists = .TRUE.
Else
TempLoop%MixerExists = .FALSE.
End If
IF (ErrorsFound) THEN
CALL ShowFatalError('GetPlantInput: Previous Severe errors cause termination.')
ENDIF
NumConnectorsInLoop = NumofSplitters + NumofMixers
ALLOCATE(TempLoop%Splitter(NumofSplitters))
SplitNum = 1
DO ConnNum = 1, NumConnectorsInLoop
IF(SplitNum .GT. NumofSplitters) EXIT
ALLOCATE(OutletNodeNames(MaxNumAlphas))
ALLOCATE(OutletNodeNumbers(MaxNumAlphas))
CALL GetLoopSplitter(TempLoop%Name,TempLoop%ConnectList, &
TempLoop%Splitter(SplitNum)%Name, &
TempLoop%Splitter(SplitNum)%Exists, &
TempLoop%Splitter(SplitNum)%NodeNameIn, &
TempLoop%Splitter(SplitNum)%NodeNumIn, &
TempLoop%Splitter(SplitNum)%TotalOutletNodes, &
OutletNodeNames,OutletNodeNumbers,ErrorsFound,ConnNum,SplitNum)
IF(SplitNum == 1) THEN
DEALLOCATE(OutletNodeNames)
DEALLOCATE(OutletNodeNumbers)
CYCLE
ENDIF
! Map the inlet node to the splitter to a branch number
IF (TempLoop%Splitter(SplitNum-1)%Exists) THEN
! Map the inlet node to the splitter to a branch number
DO BranchNum = 1, TempLoop%TotalBranches
CompNum = TempLoop%Branch(BranchNum)%TotalComponents
IF (TempLoop%Splitter(SplitNum-1)%NodeNumIn == &
TempLoop%Branch(BranchNum)%Comp(CompNum)%NodeNumOut ) THEN
TempLoop%Splitter(SplitNum-1)%BranchNumIn = BranchNum
SplitInBranch=.true.
EXIT ! BranchNum DO loop
END IF
END DO
IF (.not. SplitInBranch) THEN
CALL ShowSevereError('Splitter Inlet Branch not found, Splitter='//TRIM(TempLoop%Splitter(SplitNum-1)%Name))
CALL ShowContinueError('Splitter Branch Inlet name='//TRIM(TempLoop%Splitter(SplitNum-1)%NodeNameIn))
CALL ShowContinueError('In Loop='//TRIM(TempLoop%Name))
ErrorsFound=.true.
ENDIF
ALLOCATE(TempLoop%Splitter(SplitNum-1)%NodeNameOut(TempLoop%Splitter(SplitNum-1)%TotalOutletNodes))
TempLoop%Splitter(SplitNum-1)%NodeNameOut=' '
ALLOCATE(TempLoop%Splitter(SplitNum-1)%NodeNumOut(TempLoop%Splitter(SplitNum-1)%TotalOutletNodes))
TempLoop%Splitter(SplitNum-1)%NodeNumOut=0
ALLOCATE(TempLoop%Splitter(SplitNum-1)%BranchNumOut(TempLoop%Splitter(SplitNum-1)%TotalOutletNodes))
TempLoop%Splitter(SplitNum-1)%BranchNumOut=0
ALLOCATE(SplitOutBranch(TempLoop%Splitter(SplitNum-1)%TotalOutletNodes))
SplitOutBranch=.false.
DO NodeNum = 1, TempLoop%Splitter(SplitNum-1)%TotalOutletNodes
TempLoop%Splitter(SplitNum-1)%NodeNameOut(NodeNum) = OutletNodeNames(NodeNum)
TempLoop%Splitter(SplitNum-1)%NodeNumOut(NodeNum) = OutletNodeNumbers(NodeNum)
! The following DO loop series is intended to store the branch number for each outlet
! branch of the splitter
DO BranchNum = 1, TempLoop%TotalBranches
IF (TempLoop%Splitter(SplitNum-1)%NodeNumOut(NodeNum) == &
TempLoop%Branch(BranchNum)%Comp(1)%NodeNumIn ) THEN
TempLoop%Splitter(SplitNum-1)%BranchNumOut(NodeNum) = BranchNum
SplitOutBranch(NodeNum)=.true.
EXIT ! BranchNum DO loop
END IF
END DO
END DO
DO Outlet = 1, TempLoop%Splitter(SplitNum-1)%TotalOutletNodes
IF (SplitOutBranch(Outlet)) CYCLE
CALL ShowSevereError('Splitter Outlet Branch not found, Splitter='//TRIM(TempLoop%Splitter(SplitNum-1)%Name))
CALL ShowContinueError('Splitter Branch Outlet node name='//TRIM(TempLoop%Splitter(SplitNum-1)%NodeNameOut(Outlet)))
CALL ShowContinueError('In Loop='//TRIM(TempLoop%Name))
CALL ShowContinueError('Loop BranchList='//trim(TempLoop%BranchList))
CALL ShowContinueError('Loop ConnectorList='//trim(TempLoop%ConnectList))
ErrorsFound=.true.
ENDDO
ENDIF ! Splitter exists
DEALLOCATE(SplitOutBranch)
DEALLOCATE(OutletNodeNames)
DEALLOCATE(OutletNodeNumbers)
END DO
ALLOCATE(TempLoop%Mixer(NumofMixers))
MixNum = 1
DO ConnNum = 1, NumConnectorsInLoop
IF(MixNum .GT. NumofMixers) EXIT
ALLOCATE(InletNodeNames(MaxNumAlphas))
ALLOCATE(InletNodeNumbers(MaxNumAlphas))
CALL GetLoopMixer(TempLoop%Name,TempLoop%ConnectList, &
TempLoop%Mixer(MixNum)%Name, &
TempLoop%Mixer(MixNum)%Exists, &
TempLoop%Mixer(MixNum)%NodeNameOut, &
TempLoop%Mixer(MixNum)%NodeNumOut, &
TempLoop%Mixer(MixNum)%TotalInletNodes, &
InletNodeNames,InletNodeNumbers,ErrorsFound,ConnNum,MixNum)
IF(MixNum == 1) THEN
DEALLOCATE(InletNodeNames)
DEALLOCATE(InletNodeNumbers)
CYCLE
ENDIF
! Map the outlet node of the mixer to a branch number
IF (TempLoop%Mixer(MixNum-1)%Exists) THEN
! Map the outlet node of the mixer to a branch number
MixerOutBranch=.false.
DO BranchNum = 1, TempLoop%TotalBranches
IF (TempLoop%Mixer(MixNum-1)%NodeNumOut == &
TempLoop%Branch(BranchNum)%Comp(1)%NodeNumIn ) THEN
TempLoop%Mixer(MixNum-1)%BranchNumOut = BranchNum
MixerOutBranch=.true.
EXIT ! BranchNum DO loop
END IF
END DO
IF (.not. MixerOutBranch) THEN
CALL ShowSevereError('Mixer Outlet Branch not found, Mixer='//TRIM(TempLoop%Mixer(MixNum-1)%Name))
ErrorsFound=.true.
ENDIF
ALLOCATE(TempLoop%Mixer(MixNum-1)%NodeNameIn(TempLoop%Mixer(MixNum-1)%TotalInletNodes))
TempLoop%Mixer(MixNum-1)%NodeNameIn=' '
ALLOCATE(TempLoop%Mixer(MixNum-1)%NodeNumIn(TempLoop%Mixer(MixNum-1)%TotalInletNodes))
TempLoop%Mixer(MixNum-1)%NodeNumIn=0
ALLOCATE(TempLoop%Mixer(MixNum-1)%BranchNumIn(TempLoop%Mixer(MixNum-1)%TotalInletNodes))
TempLoop%Mixer(MixNum-1)%BranchNumIn=0
ALLOCATE(MixerInBranch(TempLoop%Mixer(MixNum-1)%TotalInletNodes))
MixerInBranch=.false.
DO NodeNum = 1, TempLoop%Mixer(MixNum-1)%TotalInletNodes
TempLoop%Mixer(MixNum-1)%NodeNameIn(NodeNum) = InletNodeNames(NodeNum)
TempLoop%Mixer(MixNum-1)%NodeNumIn(NodeNum) = InletNodeNumbers(NodeNum)
! The following DO loop series is intended to store the branch number for each inlet
! branch of the mixer
DO BranchNum = 1, TempLoop%TotalBranches
CompNum = TempLoop%Branch(BranchNum)%TotalComponents
IF (TempLoop%Mixer(MixNum-1)%NodeNumIn(NodeNum) == &
TempLoop%Branch(BranchNum)%Comp(CompNum)%NodeNumOut ) THEN
TempLoop%Mixer(MixNum-1)%BranchNumIn(NodeNum) = BranchNum
MixerInBranch(NodeNum)=.true.
EXIT ! BranchNum DO loop
END IF
END DO
END DO
DO Inlet = 1, TempLoop%Mixer(MixNum-1)%TotalInletNodes
IF (MixerInBranch(Inlet)) CYCLE
CALL ShowSevereError('Mixer Inlet Branch not found, Mixer='//TRIM(TempLoop%Mixer(MixNum-1)%Name))
CALL ShowContinueError('Mixer Branch Inlet name='//TRIM(TempLoop%Mixer(MixNum-1)%NodeNameIn(Inlet)))
CALL ShowContinueError('In Loop='//TRIM(TempLoop%Name))
CALL ShowContinueError('Loop BranchList='//trim(TempLoop%BranchList))
CALL ShowContinueError('Loop ConnectorList='//trim(TempLoop%ConnectList))
ErrorsFound=.true.
ENDDO
ENDIF ! Mixer exists
DEALLOCATE(MixerInBranch)
DEALLOCATE(InletNodeNames)
DEALLOCATE(InletNodeNumbers)
END DO
IF(NumOfPipesInLoop .GT. 0) THEN
PipeNum = 0
ALLOCATE (LoopPipe(HalfLoopNum)%Pipe(NumOfPipesInLoop))
DO BranchNum = 1, TempLoop%TotalBranches
DO CompNum = 1, TempLoop%Branch(BranchNum)%TotalComponents
IF (TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_Pipe .or. &
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeSteam .or. &
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeInterior .or. &
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeUnderground .or. &
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeExterior) THEN
PipeNum = PipeNum + 1
IF (PipeNum > NumOfPipesInLoop) CALL ShowFatalError('Pipe counting problem in GetPlantSideLoops')
LoopPipe(HalfLoopNum)%NumPipes = NumOfPipesInLoop
LoopPipe(HalfLoopNum)%Pipe(PipeNum)%Name = TempLoop%Branch(BranchNum)%Comp(CompNum)%Name
IF(TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_Pipe) THEN
LoopPipe(HalfLoopNum)%Pipe(PipeNum)%Typeof = TypeOf_Pipe
ELSE IF(TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeSteam) THEN
LoopPipe(HalfLoopNum)%Pipe(PipeNum)%Typeof = TypeOf_PipeSteam
ELSE IF(TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeInterior) THEN
LoopPipe(HalfLoopNum)%Pipe(PipeNum)%Typeof = TypeOf_PipeInterior
ELSE IF(TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeExterior) THEN
LoopPipe(HalfLoopNum)%Pipe(PipeNum)%Typeof = TypeOf_PipeExterior
ELSE IF(TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeUnderground) THEN
LoopPipe(HalfLoopNum)%Pipe(PipeNum)%Typeof = TypeOf_PipeUnderground
END IF
LoopPipe(HalfLoopNum)%Pipe(PipeNum)%NodeNameIn = TempLoop%Branch(BranchNum)%Comp(CompNum)%NodeNameIn
LoopPipe(HalfLoopNum)%Pipe(PipeNum)%NodeNumIn = TempLoop%Branch(BranchNum)%Comp(CompNum)%NodeNumIn
LoopPipe(HalfLoopNum)%Pipe(PipeNum)%NodeNameOut = TempLoop%Branch(BranchNum)%Comp(CompNum)%NodeNameOut
LoopPipe(HalfLoopNum)%Pipe(PipeNum)%NodeNumOut = TempLoop%Branch(BranchNum)%Comp(CompNum)%NodeNumOut
IF (TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_Pipe .or. &
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeSteam) THEN
! Call InitializePipes(TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num, &
! LoopPipe(HalfLoopNum)%Pipe(PipeNum)%Name, &
! TempLoop%Branch(BranchNum)%Comp(CompNum)%CompNum, &
! 0.0d0)
ELSEIF (TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeInterior .or. &
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeUnderground .or. &
TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num == TypeOf_PipeExterior) THEN
Call InitializeHeatTransferPipes(TempLoop%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num, &
LoopPipe(HalfLoopNum)%Pipe(PipeNum)%Name, &
TempLoop%Branch(BranchNum)%Comp(CompNum)%CompNum)
ENDIF
END IF
END DO
END DO
END IF
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%SplitterExists = TempLoop%SplitterExists
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%MixerExists = TempLoop%MixerExists
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%ByPassExists = TempLoop%ByPassExists
ALLOCATE(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(TempLoop%TotalBranches))
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%TotalBranches = TempLoop%TotalBranches
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch = TempLoop%Branch
ALLOCATE(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Splitter(NumofSplitters))
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%NumSplitters = NumofSplitters
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Splitter = TempLoop%Splitter
ALLOCATE(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Mixer(NumofMixers))
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%NumMixers = NumofMixers
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Mixer = TempLoop%Mixer
! Add condenser CASE statement when required.
DEALLOCATE(TempLoop%Branch)
DEALLOCATE(TempLoop%Splitter)
DEALLOCATE(TempLoop%Mixer)
END DO ! ... end LoopSideNum=DemandSide,SupplySide
PlantLoop(LoopNum)%LoopHasConnectionComp = TempLoop%LoopHasConnectionComp
! CR 7883 check for missing demand side pump if common pipe set.
IF ( (PlantLoop(LoopNum)%CommonPipeType /= CommonPipe_No) .AND. (.NOT. DemandSideHasPump) ) THEN
CALL ShowSevereError('Input Error: a common pipe arrangement was selected but there is no pump for the secondary loop.')
CALL ShowContinueError('Occurs in PlantLoop = '//TRIM(TempLoop%Name))
CALL ShowContinueError('Add a pump to the demand side of this plant loop.')
ErrorsFound=.true.
ENDIF
END DO ! ...end of demand side loops DO loop
ALLOCATE (Pipe(NumPipes)) ! Pipe definition in DataPlant
SysPipeNum=0
DO HalfLoopNum = 1, NumHalfLoops
DO PipeNum = 1, LoopPipe(HalfLoopNum)%NumPipes
SysPipeNum = SysPipeNum + 1
IF(MOD(HalfLoopNum,2) .NE. 0) THEN
Pipe(SysPipeNum)%ParentHalfLoop = DemandSide
ELSE
Pipe(SysPipeNum)%ParentHalfLoop = SupplySide
END IF
Pipe(SysPipeNum)%Name = LoopPipe(HalfLoopNum)%Pipe(PipeNum)%Name
Pipe(SysPipeNum)%Typeof = LoopPipe(HalfLoopNum)%Pipe(PipeNum)%Typeof
Pipe(SysPipeNum)%NodeNameIn = LoopPipe(HalfLoopNum)%Pipe(PipeNum)%NodeNameIn
Pipe(SysPipeNum)%NodeNumIn = LoopPipe(HalfLoopNum)%Pipe(PipeNum)%NodeNumIn
Pipe(SysPipeNum)%NodeNameOut = LoopPipe(HalfLoopNum)%Pipe(PipeNum)%NodeNameOut
Pipe(SysPipeNum)%NodeNumOut = LoopPipe(HalfLoopNum)%Pipe(PipeNum)%NodeNumOut
END DO
END DO
DEALLOCATE(LoopPipe)
!DSU? can we clean this out this next do loop now? looks like bandaids.
DO LoopNum = 1, TotNumLoops
DO BranchNum=1, PlantLoop(LoopNum)%LoopSide(SupplySide)%TotalBranches
DO CompNum = 1, PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%TotalComponents
Pos = Index(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf, ":")
GeneralEquipType=FindItemInList(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf(1:Pos-1), &
GeneralEquipTypes,NumGeneralEquipTypes)
IF (GeneralEquipType == 0) THEN
IF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf(1:13), &
'HeaderedPumps')) THEN
GeneralEquipType=GenEquipTypes_Pump
ELSEIF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf, &
'WaterHeater:HeatPump')) THEN
GeneralEquipType=GenEquipTypes_WaterThermalTank
ELSEIF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf, &
'TemperingValve')) THEN
GeneralEquipType=GenEquipTypes_Valve
ELSEIF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf(1:14), &
'Pipe:Adiabatic')) THEN
GeneralEquipType=GenEquipTypes_Pipe
ELSEIF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf(1:12), &
'PipingSystem')) THEN
GeneralEquipType=GenEquipTypes_Pipe
ELSEIF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf(1:33), &
'Thermalstorage:ChilledWater:Mixed')) THEN
GeneralEquipType=GenEquipTypes_ThermalStorage
ELSEIF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf(1:38), &
'Thermalstorage:ChilledWater:Stratified')) THEN
GeneralEquipType=GenEquipTypes_ThermalStorage
ELSEIF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf, &
'ChillerHeater:Absorption:DirectFired')) THEN
GeneralEquipType=GenEquipTypes_Chiller
ELSEIF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf, &
'ChillerHeater:Absorption:DoubleEffect')) THEN
GeneralEquipType=GenEquipTypes_Chiller
ELSEIF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf(1:8), &
'District')) THEN
GeneralEquipType=GenEquipTypes_Purchased
ELSEIF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf, &
'GroundHeatExchanger:Vertical')) THEN
GeneralEquipType=GenEquipTypes_GroundHeatExchanger
ELSEIF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf, &
'GroundHeatExchanger:Surface')) THEN
GeneralEquipType=GenEquipTypes_GroundHeatExchanger
ELSEIF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf, &
'GroundHeatExchanger:Pond')) THEN
GeneralEquipType=GenEquipTypes_GroundHeatExchanger
ELSEIF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf, &
'PlantComponent:TemperatureSource')) THEN
GeneralEquipType=GenEquipTypes_HeatExchanger
ELSEIF (SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf, &
'CENTRALHEATPUMPSYSTEM')) THEN
GeneralEquipType=GenEquipTypes_CentralHeatPumpSystem
ELSE
CALL ShowSevereError('GetPlantInput: PlantLoop="'//trim(PlantLoop(LoopNum)%Name)//'" invalid equipment type.')
CALL ShowContinueError('...on Branch="'//trim(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Name)//'".')
CALL ShowContinueError('...Equipment type="'// &
TRIM(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf)//'".')
CALL ShowContinueError('...Equipment name="'// &
TRIM(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%Name)//'".')
ErrorsFound=.true.
ENDIF
ENDIF
PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%GeneralEquipType = GeneralEquipType
! Set up "TypeOf" Num
TypeOfNum=FindItemInList(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf, &
SimPlantEquipTypes,NumSimPlantEquipTypes)
IF (TypeOfNum == 0) THEN
IF (.not. SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf(1:4),'Pump') .AND. &
.not. SameString(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf(1:12), &
'HeaderedPump')) THEN
! Error. May have already been flagged under General
IF (GeneralEquipType /= 0) THEN ! if GeneralEquipmentType == 0, then already flagged
CALL ShowSevereError('GetPlantInput: PlantLoop="'//trim(PlantLoop(LoopNum)%Name)//'" invalid equipment type.')
CALL ShowContinueError('...on Branch="'//trim(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Name)//'".')
CALL ShowContinueError('...Equipment type="'// &
TRIM(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf)//'".')
CALL ShowContinueError('...Equipment name="'// &
TRIM(PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%Name)//'".')
ErrorsFound=.true.
ENDIF
ENDIF
ELSE
PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf_Num = TypeOfNum
ENDIF
END DO
END DO
END DO
IF (ErrorsFound) THEN
CALL ShowFatalError('GetPlantInput: Errors in getting PlantLoop Input')
ENDIF
IF (NumPlantLoops > 0) ALLOCATE(VentRepPlantSupplySide(NumPlantLoops))
IF (NumPlantLoops > 0) ALLOCATE(VentRepPlantDemandSide(NumPlantLoops))
DO LoopNum = 1, NumPlantLoops
VentRepPlantSupplySide(LoopNum)%Name = PlantLoop(LoopNum)%Name
VentRepPlantSupplySide(LoopNum)%NodeNumIn = PlantLoop(LoopNum)%LoopSide(SupplySide)%NodeNumIn
VentRepPlantSupplySide(LoopNum)%NodeNameIn = PlantLoop(LoopNum)%LoopSide(SupplySide)%NodeNameIn
VentRepPlantSupplySide(LoopNum)%NodeNumOut = PlantLoop(LoopNum)%LoopSide(SupplySide)%NodeNumOut
VentRepPlantSupplySide(LoopNum)%NodeNameOut = PlantLoop(LoopNum)%LoopSide(SupplySide)%NodeNameOut
VentRepPlantSupplySide(LoopNum)%TotalBranches = PlantLoop(LoopNum)%LoopSide(SupplySide)%TotalBranches
IF (VentRepPlantSupplySide(LoopNum)%TotalBranches > 0) &
ALLOCATE (VentRepPlantSupplySide(LoopNum)%Branch(VentRepPlantSupplySide(LoopNum)%TotalBranches))
DO BranchNum = 1, VentRepPlantSupplySide(LoopNum)%TotalBranches
VentRepPlantSupplySide(LoopNum)%Branch(BranchNum)%Name = &
PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Name
VentRepPlantSupplySide(LoopNum)%Branch(BranchNum)%NodeNumIn = &
PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%NodeNumIn
VentRepPlantSupplySide(LoopNum)%Branch(BranchNum)%NodeNumOut = &
PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%NodeNumOut
VentRepPlantSupplySide(LoopNum)%Branch(BranchNum)%TotalComponents = &
PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%TotalComponents
IF (VentRepPlantSupplySide(LoopNum)%Branch(BranchNum)%TotalComponents > 0) THEN
TotCompsOnBranch = VentRepPlantSupplySide(LoopNum)%Branch(BranchNum)%TotalComponents
ALLOCATE (VentRepPlantSupplySide(LoopNum)%Branch(BranchNum)%Comp(TotCompsOnBranch))
END IF
DO CompNum = 1, VentRepPlantSupplySide(LoopNum)%Branch(BranchNum)%TotalComponents
VentRepPlantSupplySide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%Name = &
PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%Name
VentRepPlantSupplySide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%TypeOf = &
PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf
VentRepPlantSupplySide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNameIn = &
PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%NodeNameIn
VentRepPlantSupplySide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNameOut = &
PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%NodeNameOut
VentRepPlantSupplySide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn = &
PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn
VentRepPlantSupplySide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumOut = &
PlantLoop(LoopNum)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%NodeNumOut
END DO ! loop over components in branches on the loop (ventilation report data)
END DO ! loop over branches on the loop (ventilation report data)
VentRepPlantDemandSide(LoopNum)%Name = PlantLoop(LoopNum)%Name
VentRepPlantDemandSide(LoopNum)%NodeNumIn = PlantLoop(LoopNum)%LoopSide(DemandSide)%NodeNumIn
VentRepPlantDemandSide(LoopNum)%NodeNameIn = PlantLoop(LoopNum)%LoopSide(DemandSide)%NodeNameIn
VentRepPlantDemandSide(LoopNum)%NodeNumOut = PlantLoop(LoopNum)%LoopSide(DemandSide)%NodeNumOut
VentRepPlantDemandSide(LoopNum)%NodeNameOut = PlantLoop(LoopNum)%LoopSide(DemandSide)%NodeNameOut
VentRepPlantDemandSide(LoopNum)%TotalBranches = PlantLoop(LoopNum)%LoopSide(DemandSide)%TotalBranches
IF (VentRepPlantDemandSide(LoopNum)%TotalBranches > 0) &
ALLOCATE (VentRepPlantDemandSide(LoopNum)%Branch(VentRepPlantDemandSide(LoopNum)%TotalBranches))
DO BranchNum = 1, VentRepPlantDemandSide(LoopNum)%TotalBranches
VentRepPlantDemandSide(LoopNum)%Branch(BranchNum)%Name = &
PlantLoop(LoopNum)%LoopSide(DemandSide)%Branch(BranchNum)%Name
VentRepPlantDemandSide(LoopNum)%Branch(BranchNum)%NodeNumIn = &
PlantLoop(LoopNum)%LoopSide(DemandSide)%Branch(BranchNum)%NodeNumIn
VentRepPlantDemandSide(LoopNum)%Branch(BranchNum)%NodeNumOut = &
PlantLoop(LoopNum)%LoopSide(DemandSide)%Branch(BranchNum)%NodeNumOut
VentRepPlantDemandSide(LoopNum)%Branch(BranchNum)%TotalComponents = &
PlantLoop(LoopNum)%LoopSide(DemandSide)%Branch(BranchNum)%TotalComponents
IF (VentRepPlantDemandSide(LoopNum)%Branch(BranchNum)%TotalComponents > 0) THEN
TotCompsOnBranch = VentRepPlantDemandSide(LoopNum)%Branch(BranchNum)%TotalComponents
ALLOCATE (VentRepPlantDemandSide(LoopNum)%Branch(BranchNum)%Comp(TotCompsOnBranch))
END IF
DO CompNum = 1, VentRepPlantDemandSide(LoopNum)%Branch(BranchNum)%TotalComponents
VentRepPlantDemandSide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%Name = &
PlantLoop(LoopNum)%LoopSide(DemandSide)%Branch(BranchNum)%Comp(CompNum)%Name
VentRepPlantDemandSide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%TypeOf = &
PlantLoop(LoopNum)%LoopSide(DemandSide)%Branch(BranchNum)%Comp(CompNum)%TypeOf
VentRepPlantDemandSide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNameIn = &
PlantLoop(LoopNum)%LoopSide(DemandSide)%Branch(BranchNum)%Comp(CompNum)%NodeNameIn
VentRepPlantDemandSide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNameOut = &
PlantLoop(LoopNum)%LoopSide(DemandSide)%Branch(BranchNum)%Comp(CompNum)%NodeNameOut
VentRepPlantDemandSide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn = &
PlantLoop(LoopNum)%LoopSide(DemandSide)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn
VentRepPlantDemandSide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumOut = &
PlantLoop(LoopNum)%LoopSide(DemandSide)%Branch(BranchNum)%Comp(CompNum)%NodeNumOut
END DO ! loop over components in branches on the loop (ventilation report data)
END DO ! loop over branches on the loop (ventilation report data)
END DO ! loop over plant supply loops (ventilation report data)
IF (NumCondLoops > 0) ALLOCATE(VentRepCondSupplySide(NumCondLoops))
IF (NumCondLoops > 0) ALLOCATE(VentRepCondDemandSide(NumCondLoops))
DO LoopNum = 1, NumCondLoops
LoopNumInArray = LoopNum + NumPlantLoops
VentRepCondSupplySide(LoopNum)%Name = PlantLoop(LoopNumInArray)%Name
VentRepCondSupplySide(LoopNum)%NodeNumIn = PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%NodeNumIn
VentRepCondSupplySide(LoopNum)%NodeNameIn = PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%NodeNameIn
VentRepCondSupplySide(LoopNum)%NodeNumOut = PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%NodeNumOut
VentRepCondSupplySide(LoopNum)%NodeNameOut = PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%NodeNameOut
VentRepCondSupplySide(LoopNum)%TotalBranches = PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%TotalBranches
IF (VentRepCondSupplySide(LoopNum)%TotalBranches > 0) &
ALLOCATE (VentRepCondSupplySide(LoopNum)%Branch(VentRepCondSupplySide(LoopNum)%TotalBranches))
DO BranchNum = 1, VentRepCondSupplySide(LoopNum)%TotalBranches
VentRepCondSupplySide(LoopNum)%Branch(BranchNum)%Name = &
PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%Branch(BranchNum)%Name
VentRepCondSupplySide(LoopNum)%Branch(BranchNum)%NodeNumIn = &
PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%Branch(BranchNum)%NodeNumIn
VentRepCondSupplySide(LoopNum)%Branch(BranchNum)%NodeNumOut = &
PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%Branch(BranchNum)%NodeNumOut
VentRepCondSupplySide(LoopNum)%Branch(BranchNum)%TotalComponents = &
PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%Branch(BranchNum)%TotalComponents
IF (VentRepCondSupplySide(LoopNum)%Branch(BranchNum)%TotalComponents > 0) THEN
TotCompsOnBranch = VentRepCondSupplySide(LoopNum)%Branch(BranchNum)%TotalComponents
ALLOCATE (VentRepCondSupplySide(LoopNum)%Branch(BranchNum)%Comp(TotCompsOnBranch))
END IF
DO CompNum = 1, VentRepCondSupplySide(LoopNum)%Branch(BranchNum)%TotalComponents
VentRepCondSupplySide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%Name = &
PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%Name
VentRepCondSupplySide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%TypeOf = &
PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%TypeOf
VentRepCondSupplySide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNameIn = &
PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%NodeNameIn
VentRepCondSupplySide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNameOut = &
PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%NodeNameOut
VentRepCondSupplySide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn = &
PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn
VentRepCondSupplySide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumOut = &
PlantLoop(LoopNumInArray)%LoopSide(SupplySide)%Branch(BranchNum)%Comp(CompNum)%NodeNumOut
END DO ! loop over components in branches on the loop (ventilation report data)
END DO ! loop over branches on the loop (ventilation report data)
VentRepCondDemandSide(LoopNum)%Name = PlantLoop(LoopNumInArray)%Name
VentRepCondDemandSide(LoopNum)%NodeNumIn = PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%NodeNumIn
VentRepCondDemandSide(LoopNum)%NodeNameIn = PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%NodeNameIn
VentRepCondDemandSide(LoopNum)%NodeNumOut = PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%NodeNumOut
VentRepCondDemandSide(LoopNum)%NodeNameOut = PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%NodeNameOut
VentRepCondDemandSide(LoopNum)%TotalBranches = PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%TotalBranches
IF (VentRepCondDemandSide(LoopNum)%TotalBranches > 0) &
ALLOCATE (VentRepCondDemandSide(LoopNum)%Branch(VentRepCondDemandSide(LoopNum)%TotalBranches))
DO BranchNum = 1, VentRepCondDemandSide(LoopNum)%TotalBranches
VentRepCondDemandSide(LoopNum)%Branch(BranchNum)%Name = &
PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%Branch(BranchNum)%Name
VentRepCondDemandSide(LoopNum)%Branch(BranchNum)%NodeNumIn = &
PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%Branch(BranchNum)%NodeNumIn
VentRepCondDemandSide(LoopNum)%Branch(BranchNum)%NodeNumOut = &
PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%Branch(BranchNum)%NodeNumOut
VentRepCondDemandSide(LoopNum)%Branch(BranchNum)%TotalComponents = &
PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%Branch(BranchNum)%TotalComponents
IF (VentRepCondDemandSide(LoopNum)%Branch(BranchNum)%TotalComponents > 0) THEN
TotCompsOnBranch = VentRepCondDemandSide(LoopNum)%Branch(BranchNum)%TotalComponents
ALLOCATE (VentRepCondDemandSide(LoopNum)%Branch(BranchNum)%Comp(TotCompsOnBranch))
END IF
DO CompNum = 1, VentRepCondDemandSide(LoopNum)%Branch(BranchNum)%TotalComponents
VentRepCondDemandSide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%Name = &
PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%Branch(BranchNum)%Comp(CompNum)%Name
VentRepCondDemandSide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%TypeOf = &
PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%Branch(BranchNum)%Comp(CompNum)%TypeOf
VentRepCondDemandSide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNameIn = &
PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%Branch(BranchNum)%Comp(CompNum)%NodeNameIn
VentRepCondDemandSide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNameOut = &
PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%Branch(BranchNum)%Comp(CompNum)%NodeNameOut
VentRepCondDemandSide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn = &
PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn
VentRepCondDemandSide(LoopNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumOut = &
PlantLoop(LoopNumInArray)%LoopSide(DemandSide)%Branch(BranchNum)%Comp(CompNum)%NodeNumOut
END DO ! loop over components in branches on the loop (ventilation report data)
END DO ! loop over branches on the loop (ventilation report data)
END DO ! loop over plant supply loops (ventilation report data)
RETURN
END SUBROUTINE GetPlantInput