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) | :: | EvapFluidCoolerNum |
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 UpdateEvapFluidCooler(EvapFluidCoolerNum)
! SUBROUTINE INFORMATION:
! AUTHOR: Chandan Sharma
! DATE WRITTEN: May 2009
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for passing results to the outlet water node.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
!unused0909 USE DataEnvironment, ONLY: EnvironmentName, CurMnDy
USE General, ONLY: TrimSigDigits
! USE FluidProperties, ONLY : GetDensityGlycol
! USE DataPlant, ONLY: PlantLoop
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: EvapFluidCoolerNum
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: LowTempFmt="(' ',F6.2)"
REAL(r64), PARAMETER :: TempAllowance = 0.02d0 ! Minimum difference b/w fluid cooler water outlet temp and
! minimum condenser loop temp [C]
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
CHARACTER(len=25) :: CharErrOut
CHARACTER(len=25) :: CharLowOutletTemp
REAL(r64) :: TempDifference
INTEGER :: LoopNum
INTEGER :: LoopSideNum
REAL(r64) :: LoopMinTemp
! set node information
Node(WaterOutletNode)%Temp = OutletWaterTemp
LoopNum = SimpleEvapFluidCooler(EvapFluidCoolerNum)%LoopNum
LoopSideNum = SimpleEvapFluidCooler(EvapFluidCoolerNum)%LoopSideNum
IF(PlantLoop(LoopNum)%Loopside(LoopSideNum)%FlowLock.EQ.0 .OR. WarmupFlag)RETURN
! Check flow rate through evaporative fluid cooler and compare to design flow rate,
! show warning if greater than Design * Mulitplier
IF (Node(WaterOutletNode)%MassFlowRate .GT. SimpleEvapFluidCooler(EvapFluidCoolerNum)%DesWaterMassFlowRate * &
SimpleEvapFluidCooler(EvapFluidCoolerNum)%EvapFluidCoolerMassFlowRateMultiplier) THEN
SimpleEvapFluidCooler(EvapFluidCoolerNum)%HighMassFlowErrorCount= &
SimpleEvapFluidCooler(EvapFluidCoolerNum)%HighMassFlowErrorCount+1
IF (SimpleEvapFluidCooler(EvapFluidCoolerNum)%HighMassFlowErrorCount < 2) THEN
CALL ShowWarningError (TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%EvapFluidCoolerType)//' "'// &
TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%Name)//'"')
CALL ShowContinueError &
(' Condenser Loop Mass Flow Rate is much greater than the evaporative fluid coolers design mass flow rate.')
CALL ShowContinueError (' Condenser Loop Mass Flow Rate = '//TrimSigDigits(Node(WaterOutletNode)%MassFlowRate,6))
CALL ShowContinueError (' Evaporative Fluid Cooler Design Mass Flow Rate = '// &
TrimSigDigits(SimpleEvapFluidCooler(EvapFluidCoolerNum)%DesWaterMassFlowRate,6))
CALL ShowContinueErrorTimeStamp(' ')
ELSE
CALL ShowRecurringWarningErrorAtEnd(TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%EvapFluidCoolerType)// &
' "'//TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%Name)//&
'" Condenser Loop Mass Flow Rate is much greater than the evaporative fluid coolers design mass flow rate error' &
, SimpleEvapFluidCooler(EvapFluidCoolerNum)%HighMassFlowErrorIndex, &
Node(WaterOutletNode)%MassFlowRate, Node(WaterOutletNode)%MassFlowRate)
ENDIF
END IF
! Check if OutletWaterTemp is below the minimum condenser loop temp and warn user
LoopMinTemp = PlantLoop(LoopNum)%MinTemp
TempDifference = PlantLoop(LoopNum)%MinTemp - OutletWaterTemp
IF (TempDifference.GT.TempAllowance .AND. WaterMassFlowRate > 0.0d0) THEN
SimpleEvapFluidCooler(EvapFluidCoolerNum)%OutletWaterTempErrorCount = &
SimpleEvapFluidCooler(EvapFluidCoolerNum)%OutletWaterTempErrorCount + 1
WRITE(CharLowOutletTemp,LowTempFmt) LoopMinTemp
WRITE(CharErrOut,LowTempFmt) OutletWaterTemp
CharErrOut=ADJUSTL(CharErrOut)
IF (SimpleEvapFluidCooler(EvapFluidCoolerNum)%OutletWaterTempErrorCount < 2) THEN
CALL ShowWarningError (TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%EvapFluidCoolerType)// &
' "'//TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%Name)//'"')
CALL ShowContinueError ('Evaporative fluid cooler water outlet temperature ('//TRIM(CharErrOut)//' C) is '// &
'below the specified minimum condenser loop temp of '//TRIM(ADJUSTL(CharLowOutletTemp))//' C')
CALL ShowContinueErrorTimeStamp(' ')
ELSE
CALL ShowRecurringWarningErrorAtEnd(TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%EvapFluidCoolerType)// &
' "'//TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%Name)//&
'" Evaporative fluid cooler water outlet temperature is below the specified minimum condenser loop temp error' &
, SimpleEvapFluidCooler(EvapFluidCoolerNum)%OutletWaterTempErrorIndex, OutletWaterTemp, OutletWaterTemp)
END IF
END IF
! Check if water mass flow rate is small (e.g. no flow) and warn user
IF(WaterMassFlowRate .GT. 0.0d0 .AND. WaterMassFlowRate .LE. MassFlowTolerance)THEN
SimpleEvapFluidCooler(EvapFluidCoolerNum)%SmallWaterMassFlowErrorCount = &
SimpleEvapFluidCooler(EvapFluidCoolerNum)%SmallWaterMassFlowErrorCount + 1
IF (SimpleEvapFluidCooler(EvapFluidCoolerNum)%SmallWaterMassFlowErrorCount < 2) THEN
CALL ShowWarningError (TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%EvapFluidCoolerType)// &
' "'//TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%Name)//'"')
CALL ShowContinueError ('Evaporative fluid cooler water mass flow rate near zero.')
CALL ShowContinueErrorTimeStamp(' ')
CALL ShowContinueError('Actual Mass flow = '//TRIM(TrimSigDigits(WaterMassFlowRate,2)))
ELSE
CALL ShowRecurringWarningErrorAtEnd(TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%EvapFluidCoolerType)// &
' "'//TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%Name)//&
'" Evaporative fluid cooler water mass flow rate near zero error continues...' &
, SimpleEvapFluidCooler(EvapFluidCoolerNum)%SmallWaterMassFlowErrorIndex, WaterMassFlowRate, WaterMassFlowRate)
ENDIF
END IF
! ! Check if water mass flow rate is lower than loop minimum and warn user
! IF(WaterMassFlowRate .LT. LoopMassFlowRateMinAvail)THEN
! SimpleEvapFluidCooler(EvapFluidCoolerNum)%WMFRLessThanMinAvailErrCount = &
! SimpleEvapFluidCooler(EvapFluidCoolerNum)%WMFRLessThanMinAvailErrCount + 1
! IF (SimpleEvapFluidCooler(EvapFluidCoolerNum)%WMFRLessThanMinAvailErrCount < 2) THEN
! CALL ShowWarningError (TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%EvapFluidCoolerType)// &
! ' "'//TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%Name)//'"')
! CALL ShowContinueError ('Evaporative fluid cooler water mass flow below loop minimum.')
! CALL ShowContinueErrorTimeStamp(' ')
! CALL ShowContinueError('Actual Mass flow = '//TRIM(TrimSigDigits(WaterMassFlowRate,2)))
! CALL ShowContinueError('Loop Minimum flow = '//TRIM(TrimSigDigits(LoopMassFlowRateMinAvail,2)))
! ELSE
! CALL ShowRecurringWarningErrorAtEnd(TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%EvapFluidCoolerType)// &
! ' "'//TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%Name)//&
! '" Evaporative fluid cooler water mass flow rate below loop minimum error continues...' &
! , SimpleEvapFluidCooler(EvapFluidCoolerNum)%WMFRLessThanMinAvailErrIndex, WaterMassFlowRate, WaterMassFlowRate)
! ENDIF
! END IF
!
! ! Check if water mass flow rate is greater than loop maximum and warn user
! IF(WaterMassFlowRate .GT. LoopMassFlowRateMaxAvail)THEN
! SimpleEvapFluidCooler(EvapFluidCoolerNum)%WMFRGreaterThanMaxAvailErrCount = &
! SimpleEvapFluidCooler(EvapFluidCoolerNum)%WMFRGreaterThanMaxAvailErrCount + 1
! IF (SimpleEvapFluidCooler(EvapFluidCoolerNum)%WMFRGreaterThanMaxAvailErrCount < 2) THEN
! CALL ShowWarningError (TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%EvapFluidCoolerType)// &
! ' "'//TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%Name)//'"')
! CALL ShowContinueError ('Evaporative fluid cooler water mass flow above loop maximum.')
! CALL ShowContinueErrorTimeStamp(' ')
! CALL ShowContinueError('Actual Mass flow = '//TRIM(TrimSigDigits(WaterMassFlowRate,2)))
! CALL ShowContinueError('Loop Maximum flow = '//TRIM(TrimSigDigits(LoopMassFlowRateMaxAvail,2)))
! ELSE
! CALL ShowRecurringWarningErrorAtEnd(TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%EvapFluidCoolerType)//' "'// &
! TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%Name)//&
! '" Evaporative fluid cooler water mass flow rate above loop maximum error continues...' &
! , SimpleEvapFluidCooler(EvapFluidCoolerNum)%WMFRGreaterThanMaxAvailErrIndex, WaterMassFlowRate, WaterMassFlowRate)
! ENDIF
! END IF
RETURN
END SUBROUTINE UpdateEvapFluidCooler