Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | TowerNum | |||
real(kind=r64), | intent(in) | :: | PctWaterFlow | |||
real(kind=r64), | intent(in) | :: | AirFlowRatio | |||
real(kind=r64), | intent(in) | :: | Twb | |||
real(kind=r64), | intent(in) | :: | Tr | |||
real(kind=r64), | intent(out) | :: | Approach |
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 CalcVSTowerApproach(TowerNum, PctWaterFlow, AirFlowRatio, Twb, Tr, Approach)
! FUNCTION INFORMATION:
! AUTHOR Richard Raustad, FSEC
! DATE WRITTEN Feb. 2005
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Calculate tower approach temperature (e.g. outlet water temp minus inlet air wet-bulb temp)
! given air flow ratio, water flow ratio, inlet air wet-bulb temp, and tower range.
! METHODOLOGY EMPLOYED:
! Calculation method used empirical models from CoolTools or York to determine performance
! of variable speed (variable air flow rate) cooling towers.
! REFERENCES:
!
! Benton, D.J., Bowmand, C.F., Hydeman, M., Miller, P.,
! "An Improved Cooling Tower Algorithm for the CoolToolsTM Simulation Model".
! ASHRAE Transactions 2002, V. 108, Pt. 1.
!
! York International Corporation, "YORKcalcTM Software, Chiller-Plant Energy-Estimating Program",
! Form 160.00-SG2 (0502). © 2002.
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER , INTENT(IN) :: TowerNum ! Index to cooling tower
REAL(r64) , INTENT(IN) :: AirFlowRatio ! Air flow ratio of cooling tower
REAL(r64) , INTENT(IN) :: PctWaterFlow ! Water flow ratio of cooling tower
REAL(r64) , INTENT(IN) :: Twb ! Inlet air wet-bulb temperature [C]
REAL(r64) , INTENT(IN) :: Tr ! Cooling tower range (outlet water temp minus inlet air wet-bulb temp) [C]
REAL(r64) , INTENT(OUT) :: Approach ! Calculated approach temperature [C]
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! REAL(r64) :: Twb ! Inlet air wet-bulb temperature [C] (or [F] for CoolTools Model)
! REAL(r64) :: Tr ! Cooling tower range (outlet water temp minus inlet air wet-bulb temp) [C]
! (or [F] for CoolTools Model)
REAL(r64) :: PctAirFlow = 0.0d0 ! air flow rate ratio (fan power ratio in the case of CoolTools model)
REAL(r64) :: FlowFactor = 0.0d0 ! water flow rate to air flow rate ratio (L/G) for YorkCalc model
! IF(SimpleTower(TowerNum)%TowerModelType .EQ. CoolToolsXFModel .OR. &
! SimpleTower(TowerNum)%TowerModelType .EQ. CoolToolsCFModel .OR. &
! SimpleTower(TowerNum)%TowerModelType .EQ. YorkCalcModel)THEN
! Twb = (TwbIN * 1.8) + 32.0 ! Convert Celsius to Fahrenheit for CoolTools Model
! Tr = (TrIN * 1.8)
! Convert air flow rate ratio to fan power ratio for CoolTools Model
! IF(SimpleTower(TowerNum)%TowerModelType .NE. YorkCalcModel)PctAirFlow = (AirFlowRatio)**3.0
! ELSE
! Twb = TwbIN
! Tr = TrIN
! IF(SimpleTower(TowerNum)%TowerModelType .NE. YorkCalcUserDefined)PctAirFlow = (AirFlowRatio)**3.0
! END IF
IF(SimpleTower(TowerNum)%TowerModelType .EQ. YorkCalcModel .OR. &
SimpleTower(TowerNum)%TowerModelType .EQ. YorkCalcUserDefined)THEN
PctAirFlow = AirFlowRatio
FlowFactor = PctWaterFlow / PctAirFlow
Approach = VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(1) + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(2) * Twb + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(3) * Twb * Twb + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(4) * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(5) * Twb * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(6) * Twb * Twb * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(7) * Tr * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(8) * Twb * Tr * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(9) * Twb * Twb * Tr * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(10) * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(11) * Twb * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(12) * Twb * Twb * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(13) * Tr * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(14) * Twb * Tr * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(15) * Twb * Twb * Tr * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(16) * Tr * Tr * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(17) * Twb * Tr * Tr * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(18) * Twb * Twb * Tr * Tr * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(19) * FlowFactor * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(20) * Twb * FlowFactor * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(21) * Twb * Twb * FlowFactor * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(22) * Tr * FlowFactor * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(23) * Twb * Tr * FlowFactor * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(24) * Twb * Twb * Tr * FlowFactor * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(25) * Tr * Tr * FlowFactor * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(26) * Twb * Tr * Tr * FlowFactor * FlowFactor + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(27) * Twb * Twb * Tr * Tr * FlowFactor * FlowFactor
ELSE ! empirical model is CoolTools format
! the CoolTools model actually uses PctFanPower = AirFlowRatio^3 as an input to the model
PctAirFlow = (AirFlowRatio)**3
Approach = VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(1) + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(2) * PctAirFlow + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(3) * PctAirFlow * PctAirFlow + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(4) * PctAirFlow * PctAirFlow * PctAirFlow + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(5) * PctWaterFlow + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(6) * PctAirFlow * PctWaterFlow + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(7) * PctAirFlow * PctAirFlow * PctWaterFlow + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(8) * PctWaterFlow * PctWaterFlow + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(9) * PctAirFlow * PctWaterFlow * PctWaterFlow + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(10) * PctWaterFlow * PctWaterFlow * PctWaterFlow + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(11) * Twb + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(12) * PctAirFlow * Twb + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(13) * PctAirFlow * PctAirFlow * Twb + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(14) * PctWaterFlow * Twb + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(15) * PctAirFlow * PctWaterFlow * Twb + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(16) * PctWaterFlow * PctWaterFlow * Twb + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(17) * Twb * Twb + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(18) * PctAirFlow * Twb * Twb + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(19) * PctWaterFlow * Twb * Twb + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(20) * Twb * Twb * Twb + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(21) * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(22) * PctAirFlow * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(23) * PctAirFlow * PctAirFlow * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(24) * PctWaterFlow * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(25) * PctAirFlow * PctWaterFlow * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(26) * PctWaterFlow * PctWaterFlow * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(27) * Twb * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(28) * PctAirFlow * Twb * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(29) * PctWaterFlow * Twb * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(30) * Twb * Twb * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(31) * Tr * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(32) * PctAirFlow * Tr * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(33) * PctWaterFlow * Tr * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(34) * Twb * Tr * Tr + &
VSTower(SimpleTower(TowerNum)%VSTower)%Coeff(35) * Tr * Tr * Tr
END IF
! capping approach to 0 results in failure of RegulaFalsi routine
! Approach = MAX(0.0, Approach)
! IF(SimpleTower(TowerNum)%TowerModelType .EQ. CoolToolsXFModel .OR. &
! SimpleTower(TowerNum)%TowerModelType .EQ. CoolToolsCFModel .OR. &
! SimpleTower(TowerNum)%TowerModelType .EQ. YorkCalcModel)THEN
! Approach = (Approach / 1.8) ! Convert from Fahrenheit to Celsius
! END IF
END SUBROUTINE CalcVSTowerApproach