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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | TESCoilNum |
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 SizeTESCoil(TESCoilNum)
! SUBROUTINE INFORMATION:
! AUTHOR B. Griffith
! DATE WRITTEN April 2013
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! <description>
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
USE DataSizing
USE DataAirSystems, ONLY: PrimaryAirSystem
USE DataEnvironment, ONLY: StdRhoAir
USE ReportSizingManager, ONLY: ReportSizingOutput
USE OutputReportPredefined
USE CurveManager, ONLY: CurveValue
USE DataGlobals, ONLY: SecInHour, InitConvTemp
USE FluidProperties, ONLY: GetDensityGlycol, GetSpecificHeatGlycol
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER :: TESCoilNum
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='SizeTESCoil '
REAL(r64), PARAMETER :: FluidTankSizingDeltaT = 10.d0
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: MixTemp
REAL(r64) :: MixHumRat
REAL(r64) :: MixEnth
REAL(r64) :: MixWetBulb
REAL(r64) :: SupTemp
REAL(r64) :: SupHumRat
REAL(r64) :: SupEnth
REAL(r64) :: OutTemp
REAL(r64) :: OutAirFrac
REAL(r64) :: VolFlowRate
REAL(r64) :: CoolCapAtPeak
REAL(r64) :: TotCapTempModFac
INTEGER :: TimeStepNumAtMax
INTEGER :: DDNum
REAL(r64) :: rhoair
REAL(r64) :: rho
REAL(r64) :: deltaT
REAL(r64) :: Cp
IF (TESCoil(TESCoilNum)%RatedEvapAirVolFlowRate == AutoSize) THEN
IF (CurSysNum > 0) THEN
CALL CheckSysSizing('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name )
IF (CurOASysNum > 0) THEN
TESCoil(TESCoilNum)%RatedEvapAirVolFlowRate = FinalSysSizing(CurSysNum)%DesOutAirVolFlow
ELSE
TESCoil(TESCoilNum)%RatedEvapAirVolFlowRate = FinalSysSizing(CurSysNum)%DesMainVolFlow
ENDIF
ELSE IF (CurZoneEqNum > 0) THEN
CALL CheckZoneSizing('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name)
TESCoil(TESCoilNum)%RatedEvapAirVolFlowRate = &
MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow,FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow)
ENDIF
IF (TESCoil(TESCoilNum)%RatedEvapAirVolFlowRate < SmallAirVolFlow) THEN
TESCoil(TESCoilNum)%RatedEvapAirVolFlowRate = 0.d0
ENDIF
CALL ReportSizingOutput('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name , &
'Rated Evaporator Air Flow Rate [m3/s]', TESCoil(TESCoilNum)%RatedEvapAirVolFlowRate )
ENDIF
TESCoil(TESCoilNum)%RatedEvapAirMassFlowRate = StdRhoAir * TESCoil(TESCoilNum)%RatedEvapAirVolFlowRate
IF (TESCoil(TESCoilNum)%CondenserAirVolumeFlow == AutoCalculate) THEN
TESCoil(TESCoilNum)%CondenserAirVolumeFlow = TESCoil(TESCoilNum)%RatedEvapAirVolFlowRate &
* TESCoil(TESCoilNum)%CondenserAirFlowSizingFactor
CALL ReportSizingOutput('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name , &
'Condenser Air Flow Rate [m3/s]', TESCoil(TESCoilNum)%CondenserAirVolumeFlow )
ENDIF
TESCoil(TESCoilNum)%CondenserAirMassFlow = StdRhoAir * TESCoil(TESCoilNum)%CondenserAirVolumeFlow
IF (TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap == AutoSize) THEN
IF (CurSysNum > 0) THEN
CALL CheckSysSizing('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name )
VolFlowRate = TESCoil(TESCoilNum)%RatedEvapAirVolFlowRate
IF (VolFlowRate >= SmallAirVolFlow) THEN
IF (CurOASysNum > 0) THEN ! coil is in the OA stream
MixTemp = FinalSysSizing(CurSysNum)%CoolOutTemp
MixHumRat = FinalSysSizing(CurSysNum)%CoolOutHumRat
SupTemp = FinalSysSizing(CurSysNum)%PrecoolTemp
SupHumRat = FinalSysSizing(CurSysNum)%PrecoolHumRat
ELSE ! coil is on the main air loop
! MixTemp = FinalSysSizing(CurSysNum)%CoolMixTemp
! MixHumRat = FinalSysSizing(CurSysNum)%CoolMixHumRat
SupTemp = FinalSysSizing(CurSysNum)%CoolSupTemp
SupHumRat = FinalSysSizing(CurSysNum)%CoolSupHumRat
IF (PrimaryAirSystem(CurSysNum)%NumOACoolCoils == 0) THEN ! there is no precooling of the OA stream
MixTemp = FinalSysSizing(CurSysNum)%CoolMixTemp
MixHumRat = FinalSysSizing(CurSysNum)%CoolMixHumRat
ELSE ! there is precooling of OA stream
IF (VolFlowRate > 0.0d0) THEN
OutAirFrac = FinalSysSizing(CurSysNum)%DesOutAirVolFlow / VolFlowRate
ELSE
OutAirFrac = 1.0d0
END IF
OutAirFrac = MIN(1.0d0,MAX(0.0d0,OutAirFrac))
MixTemp = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolTemp + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%CoolRetTemp
MixHumRat = OutAirFrac*FinalSysSizing(CurSysNum)%PrecoolHumRat + &
(1.0d0-OutAirFrac)*FinalSysSizing(CurSysNum)%CoolRetHumRat
END IF
END IF
OutTemp = FinalSysSizing(CurSysNum)%CoolOutTemp
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
TotCapTempModFac = CurveValue(TESCoil(TESCoilNum)%CoolingOnlyCapFTempCurve,MixWetBulb,OutTemp)
CoolCapAtPeak = MAX(0.d0, (rhoair * VolFlowRate * (MixEnth-SupEnth)))
IF(TotCapTempModFac .GT. 0.d0)THEN
TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap = CoolCapAtPeak / TotCapTempModFac
ELSE
TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap = CoolCapAtPeak
END IF
ELSE
TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap = 0.0d0
END IF
ELSE IF (CurZoneEqNum > 0) THEN
CALL CheckZoneSizing('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name)
VolFlowRate = TESCoil(TESCoilNum)%RatedEvapAirVolFlowRate
IF (VolFlowRate >= SmallAirVolFlow) THEN
IF(ZoneEqDXCoil)THEN
IF (ZoneEqSizing(CurZoneEqNum)%OAVolFlow > 0.0d0) THEN
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInTemp
MixHumRat = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInHumRat
ELSE
MixTemp = FinalZoneSizing(CurZoneEqNum)%ZoneRetTempAtCoolPeak
MixHumRat = FinalZoneSizing(CurZoneEqNum)%ZoneHumRatAtCoolPeak
END IF
ELSE
MixTemp = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInTemp
MixHumRat = FinalZoneSizing(CurZoneEqNum)%DesCoolCoilInHumRat
END IF
SupTemp = FinalZoneSizing(CurZoneEqNum)%CoolDesTemp
SupHumRat = FinalZoneSizing(CurZoneEqNum)%CoolDesHumRat
TimeStepNumAtMax = FinalZoneSizing(CurZoneEqNum)%TimeStepNumAtCoolMax
DDNum = FinalZoneSizing(CurZoneEqNum)%CoolDDNum
IF (DDNum > 0 .and. TimeStepNumAtMax > 0) THEN
OutTemp = DesDayWeath(DDNum)%Temp(TimeStepNumAtMax)
ELSE
OutTemp = 0.0d0
ENDIF
rhoair = PsyRhoAirFnPbTdbW(StdBaroPress,MixTemp,MixHumRat,RoutineName)
MixEnth = PsyHFnTdbW(MixTemp,MixHumRat,RoutineName)
MixWetBulb = PsyTwbFnTdbWPb(MixTemp,MixHumRat,StdBaroPress,RoutineName)
SupEnth = PsyHFnTdbW(SupTemp,SupHumRat,RoutineName)
TotCapTempModFac = CurveValue(TESCoil(TESCoilNum)%CoolingOnlyCapFTempCurve,MixWetBulb,OutTemp)
CoolCapAtPeak = MAX(0.d0, (rhoair * VolFlowRate * (MixEnth-SupEnth)))
IF(TotCapTempModFac .GT. 0.d0)THEN
TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap = CoolCapAtPeak / TotCapTempModFac
ELSE
TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap = CoolCapAtPeak
END IF
ELSE
TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap= 0.d0
END IF
ENDIF
CALL ReportSizingOutput('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name , &
'Cooling Only Mode Rated Total Evaporator Cooling Capacity [W]', &
TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap )
ENDIF
IF ( TESCoil(TESCoilNum)%CoolingAndChargeModeAvailable &
.AND. (TESCoil(TESCoilNum)%CoolingAndChargeRatedTotCap == AutoCalculate)) THEN
TESCoil(TESCoilNum)%CoolingAndChargeRatedTotCap = TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap &
* TESCoil(TESCoilNum)%CoolingAndChargeRatedTotCapSizingFactor
CALL ReportSizingOutput('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name , &
'Cooling And Charge Mode Rated Total Evaporator Cooling Capacity [W]', &
TESCoil(TESCoilNum)%CoolingAndChargeRatedTotCap )
ENDIF
IF ( TESCoil(TESCoilNum)%CoolingAndChargeModeAvailable &
.AND. (TESCoil(TESCoilNum)%CoolingAndChargeRatedChargeCap == AutoCalculate)) THEN
TESCoil(TESCoilNum)%CoolingAndChargeRatedChargeCap = TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap &
* TESCoil(TESCoilNum)%CoolingAndChargeRatedChargeCapSizingFactor
CALL ReportSizingOutput('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name , &
'Cooling And Charge Mode Rated Storage Charging Capacity [W]', &
TESCoil(TESCoilNum)%CoolingAndChargeRatedChargeCap )
ENDIF
IF ( TESCoil(TESCoilNum)%CoolingAndDischargeModeAvailable &
.AND. (TESCoil(TESCoilNum)%CoolingAndDischargeRatedTotCap == AutoCalculate)) THEN
TESCoil(TESCoilNum)%CoolingAndDischargeRatedTotCap = TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap &
* TESCoil(TESCoilNum)%CoolingAndDischargeRatedTotCapSizingFactor
CALL ReportSizingOutput('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name , &
'Cooling And Discharge Mode Rated Total Evaporator Cooling Capacity [W]', &
TESCoil(TESCoilNum)%CoolingAndDischargeRatedTotCap )
ENDIF
IF ( TESCoil(TESCoilNum)%CoolingAndDischargeModeAvailable &
.AND. (TESCoil(TESCoilNum)%CoolingAndDischargeRatedDischargeCap == AutoCalculate)) THEN
TESCoil(TESCoilNum)%CoolingAndDischargeRatedDischargeCap = TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap &
* TESCoil(TESCoilNum)%CoolingAndDischargeRatedDischargeCapSizingFactor
CALL ReportSizingOutput('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name , &
'Cooling And Discharge Mode Rated Storage Discharging Capacity [W]', &
TESCoil(TESCoilNum)%CoolingAndDischargeRatedDischargeCap )
ENDIF
IF ( TESCoil(TESCoilNum)%ChargeOnlyModeAvailable &
.AND. (TESCoil(TESCoilNum)%ChargeOnlyRatedCapacity == AutoCalculate)) THEN
TESCoil(TESCoilNum)%ChargeOnlyRatedCapacity = TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap &
* TESCoil(TESCoilNum)%ChargeOnlyRatedCapacitySizingFactor
CALL ReportSizingOutput('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name , &
'Charge Only Mode Rated Storage Charging Capacity [W]', &
TESCoil(TESCoilNum)%ChargeOnlyRatedCapacity )
ENDIF
IF ( TESCoil(TESCoilNum)%DischargeOnlyModeAvailable &
.AND. (TESCoil(TESCoilNum)%DischargeOnlyRatedDischargeCap == AutoCalculate)) THEN
TESCoil(TESCoilNum)%DischargeOnlyRatedDischargeCap = TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap &
* TESCoil(TESCoilNum)%DischargeOnlyRatedDischargeCapSizingFactor
CALL ReportSizingOutput('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name , &
'Discharge Only Mode Rated Storage Discharging Capacity [W]', &
TESCoil(TESCoilNum)%DischargeOnlyRatedDischargeCap )
ENDIF
IF (( TESCoil(TESCoilNum)%StorageMedia == FluidBased) &
.AND. (TESCoil(TESCoilNum)%FluidStorageVolume == AutoCalculate)) THEN
! for fluid tanks, assume a 10C deltaT or diff between max and min, whichever is smaller
deltaT = MIN( FluidTankSizingDeltaT, &
(TESCoil(TESCoilNum)%MaximumFluidTankTempLimit - TESCoil(TESCoilNum)%MinimumFluidTankTempLimit) )
rho = GetDensityGlycol(TESCoil(TESCoilNum)%StorageFluidName, InitConvTemp, &
TESCoil(TESCoilNum)%StorageFluidIndex, 'CalcTESWaterStorageTank')
Cp = GetSpecificHeatGlycol(TESCoil(TESCoilNum)%StorageFluidName, InitConvTemp, &
TESCoil(TESCoilNum)%StorageFluidIndex, 'CalcTESWaterStorageTank')
IF (TESCoil(TESCoilNum)%DischargeOnlyRatedDischargeCap > 0.d0 .AND. TESCoil(TESCoilNum)%DischargeOnlyModeAvailable) THEN
TESCoil(TESCoilNum)%FluidStorageVolume = (TESCoil(TESCoilNum)%DischargeOnlyRatedDischargeCap * &
TESCoil(TESCoilNum)%StorageCapacitySizingFactor * SecInHour) &
/ (rho * Cp * deltaT)
ELSE
TESCoil(TESCoilNum)%FluidStorageVolume = (TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap * &
TESCoil(TESCoilNum)%StorageCapacitySizingFactor * SecInHour) &
/ (rho * Cp * deltaT)
ENDIF
CALL ReportSizingOutput('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name , &
'Fluid Storage Volume [m3]', &
TESCoil(TESCoilNum)%FluidStorageVolume )
ENDIF
IF (( TESCoil(TESCoilNum)%StorageMedia == IceBased) &
.AND. (TESCoil(TESCoilNum)%IceStorageCapacity == AutoCalculate)) THEN
IF (TESCoil(TESCoilNum)%DischargeOnlyRatedDischargeCap > 0.d0 .AND. TESCoil(TESCoilNum)%DischargeOnlyModeAvailable) THEN
TESCoil(TESCoilNum)%IceStorageCapacity = TESCoil(TESCoilNum)%DischargeOnlyRatedDischargeCap &
* TESCoil(TESCoilNum)%StorageCapacitySizingFactor * SecInHour
ELSE
TESCoil(TESCoilNum)%IceStorageCapacity = TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap &
* TESCoil(TESCoilNum)%StorageCapacitySizingFactor * SecInHour
ENDIF
CALL ReportSizingOutput('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name , &
'Ice Storage Capacity [GJ]', &
TESCoil(TESCoilNum)%IceStorageCapacity / 1.d+09 )
ENDIF
IF ((TESCoil(TESCoilNum)%CondenserType == EvapCooled) .AND. (TESCoil(TESCoilNum)%EvapCondPumpElecNomPower == AutoSize)) THEN
TESCoil(TESCoilNum)%EvapCondPumpElecNomPower = TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap * 0.004266d0 ! w/w (15 w/ton)
CALL ReportSizingOutput('Coil:Cooling:DX:SingleSpeed:ThermalStorage', TESCoil(TESCoilNum)%Name , &
'Evaporative Condenser Pump Rated Power Consumption [W]', &
TESCoil(TESCoilNum)%EvapCondPumpElecNomPower )
ENDIF
CALL PreDefTableEntry(pdchCoolCoilType,TESCoil(TESCoilNum)%Name,'Coil:Cooling:DX:SingleSpeed:ThermalStorage')
CALL PreDefTableEntry(pdchCoolCoilTotCap,TESCoil(TESCoilNum)%Name,TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap)
CALL PreDefTableEntry(pdchCoolCoilSensCap,TESCoil(TESCoilNum)%Name,TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap &
* TESCoil(TESCoilNum)%CoolingOnlyRatedSHR)
CALL PreDefTableEntry(pdchCoolCoilLatCap,TESCoil(TESCoilNum)%Name,TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap &
- TESCoil(TESCoilNum)%CoolingOnlyRatedTotCap * TESCoil(TESCoilNum)%CoolingOnlyRatedSHR)
CALL PreDefTableEntry(pdchCoolCoilSHR,TESCoil(TESCoilNum)%Name,TESCoil(TESCoilNum)%CoolingOnlyRatedSHR)
CALL PreDefTableEntry(pdchCoolCoilNomEff,TESCoil(TESCoilNum)%Name,TESCoil(TESCoilNum)%CoolingOnlyRatedCOP)
RETURN
END SUBROUTINE SizeTESCoil