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, | intent(in) | :: | SysNum |
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 CalculateCondensers(SysNum)
! SUBROUTINE INFORMATION:
! AUTHOR Therese Stovall and C. R. Hudson, ORNL, Assisted by Hugh Henderson
! DATE WRITTEN Spring 2008
! Using condenser solution algorithms written by Richard Raustad, FSEC
! Oct/Nov 2004, and MODIFIED by Shirey, FSEC Dec 2004, and Hudson, ORNL in 2007
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Find the condenser heat rejection for a particular detailed
! refrigeration system and condensing temperature (part of iterative soln for cond temp).
! METHODOLOGY EMPLOYED:
! Calculate the condenser fan/pump power and consumption
! using manufacturer's rating data and fan power correlations
! from ASHRAE and evaporative effectiveness based on enthalpy
! similar to work done by Manske.
! From Heejin Cho, Re variable frequency drive fans,
! "From HVAC forums, I learned that it is common practice to set a
! minimum frequency at 15 or 20 Hz to protect motors from overheating. The
! full speed is at 60 Hz. The ratio of minimum and maximum frequencies
! will correspond to the ratio of minimum and maximum flow rates."
! REFERENCES:
! "Impact of ASHRAE Standard 62-1989 on Florida Supermarkets",
! Florida Solar Energy Center, FSEC-CR-910-96, Final Report, Oct. 1996
! Kyle A. Manske, Performance Optimization of Industrial Refrigeration Systems,
! A thesis submitted in partial fulfillment of the requirements for the degree of
! Master of Science, University of Wisconsin-Madison, 1999
! Lawrence Berkeley Laboratory and Resource Dynamics, Improving Fan Systrem Performance,
! A Sourcebook for Industry, DOE/GO-102003-1294, April 2003
! USE STATEMENTS:
USE CurveManager, ONLY : CurveValue
USE Psychrometrics, ONLY: PsyRhoAirFnPbTdbW,RhoH2O,PsyWFnTdbTwbPb,PsyTwbFnTdbWPb,&
PsyHFnTdbW,PsyTsatFnHPb, PsyWFnTdpPb,PsyHFnTdbRhPb
USE DataEnvironment, ONLY: OutBaroPress,OutHumRat,OutDryBulbTemp
USE DataWater, ONLY: WaterStorage
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: SysNum
! SUBROUTINE PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: BleedRateConstant = 5.0D-10 !water purge rate for evaporative
! condensers (m3/W-s) equal to 3 GPM per 100 tons (BAC Engineering Reference)
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: CondID ! Condenser Number
INTEGER :: CondCreditWarnIndex1 !Used to sum up warning count
INTEGER :: CondCreditWarnIndex2 !Used to sum up warning count
INTEGER :: CondCreditWarnIndex3 !Used to sum up warning count
INTEGER :: CondCreditWarnIndex4 !Used to sum up warning count
INTEGER :: CondCreditWarnIndex5 !Used to sum up warning count
INTEGER :: CondCreditWarnIndex6 !Used to sum up warning count
INTEGER :: CondCreditWarnIndex7 !Used to sum up warning count
INTEGER :: Sysloop ! counter over number of systems attached to this condenser
INTEGER :: SystemID ! System number rejecting heat to this condenser
LOGICAL :: EvapAvail ! Control for evap condenser availability
REAL(r64) :: AirVolRatio ! Ratio of air volume needed to remove load relative to design load
REAL(r64) :: AirDensity ! Density of air at condenser inlet [kg/m3]
REAL(r64) :: AirDensityDry ! Density of dry air at condenser inlet temperature [kg/m3]
REAL(r64) :: ActualFanPower ! Fan power after adjustments for partially loaded condenser [W]
REAL(r64) :: BPress ! Barometric pressure at condenser air inlet node [Pa]
REAL(r64) :: CapFac ! Capacity Factor
REAL(r64) :: Effectiveness ! for evap condenser, =capacity/max cap, where max cap is cap if Tairout equal Tcondense
REAL(r64) :: EnthalpyAtTcond ! enthalpy of saturated air at Tcondense
REAL(r64) :: EnthalpyAirIn ! Enthalpy of air entering condenser [J/kg]
REAL(r64) :: EnthalpyAirOut !Enthalpy of air leaving condenser [J/kg]
REAL(r64) :: FanMinAirFlowRatio ! Minimum fan air flow ratio
REAL(r64) :: FanPowerRatio ! Calculated fan power ratio
REAL(r64) :: HRCF ! Heat Rejection Capacity Factor (convention for evap condensers)
REAL(r64) :: HRCFFullFlow ! Heat Rejection Capacity Factor at full air flow
REAL(r64) :: HumRatIn ! Humidity ratio of inlet air to condenser [kg/kg]
REAL(r64) :: HumRatOut ! Humidity ratio of outlet air from condenser (assumed saturated) [kg/kg]
REAL(r64) :: LocalTimeStep ! Set equal to either TimeStepSys or TimeStepZone
REAL(r64) :: OutWbTemp ! Outdoor wet bulb temp at condenser air inlet node [C]
REAL(r64) :: OutDbTemp ! Outdoor dry bulb temp at condenser air inlet node [C]
REAL(r64) :: PurgeRate ! Rate of water blow-down/bleed/purge in evap condenseer (m3/s)
REAL(r64) :: RatedFanPower ! local variable equal to input condenser value
REAL(r64) :: RatedAirFlowRate !local variable equal to input condenser value
REAL(r64) :: QuadBterm ! calculation step in solving quadratic equation for hrcf
REAL(r64) :: Sqrtterm ! calculation step in solving quadratic equation for hrcf
REAL(r64) :: SinkTemp ! Heat sink temperature used to derate fan power at reduced loads [C]
REAL(r64) :: TAirOut ! Temperature of air leaving condenser [C]
REAL(r64) :: TcondCalc ! Calculated Condensing temperature
REAL(r64) :: TotalCondDefrostCredit ! total cond credit from hot gas/brine defr for cases etc. served
! directly by all systems served by this condenser [W]
REAL(r64) :: TotalCondDefCredfromSysID ! cond credit for single system [W]
REAL(r64) :: TotalLoadFromSysID ! total heat rejection load from a single detailed system [W]
REAL(r64) :: TotalLoadFromThisSystem ! total heat rejection load from the detailed system id'd in subroutine call [W]
REAL(r64) :: TotalLoadFromSystems ! total heat rejection load from all systems served by this condenser [W]
REAL(r64) :: NomCap ! ne "design" capacity when operating evap condenser at reduced air flow [W]
REAL(r64) :: CurMaxCapacity ! current maximum condenser capacity at delta T present for minimum condensing temperature [W]
LocalTimeStep = TimeStepZone
IF(UseSysTimeStep) LocalTimeStep = TimeStepSys
!Initialize this condenser for this time step
TotalCondenserPumpPower = 0.0d0
TotalBasinHeatPower = 0.0d0
TotalCondenserHeat = 0.0d0
TotalEvapWaterUseRate = 0.0d0
AirVolRatio = 1.0d0
ActualFanPower = 0.0d0
TotalCondDefrostCredit = 0.0d0
TotalLoadFromSystems = 0.0d0
EvapAvail = .TRUE.
CondID = System(SysNum)%CondenserNum(1)
RatedFanPower = Condenser(CondID)%RatedFanPower
RatedAirFlowRate = Condenser(CondID)%RatedAirFlowRate
FanMinAirFlowRatio = Condenser(CondID)%FanMinAirFlowRatio
CondCreditWarnIndex1 = Condenser(CondID)%CondCreditWarnIndex1
CondCreditWarnIndex2 = Condenser(CondID)%CondCreditWarnIndex2
CondCreditWarnIndex3 = Condenser(CondID)%CondCreditWarnIndex3
CondCreditWarnIndex4 = Condenser(CondID)%CondCreditWarnIndex4
CondCreditWarnIndex5 = Condenser(CondID)%CondCreditWarnIndex5
CondCreditWarnIndex6 = Condenser(CondID)%CondCreditWarnIndex6
CondCreditWarnIndex7 = Condenser(CondID)%CondCreditWarnIndex7
!Sum total condenser load and defrost credits for all systems connected to this condenser
! The system values will match the last time that system was solved, so some of the values may be
! from the previous overall solution iteration. However, solution goes through 3 iterations if
! there are any shared condensers, so that's ok.
DO Sysloop = 1,Condenser(CondID)%NumSysAttach
SystemID = Condenser(CondID)%SysNum(Sysloop)
TotalCondDefCredfromSysID = System(SystemID)%TotalCondDefrostCredit + System(SystemID)%SumCascadeCondCredit
TotalCondDefrostCredit = TotalCondDefrostCredit + TotalCondDefCredfromSysID
TotalLoadFromSysID = System(SystemID)%TotalSystemLoad + System(SystemID)%TotCompPower + &
System(SystemID)%TotHiStageCompPower + System(SystemID)%PipeHeatLoad
TotalLoadFromSystems = TotalLoadFromSystems + TotalLoadFromSysID
IF(SystemID == SysNum)TotalLoadFromThisSystem = TotalLoadFromSysID
END DO ! Sysloop over every system connected to this condenser
! for cascade condensers, condenser defrost credit gets passed on to the primary system condenser
IF(Condenser(CondID)%CondenserType == RefrigCondenserTypeCascade) TotalCondDefrostCredit = 0.0d0
! Calculate Total Heat rejection needed. Assume hermetic compressors - conservative assumption
! Note that heat rejection load carried by desuperheater hvac coils or water heaters is the
! lagged variable from the previous time step because these are calculated after the refrigeration
! system is solved.
Condenser(CondID)%ExternalHeatRecoveredLoad = Condenser(CondID)%LaggedUsedWaterHeater + &
Condenser(CondID)%LaggedUsedHVACCoil
Condenser(CondID)%InternalHeatRecoveredLoad = TotalCondDefrostCredit
Condenser(CondID)%TotalHeatRecoveredLoad = Condenser(CondID)%ExternalHeatRecoveredLoad + &
TotalCondDefrostCredit
TotalCondenserHeat = TotalLoadFromSystems - TotalCondDefrostCredit - &
Condenser(CondID)%ExternalHeatRecoveredLoad
IF (TotalCondenserHeat < 0.0d0) THEN
TotalCondenserHeat = 0.d0
IF( .not. warmupflag) THEN
CALL ShowRecurringWarningErrorAtEnd('Refrigeration:System: '//TRIM(System(SysNum)%Name)//&
':heat reclaimed(defrost,other purposes) >current condenser load. ',&
CondCreditWarnIndex1)
CALL ShowRecurringContinueErrorAtEnd('For heat recovered for defrost: ASHRAE rule of thumb: <= 25% of the load on a rack ',&
CondCreditWarnIndex2)
CALL ShowRecurringContinueErrorAtEnd('should be in defrost at the same time. Consider diversifying defrost schedules.',&
CondCreditWarnIndex3)
CALL ShowRecurringContinueErrorAtEnd('For heat recovered for other purposes: this warning may be '//&
'an artifact of refrigeration calculation at the load',CondCreditWarnIndex4)
CALL ShowRecurringContinueErrorAtEnd('time step and heat recovery at the system time step. '//&
'In that case, and ONLY if it occurs a large number of times',CondCreditWarnIndex5)
CALL ShowRecurringContinueErrorAtEnd('(relative to the number of time steps in the '//&
'simulation), there may be a mis-match between the',CondCreditWarnIndex6)
CALL ShowRecurringContinueErrorAtEnd('operating schedules of the refrigeration system and the '//&
'heat recovery load.',CondCreditWarnIndex7)
END IF !not warmup
END IF !total condenser heat < 0
! Water side of water-cooled condensers simulated in SimRefrigCondenser,
! Here, we just need load and condensing temperatures.
! Condensing temperature a fixed delta (the rated approach temperature) from inlet water temp so long as above minimum.
! Note, if condensing temperature falls below minimum, get warning and reset but no change in water-side calculations.
IF (Condenser(CondID)%CondenserType == RefrigCondenserTypeWater) THEN
! Obtain water-cooled condenser inlet/outlet temps
InletNode = Condenser(CondID)%InletNode
Condenser(CondID)%InletTemp = Node(InletNode)%Temp
TCondCalc = Node(InletNode)%Temp + Condenser(CondID)%RatedApproachT
IF ((Condenser(CondID)%InletTemp < Condenser(CondID)%InletTempMin) &
.OR. (TCondCalc < System(SysNum)%TCondenseMin)) THEN
System(SysNum)%TCondense=System(SysNum)%TCondenseMin
!Condenser(CondID)%LowTempWarn = Condenser(CondID)%LowTempWarn +1
IF (Condenser(CondID)%LowTempWarnIndex == 0) THEN
CALL ShowWarningMessage('Refrigeration:Condenser:WaterCooled '//TRIM(Condenser(CondID)%Name))
CALL ShowContinueError('Water-cooled condenser inlet temp lower than minimum allowed temp. '// &
'Check returning water temperature and/or minimum temperature setpoints '// &
' relative to minimum allowed condensing temperature.')
END IF
CALL ShowRecurringWarningErrorAtEnd('Refrigeration:Condenser:WaterCooled '// TRIM(Condenser(CondID)%Name) // &
' - Condenser inlet temp lower than minimum allowed ... continues',&
Condenser(CondID)%LowTempWarnIndex)
!END IF
ELSE
System(SysNum)%TCondense=TCondCalc
END IF
ELSEIF ((Condenser(CondID)%CondenserType == RefrigCondenserTypeAir) .OR. &
(Condenser(CondID)%CondenserType == RefrigCondenserTypeEvap)) THEN
!Condensing Temp, fan and other aux loads for air-cooled or evap-cooled
!The rated capacity of air-cooled condenser was adjusted for elevation in get input step
CapFac = TotalCondenserHeat/Condenser(CondID)%RatedCapacity
! See whether condenser is at ground level or if other air conditions(ie node) have been specified.
! Note that air-cooled condensers can draw air from, and reject heat to, a conditioned zone
! But evaporative condensers cannot.
! Provides effective condensing temperature for air-cooled condenser (or evap if evap is scheduled off)
IF (Condenser(CondID)%InletAirNodeNum /= 0) THEN
OutDbTemp = Node(Condenser(CondID)%InletAirNodeNum)%Temp
BPress = Node(Condenser(CondID)%InletAirNodeNum)%Press
HumRatIn = Node(Condenser(CondID)%InletAirNodeNum)%HumRat
ELSE
OutDbTemp=OutDryBulbTemp
BPress=OutBaroPress
HumRatIn = OutHumRat
ENDIF
AirDensity=PsyRhoAirFnPbTdbW(BPress,OutDbTemp,HumRatIn)
AirDensityDry=PsyRhoAirFnPbTdbW(BPress,OutDbTemp,0.0d0)
! Evaporative condensers will have their water flow shut off in cold months to avoid
! 'spectacular' icing problems. Ideally, the user will use the evaporative schedule input
! to set such a schedule. However, sometimes, users will use a single input deck to model
! one building in multiple climates, and may not think to put in such a schedule in the colder
! climates. To accomodate such applications, the variable EvapCutOutTdb is used as an extra
! check.
IF(OutDbTemp < EvapCutOutTdb)EvapAvail = .FALSE.
! Check schedule to determine evap condenser availability
! IF schedule exists, evap condenser can be scheduled OFF
IF((Condenser(CondID)%CondenserType == RefrigCondenserTypeEvap) .AND. &
(Condenser(CondID)%EvapSchedPtr > 0) .AND. &
(GetCurrentScheduleValue(Condenser(CondID)%EvapSchedPtr)== 0)) EvapAvail = .FALSE.
!Calculate condensing temperatures for air-cooled and evap-cooled
IF (Condenser(CondID)%CondenserType == RefrigCondenserTypeEvap)THEN
!Manufacturer's HRCF regressed to produce a function of the form:
! (Tcondense-Twb)=A1 + A2*hrcf + A3/hrcf + A4*Twb
! HRCF defined as rated capacity divided by load
! Apply ARI490 elevation correction factor here for evap condenser, then apply hrcf limits
IF(CapFac > 0.0d0) THEN
HRCF = Condenser(CondID)%EvapElevFact/CapFac
!Condenser(CondNum)%EvapElevFact=1.d0-3.074D-5*Elevation
ELSE
HRCF = MyLargeNumber
END IF
HRCF = MIN(HRCF,Condenser(CondID)%MaxCapFacEvap)
HRCF = MAX(HRCF,Condenser(CondID)%MinCapFacEvap)
IF(EvapAvail) THEN
OutWbTemp = PsyTwbFnTdbWPb(OutDbTemp,HumRatIn,BPress)
SinkTemp = OutWbTemp
ELSE !evaporative condenser with water spray scheduled off so use Tdb
HRCF = HRCF/3.0d0 !reference Menske, cap of evap cond operating dry about 1/3 of rated cap
HRCF = MAX(HRCF,Condenser(CondID)%MinCapFacEvap)
SinkTemp = OutDbTemp
END IF !evap avail, still in evap condenser
TcondCalc = Condenser(CondID)%EvapCoeff1 + Condenser(CondID)%EvapCoeff2*HRCF + &
Condenser(CondID)%EvapCoeff3/HRCF + (1.d0 + Condenser(CondID)%EvapCoeff4)*SinkTemp
ELSE !air-cooled condenser
! MinCondLoad and TempSlope came from condenser capacity curve, using curve backwards
TcondCalc = OutDbTemp + &
(TotalCondenserHeat-Condenser(CondID)%MinCondLoad)*Condenser(CondID)%TempSlope
SinkTemp = OutDbTemp
END IF ! if evap-cooled condenser
! Fan energy calculations apply to both air- and evap-cooled condensers
! Compare calculated condensing temps to minimum allowed to determine fan power/operating mode
IF (TcondCalc >= System(SysNum)%TCondenseMin) THEN
System(SysNum)%TCondense=TcondCalc
ActualFanPower=RatedFanPower
AirVolRatio=1.0d0
ELSE !need to reduce fan speed to reduce air flow and keep Tcond at or above Tcond min
System(SysNum)%TCondense=System(SysNum)%TCondenseMin
TcondCalc = System(SysNum)%TCondenseMin
! recalculate CapFac at current delta T
IF (Condenser(CondID)%CondenserType == RefrigCondenserTypeAir) THEN
CurMaxCapacity = CurveValue(Condenser(CondID)%CapCurvePtr,(System(SysNum)%TCondenseMin - OutDbTemp))
CapFac = TotalCondenserHeat / CurMaxCapacity
AirVolRatio = MAX(FanMinAirFlowRatio,CapFac**CondAirVolExponentDry) !Fans limited by minimum air flow ratio
AirVolRatio = MIN(AirVolRatio, 1.d0)
ELSE ! Condenser(CondID)%CondenserType == RefrigCondenserTypeEvap
HRCFFullFlow=HRCF
!if evap condenser need to back calculate the operating capacity using HRCF relationship, given known Tcond
QuadBterm=Condenser(CondID)%EvapCoeff1-(System(SysNum)%TCondense-SinkTemp)+ &
Condenser(CondID)%EvapCoeff4*SinkTemp
Sqrtterm =QuadBterm**2.d0 - 4.d0*Condenser(CondID)%EvapCoeff2*Condenser(CondID)%EvapCoeff3
IF(Sqrtterm < 0.d0)THEN ! only happens for very high wet bulb temps
HRCF=Condenser(CondID)%EvapElevFact*Condenser(CondID)%MaxCapFacEvap
IF(.NOT. EvapAvail) HRCF = HRCF/3.0d0
HRCF = MAX(HRCF,Condenser(CondID)%MinCapFacEvap)
ELSE
HRCF=Condenser(CondID)%EvapElevFact*(-QuadBterm-SQRT(Sqrtterm))/ (2.d0*Condenser(CondID)%EvapCoeff2)
IF(.NOT. EvapAvail) HRCF = HRCF/3.0d0
HRCF = MIN(HRCF,Condenser(CondID)%MaxCapFacEvap)
HRCF = MAX(HRCF,Condenser(CondID)%MinCapFacEvap)
END IF !sqrtterm
CapFac=HRCF/HRCFFullFlow !note, HRCFFullFlow previously limited between min and max,so can't be zero
IF(EvapAvail) THEN
AirVolRatio = MAX(FanMinAirFlowRatio,CapFac**CondAirVolExponentEvap) !Fans limited by minimum air flow ratio
ELSE !evap not available
AirVolRatio = MAX(FanMinAirFlowRatio,CapFac**CondAirVolExponentDry) !Fans limited by minimum air flow ratio
END IF !evap available
AirVolRatio = MIN(AirVolRatio, 1.d0)
END IF ! condenser type = RefrigCondenserTypeAir with else for evap
SELECT CASE (Condenser(CondID)%FanSpeedControlType)
CASE(FanVariableSpeed) !fan power law, adjusted for reality, applies
FanPowerRatio=AirVolRatio**2.5d0
ActualFanPower=FanPowerRatio*RatedFanPower
CASE(FanConstantSpeed)
ActualFanPower=AirVolRatio*EXP(1.d0-AirVolRatio)*RatedFanPower
CASE(FanConstantSpeedLinear)
ActualFanPower=AirVolRatio*RatedFanPower
CASE(FanTwoSpeed)
!low speed setting of 1/2 fan speed can give up to 60% of capacity.
!1/2 speed corresonds to ~1/8 power consumption (FanHalfSpeedRatio = 1/(2**2.5) = 0.1768)
!dampers are used to control flow within those two ranges as in FanConstantSpeed
ActualFanPower=AirVolRatio*EXP(1.d0-AirVolRatio)*RatedFanPower
IF(CapFac < CapFac60Percent) &
ActualFanPower=((AirVolRatio+0.4d0)*(FanHalfSpeedRatio))*EXP(1.d0-AirVolRatio)*RatedFanPower
END SELECT ! fan speed control type
END IF !Tcondense >= Tcondense minimum
IF ((Condenser(CondID)%CondenserType == RefrigCondenserTypeEvap) .AND. (EvapAvail)) THEN
! calculate evap water use, need to include bleed down/purge water as well as water
! actually evaporated. Use BAC Engineering Reference value of 3 gpm/100 tons because it's more
! conservative than the ASHRAE value.
! Also, based on experience, running the evap water when outdoor T near freezing
! leads to 'spectacular' ice, so schedule evap off when Tdb <=4 C.
!Calculate bleed/purge rate of water loss as a function of capacity, 3 gpm/100 tons refrigeration
PurgeRate=TotalCondenserHeat*BleedRateConstant
EnthalpyAirIn=PsyHFnTdbW(OutDbTemp,HumRatIn)
!calculate effectiveness at rated conditions, so use Tcondcalc)
EnthalpyAtTcond = PsyHFnTdbRhPb(TcondCalc,1.0d0,BPress)
Effectiveness = TotalCondenserHeat/(RatedAirFlowRate*AirDensity*(EnthalpyAtTcond-EnthalpyAirIn))
!need to limit max effectiveness for errors due to working beyond limits of HRCF in manuf data
Effectiveness = Min(Effectiveness,0.9d0)
EnthalpyAirOut=EnthalpyAirIn + Effectiveness*(EnthalpyAtTcond-EnthalpyAirIn)
!Air leaving the evaporative condenser is saturated
TAirOut=PsyTsatFnHPb(EnthalpyAirOut,BPress)
HumRatOut=PsyWFnTdpPb(TAirOut,BPress)
TotalEvapWaterUseRate = PurgeRate + RatedAirFlowRate* AirVolRatio * &
AirDensityDry * (HumRatOut-HumRatIn) / RhoH2O(OutWbTemp)
! assumes evap water pump runs whenever evap cooling is available to minimize scaling
TotalCondenserPumpPower = Condenser(CondID)%EvapPumpPower
! calculate basin water heater load
IF(TotalCondenserHeat == 0.0d0 .AND.OutDbTemp < Condenser(CondID)%BasinHeaterSetPointTemp) THEN
TotalBasinHeatPower = MAX(0.0d0,Condenser(CondID)%BasinHeaterPowerFTempDiff * &
(Condenser(CondID)%BasinHeaterSetPointTemp - OutDbTemp))
! provide warning if no heater power exists
IF (TotalBasinHeatPower == 0.0d0) THEN
!Condenser(CondID)%EvapFreezeWarn = Condenser(CondID)%EvapFreezeWarn + 1
IF (Condenser(CondID)%EvapFreezeWarnIndex == 0) THEN
CALL ShowWarningMessage('Refrigeration Condenser '// TRIM(Condenser(CondID)%Name) // &
' - Evap cooling of condenser underway with no basin heater power')
CALL ShowContinueError('and condenser inlet air dry-bulb temp at or below the basin heater setpoint temperature.' )
CALL ShowContinueErrorTimeStamp('Continuing simulation.')
END IF
CALL ShowRecurringWarningErrorAtEnd('Refrigeration Condenser '// TRIM(Condenser(CondID)%Name) // &
' - Evap cooling of condenser underway with no basin heater power ... continues',&
Condenser(CondID)%EvapFreezeWarnIndex)
!END IF !freeze warnings <= 5
END IF ! basin power == 0
END IF ! no load and cold outside
END IF !EvapAvail
ELSEIF (Condenser(CondID)%CondenserType == RefrigCondenserTypeCascade) THEN ! continuing Condenser type = water, (evap or air), or cascade
!Cascade condenser does not iterate. Condensing temperature specified as a load on higher temp system
! or floats to meet other loads on that system
!therese ** future - here and for new phase change heat exchanger - need to handle unmet loads!
System(SysNum)%TCondense = Condenser(CondID)%RatedTCondense
IF ((System(SysNum)%NumNonCascadeLoads > 0) .AND. (Condenser(CondID)%CascadeTempControl == CascadeTempFloat)) THEN
System(SysNum)%TCondense = System(Condenser(CondID)%CascadeSinkSystemID)%TEvapNeeded + &
Condenser(CondID)%RatedApproachT
IF (System(SysNum)%TCondense < System(SysNum)%TCondenseMin)THEN
System(SysNum)%TCondense=System(SysNum)%TCondenseMin
CALL ShowRecurringWarningErrorAtEnd('Refrigeration Condenser '// TRIM(Condenser(CondID)%Name) // &
' - Cascade condenser floating condensing temperature less than specified minimum '// &
' condensing temperature. Minimum specified temperature used for system below cascade condenser.'// &
' No correction made for system absorbing heat rejected by the cascade condenser.',&
Condenser(CondID)%EvapFreezeWarnIndex)
END IF !floating condensing temperature less than specified min for system
END IF !floating temperature
END IF ! Condenser type = water, (evap or air), or cascade
Condenser(CondID)%ActualFanPower = ActualFanPower
Condenser(CondID)%FanElecEnergy = ActualFanPower * LocalTimeStep * SecInHour
Condenser(CondID)%EvapWaterConsumpRate = TotalEvapWaterUseRate
Condenser(CondID)%EvapWaterConsumption = TotalEvapWaterUseRate * LocalTimeStep * SecInHour
Condenser(CondID)%ActualEvapPumpPower = TotalCondenserPumpPower
Condenser(CondID)%EvapPumpConsumption = TotalCondenserPumpPower * LocalTimeStep * SecInHour
Condenser(CondID)%BasinHeaterPower = TotalBasinHeatPower
Condenser(CondID)%BasinHeaterConsumption = TotalBasinHeatPower * LocalTimeStep * SecInHour
Condenser(CondID)%CondLoad = TotalCondenserHeat
Condenser(CondID)%CondEnergy = TotalCondenserHeat * LocalTimeStep * SecInHour
Condenser(CondID)%CondCreditWarnIndex1 = CondCreditWarnIndex1
Condenser(CondID)%CondCreditWarnIndex2 = CondCreditWarnIndex2
Condenser(CondID)%CondCreditWarnIndex3 = CondCreditWarnIndex3
Condenser(CondID)%CondCreditWarnIndex4 = CondCreditWarnIndex4
Condenser(CondID)%CondCreditWarnIndex5 = CondCreditWarnIndex5
Condenser(CondID)%CondCreditWarnIndex6 = CondCreditWarnIndex6
Condenser(CondID)%CondCreditWarnIndex7 = CondCreditWarnIndex7
Condenser(CondID)%ExternalEnergyRecovered = Condenser(CondID)%ExternalHeatRecoveredLoad * LocalTimeStep * SecInHour
Condenser(CondID)%InternalEnergyRecovered = Condenser(CondID)%InternalHeatRecoveredLoad * LocalTimeStep * SecInHour
Condenser(CondID)%TotalHeatRecoveredEnergy = Condenser(CondID)%TotalHeatRecoveredLoad * LocalTimeStep * SecInHour
System(SysNum)%NetHeatRejectLoad = TotalCondenserHeat*TotalLoadFromThisSystem/TotalLoadFromSystems
System(SysNum)%NetHeatRejectEnergy = System(SysNum)%NetHeatRejectLoad * LocalTimeStep * SecInHour
!set water system demand request (if needed)
IF (Condenser(CondID)%EvapWaterSupplyMode == WaterSupplyFromTank) THEN
WaterStorage(Condenser(CondID)%EvapWaterSupTankID)%VdotRequestDemand(Condenser(CondID)%EvapWaterTankDemandARRID) &
= Condenser(CondID)%EvapWaterConsumpRate
END IF
END SUBROUTINE CalculateCondensers