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 | :: | FluidCoolerNum |
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 TwoSpeedFluidCooler(FluidCoolerNum)
! SUBROUTINE INFORMATION:
! AUTHOR Chandan Sharma
! DATE WRITTEN August 2008
! MODIFIED Dec. 2008. BG. added RunFlag logic per original methodology
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! To simulate the operation of a fluid cooler with a two-speed fan.
! METHODOLOGY EMPLOYED:
! The fluid cooler is modeled using effectiveness-NTU relationships for
! cross flow heat exchangers (both stream unmixed)based on cooling tower model.
!
! The subroutine calculates the period of time required to meet a
! leaving water temperature setpoint. It assumes that part-load
! operation represents a linear interpolation of two steady-state regimes
! (high-speed fan operation and low-speed fan operation).
! Cyclic losses are neglected. The period of time required to meet the
! leaving water temperature setpoint is used to determine the required
! fan power and energy.
!
! A RunFlag is passed by the upper level manager to indicate the ON/OFF status,
! or schedule, of the fluid cooler. If the fluid cooler is OFF, outlet water
! temperature and flow rate are passed through the model from inlet node to
! outlet node without intervention.Reports are also updated with fan power
! and fan energy being zero.
!
! When the RunFlag indicates an ON condition for the fluid cooler, the
! mass flow rate and water temperature are read from the inlet node of the
! fluid cooler (water-side). The outdoor air dry-bulb temperature is used
! as the entering condition to the fluid cooler (air-side). Input deck
! parameters are read for the low fan speed and a leaving water temperature
! is calculated.
!
! If the calculated leaving water temperature is below the setpoint,
! a fan run-time fraction (FanModeFrac) is calculated and used to determine fan power.
! The leaving water temperature setpoint is placed on the outlet node.
! If the calculated leaving water temperature is at or above
! the setpoint, the fluid cooler fan is turned on 'high speed' and the routine is
! repeated. If the calculated leaving water temperature is below the setpoint,
! a fan run-time fraction is calculated for the second stage fan and fan power
! is calculated as FanModeFrac*HighSpeedFanPower+(1-FanModeFrac)*LowSpeedFanPower.
! If the calculated leaving water temperature is above the leaving water temp.
! setpoint, the calculated leaving water temperature is placed on the outlet
! node and the fan runs at full power (High Speed Fan Power). Water mass flow
! rate is passed from inlet node to outlet node with no intervention.
! REFERENCES:
! ASHRAE HVAC1KIT: A Toolkit for Primary HVAC System Energy Calculation. 1999.
! Based on TwoSpeedTower by Dan Fisher ,Sept. 1998.
! USE STATEMENTS:
! USE FluidProperties, ONLY : GetSpecificHeatGlycol
USE DataPlant, ONLY : SingleSetpoint, DualSetpointDeadband
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER :: FluidCoolerNum
! LOGICAL, INTENT(IN) :: RunFlag
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: AirFlowRate
REAL(r64) :: UAdesign ! UA value at design conditions (entered by user) [W/C]
REAL(r64) :: OutletWaterTempOFF
REAL(r64) :: OutletWaterTemp1stStage
REAL(r64) :: OutletWaterTemp2ndStage
REAL(r64) :: FanModeFrac
REAL(r64) :: designWaterFlowRate
REAL(r64) :: FanPowerLow
REAL(r64) :: FanPowerHigh
REAL(r64) :: CpWater
REAL(r64) :: TempSetPoint
INTEGER :: LoopNum
INTEGER :: LoopSideNum
WaterInletNode = SimpleFluidCooler(FluidCoolerNum)%WaterInletNodeNum
WaterOutletNode = SimpleFluidCooler(FluidCoolerNum)%WaterOutletNodeNum
Qactual = 0.0d0
FanPower = 0.0d0
OutletWaterTemp = Node(WaterInletNode)%Temp
FanModeFrac = 0.0d0
LoopNum = SimpleFluidCooler(FluidCoolerNum)%LoopNum
LoopSideNum = SimpleFluidCooler(FluidCoolerNum)%LoopSideNum
SELECT CASE (PlantLoop(LoopNum)%LoopDemandCalcScheme)
CASE (SingleSetPoint)
TempSetPoint = PlantLoop(LoopNum)%LoopSide(LoopSideNum)%TempSetpoint
CASE (DualSetPointDeadBand)
TempSetPoint = PlantLoop(LoopNum)%LoopSide(LoopSideNum)%TempSetpointHi
END SELECT
! MassFlowTol is a parameter to indicate a no flow condition
IF(WaterMassFlowRate .LE. MassFlowTolerance .OR. PlantLoop(LoopNum)%Loopside(LoopSideNum)%FlowLock .EQ. 0)RETURN
! set local variable for fluid cooler
DesignWaterFlowRate = SimpleFluidCooler(FluidCoolerNum)%DesignWaterFlowRate
WaterMassFlowRate = Node(WaterInletNode)%MassFlowRate
OutletWaterTempOFF = Node(WaterInletNode)%Temp
OutletWaterTemp1stStage = OutletWaterTempOFF
OutletWaterTemp2ndStage = OutletWaterTempOFF
FanModeFrac = 0.0d0
IF (OutletWaterTempOFF < TempSetPoint) THEN !already there don't need to run the cooler
RETURN
ENDIF
UAdesign = SimpleFluidCooler(FluidCoolerNum)%LowSpeedFluidCoolerUA
AirFlowRate = SimpleFluidCooler(FluidCoolerNum)%LowSpeedAirFlowRate
FanPowerLow = SimpleFluidCooler(FluidCoolerNum)%LowSpeedFanPower
Call SimSimpleFluidCooler(FluidCoolerNum,WaterMassFlowRate,AirFlowRate,UAdesign,OutletWaterTemp1stStage)
IF(OutletWaterTemp1stStage .LE. TempSetPoint)THEN
! Setpoint was met with pump ON and fan ON 1st stage, calculate fan mode fraction
IF (OutletWaterTemp1stStage /= OutletWaterTempOFF) THEN ! don't divide by zero
FanModeFrac = (TempSetPoint-OutletWaterTempOFF)/(OutletWaterTemp1stStage-OutletWaterTempOFF)
ENDIF
FanPower = FanModeFrac * FanPowerLow
OutletWaterTemp = TempSetPoint
Qactual = Qactual * FanModeFrac
ELSE
! Setpoint was not met, turn on fluid cooler 2nd stage fan
UAdesign = SimpleFluidCooler(FluidCoolerNum)%HighSpeedFluidCoolerUA
AirFlowRate = SimpleFluidCooler(FluidCoolerNum)%HighSpeedAirFlowRate
FanPowerHigh = SimpleFluidCooler(FluidCoolerNum)%HighSpeedFanPower
Call SimSimpleFluidCooler(FluidCoolerNum,WaterMassFlowRate,AirFlowRate,UAdesign,OutletWaterTemp2ndStage)
IF((OutletWaterTemp2ndStage .LE. TempSetPoint).AND. UAdesign .GT. 0.0d0)THEN
! Setpoint was met with pump ON and fan ON 2nd stage, calculate fan mode fraction
FanModeFrac = (TempSetPoint-OutletWaterTemp1stStage)/(OutletWaterTemp2ndStage-OutletWaterTemp1stStage)
FanPower = MAX((FanModeFrac * FanPowerHigh) + (1.d0-FanModeFrac)*FanPowerLow, 0.0D0)
OutletWaterTemp = TempSetPoint
ELSE
! Setpoint was not met, fluid cooler ran at full capacity
OutletWaterTemp = OutletWaterTemp2ndStage
FanPower = FanPowerHigh
END IF
END IF
CpWater = GetSpecificHeatGlycol(PlantLoop(SimpleFluidCooler(FluidCoolerNum)%LoopNum)%FluidName, &
Node(WaterInletNode)%Temp, &
PlantLoop(SimpleFluidCooler(FluidCoolerNum)%LoopNum)%FluidIndex, &
'TwoSpeedFluidCooler')
Qactual = WaterMassFlowRate * CpWater * (Node(WaterInletNode)%Temp - OutletWaterTemp)
RETURN
END SUBROUTINE TwoSpeedFluidCooler