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 SingleSpeedFluidCooler(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 single-speed fan fluid cooler.
! 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.
! 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 energy being zero.
!
! When the RunFlag indicates an ON condition for thefluid 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 thefluid cooler (air-side).Thefluid cooler
! fan is turned on and design parameters are used to calculate the leaving
! water temperature.If the calculated leaving water temperature is below the setpoint,
! a fan run-time fraction 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 calculated
! leaving water temperature is placed on the outlet node and the fan runs at
! full 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 SingleSpeedTower subroutine 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 or calculated)
REAL(r64) :: OutletWaterTempOFF
REAL(r64) :: FanModeFrac
REAL(r64) :: DesignWaterFlowRate
REAL(r64) :: FanPowerOn
REAL(r64) :: CpWater
REAL(r64) :: TempSetPoint
INTEGER :: LoopNum
INTEGER :: LoopSideNum
!set inlet and outlet nodes
WaterInletNode = SimpleFluidCooler(FluidCoolerNum)%WaterInletNodeNum
WaterOutletNode = SimpleFluidCooler(FluidCoolerNum)%WaterOutletNodeNum
Qactual = 0.0d0
FanModeFrac = 0.0d0
FanPower = 0.0d0
OutletWaterTemp = Node(WaterInletNode)%Temp
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) RETURN
IF (OutletWaterTemp < TempSetPoint) THEN !already there don't need to run the cooler
RETURN
ENDIF
! Initialize local variables
DesignWaterFlowRate = SimpleFluidCooler(FluidCoolerNum)%DesignWaterFlowRate
OutletWaterTempOFF = Node(WaterInletNode)%Temp
OutletWaterTemp = OutletWaterTempOFF
UAdesign = SimpleFluidCooler(FluidCoolerNum)%HighSpeedFluidCoolerUA
AirFlowRate = SimpleFluidCooler(FluidCoolerNum)%HighSpeedAirFlowRate
FanPowerOn = SimpleFluidCooler(FluidCoolerNum)%HighSpeedFanPower
Call SimSimpleFluidCooler(FluidCoolerNum,WaterMassFlowRate,AirFlowRate,UAdesign,OutletWaterTemp)
IF(OutletWaterTemp .LE. TempSetPoint)THEN
! Setpoint was met with pump ON and fan ON, calculate run-time fraction or just wasn't needed at all
IF (OutletWaterTemp /= OutletWaterTempOFF) THEN ! don't divide by zero
FanModeFrac = (TempSetPoint-OutletWaterTempOFF)/(OutletWaterTemp-OutletWaterTempOFF)
ENDIF
FanPower = Max(FanModeFrac * FanPowerOn, 0.0D0) ! BG change
OutletWaterTemp = TempSetPoint
ELSE
! Setpoint was not met, fluid cooler ran at full capacity
FanPower = FanPowerOn
END IF
CpWater = GetSpecificHeatGlycol(PlantLoop(SimpleFluidCooler(FluidCoolerNum)%LoopNum)%FluidName, &
Node(WaterInletNode)%Temp, &
PlantLoop(SimpleFluidCooler(FluidCoolerNum)%LoopNum)%FluidIndex, &
'SingleSpeedFluidCooler')
Qactual = WaterMassFlowRate * CpWater * (Node(WaterInletNode)%Temp - OutletWaterTemp)
RETURN
END SUBROUTINE SingleSpeedFluidCooler