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) | :: | ChillNum | |||
real(kind=r64), | intent(in) | :: | MyLoad | |||
logical, | intent(in) | :: | RunFlag | |||
logical, | intent(in) | :: | FirstIteration | |||
integer, | intent(in) | :: | EquipFlowCtrl |
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 CalcIndirectAbsorberModel(ChillNum,MyLoad,Runflag,FirstIteration,EquipFlowCtrl)
! SUBROUTINE INFORMATION:
! AUTHOR R. Raustad (FSEC)
! DATE WRITTEN May 2008
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! simulate a vapor compression Absorber using a revised BLAST model
! METHODOLOGY EMPLOYED:
! curve fit of performance data:
! REFERENCES:
! 1. BLAST User Manual
! 2. Absorber User Manual
! USE STATEMENTS:
USE FluidProperties
USE General, ONLY : TrimSigDigits, RoundSigDigits
USE DataPlant, ONLY : DeltaTemptol,PlantLoop,CompSetPtBasedSchemeType, &
SingleSetpoint, DualSetpointDeadband
USE DataBranchAirLoopPlant, ONLY : ControlType_SeriesActive, MassFlowTolerance
USE DataGlobals, ONLY : BeginEnvrnFlag, SecInHour, WarmupFlag
USE CurveManager, ONLY : CurveValue
USE DataHVACGlobals, ONLY : FirstTimeStepSysFlag, TimeStepSys
USE DataEnvironment, ONLY : OutBaroPress
USE PlantUtilities, ONLY : SetComponentFlowRate, RegisterPlantCompDesignFlow
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ChillNum ! Absorber number
REAL(r64),INTENT(IN) :: MyLoad ! operating load
LOGICAL, INTENT(IN) :: RunFlag ! TRUE when Absorber operating
LOGICAL, INTENT(IN) :: FirstIteration ! TRUE when first iteration of timestep !unused1208
INTEGER, INTENT(IN) :: EquipFlowCtrl ! Flow control mode for the equipment
! SUBROUTINE PARAMETER DEFINITIONS:
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: MinPartLoadRat ! min allowed operating frac full load
REAL(r64) :: MaxPartLoadRat ! max allowed operating frac full load
REAL(r64) :: TempCondIn ! C - (BLAST ADJTC(1)The design secondary loop fluid
REAL(r64) :: EvapInletTemp ! C - evaporator inlet temperature, water side
REAL(r64) :: CondInletTemp ! C - condenser inlet temperature, water side
REAL(r64) :: TempEvapOut ! C - evaporator outlet temperature, water side
REAL(r64) :: TempEvapOutSetpoint ! C - evaporator outlet temperature setpoint
REAL(r64) :: AbsorberNomCap ! Absorber nominal capacity
REAL(r64) :: NomPumpPower ! Absorber nominal pumping power
REAL(r64) :: PartLoadRat ! part load ratio for efficiency calc
REAL(r64) :: OperPartLoadRat ! Operating part load ratio
REAL(r64) :: EvapDeltaTemp ! C - evaporator temperature difference, water side
REAL(r64) :: TempLowLimitEout ! C - Evaporator low temp. limit cut off
REAL(r64) :: HeatInputRat ! genertaor heat input ratio
REAL(r64) :: ElectricInputRat ! energy input ratio
INTEGER :: EvapInletNode ! evaporator inlet node number, water side
INTEGER :: EvapOutletNode ! evaporator outlet node number, water side
INTEGER :: CondInletNode ! condenser inlet node number, water side
INTEGER :: CondOutletNode ! condenser outlet node number, water side
INTEGER :: GeneratorInletNode ! generator inlet node number, steam/water side
INTEGER :: GeneratorOutletNode ! generator outlet node number, steam/water side
REAL(r64) :: EnthSteamOutDry ! enthalpy of dry steam at generator inlet
REAL(r64) :: EnthSteamOutWet ! enthalpy of wet steam at generator inlet
REAL(r64) :: HfgSteam ! heat of vaporization of steam
LOGICAL,ALLOCATABLE,DIMENSION(:),SAVE :: MyEnvironFlag
LOGICAL,ALLOCATABLE,DIMENSION(:),SAVE :: MyEnvironSteamFlag
LOGICAL, SAVE :: OneTimeFlag = .true.
REAL(r64) :: FRAC ! fraction of time step chiller cycles
LOGICAL,SAVE :: PossibleSubCooling ! flag to determine if supply water temperature is below setpoint
REAL(r64) :: CpFluid ! specific heat of generator fluid
REAL(r64) :: SteamDeltaT ! temperature difference of fluid through generator
REAL(r64) :: SteamDensity ! density of steam
REAL(r64) :: SteamOutletTemp ! generator outlet temperature
REAL(r64) :: CapacityfAbsorberTemp ! performance curve output
REAL(r64) :: CapacityfEvaporatorTemp ! performance curve output
REAL(r64) :: CapacityfGeneratorTemp ! performance curve output
REAL(r64) :: HeatInputfCondTemp ! performance curve output
REAL(r64) :: HeatInputfEvapTemp ! performance curve output
REAL(r64) :: TempWaterAtmPress ! temperature of condensed steam leaving generator (after condensate trap)
REAL(r64) :: TempLoopOutToPump ! temperature of condensed steam entering pump (includes loop losses)
REAL(r64) :: EnthAtAtmPress ! enthalpy of condensed steam leaving generator (after condensate trap)
REAL(r64) :: EnthPumpInlet ! enthalpy of condensed steam entering pump (includes loop losses)
INTEGER :: LoopSideNum
INTEGER :: LoopNum
INTEGER :: DummyWaterIndex = 1
IF (OneTimeFlag) THEN
ALLOCATE(MyEnvironFlag(NumIndirectAbsorbers))
ALLOCATE(MyEnvironSteamFlag(NumIndirectAbsorbers))
MyEnvironFlag=.true.
MyEnvironSteamFlag=.true.
OneTimeFlag=.false.
ENDIF
!set module level inlet and outlet nodes
EvapMassFlowRate = 0.0d0
CondMassFlowRate = 0.0d0
GenMassFlowRate = 0.0d0
QCondenser = 0.0d0
QEvaporator = 0.0d0
QGenerator = 0.0d0
PumpingEnergy = 0.0d0
CondenserEnergy = 0.0d0
EvaporatorEnergy = 0.0d0
GeneratorEnergy = 0.0d0
PumpingPower = 0.0d0
FRAC = 1.0d0
ChillerONOFFCyclingFrac = 0.0d0
EvapInletNode = IndirectAbsorber(ChillNum)%EvapInletNodeNum
EvapOutletNode = IndirectAbsorber(ChillNum)%EvapOutletNodeNum
CondInletNode = IndirectAbsorber(ChillNum)%CondInletNodeNum
CondOutletNode = IndirectAbsorber(ChillNum)%CondOutletNodeNum
GeneratorInletNode = IndirectAbsorber(ChillNum)%GeneratorInletNodeNum
GeneratorOutletNode = IndirectAbsorber(ChillNum)%GeneratorOutletNodeNum
! If no loop demand or Absorber OFF, return
IF(MyLoad >= 0.0d0 .OR. .NOT. RunFlag) THEN
IF(EquipFlowCtrl == ControlType_SeriesActive) EvapMassFlowRate = Node(EvapInletNode)%MassFlowrate
RETURN
END IF
! Warn if entering condenser water temperature is below minimum
IF(Node(CondInletNode)%Temp .LT. IndirectAbsorber(ChillNum)%MinCondInletTemp)THEN
IF(.NOT. WarmupFlag)THEN
IF(IndirectAbsorber(ChillNum)%MinCondInletTempCtr .LT. 1)THEN
IndirectAbsorber(ChillNum)%MinCondInletTempCtr = IndirectAbsorber(ChillNum)%MinCondInletTempCtr + 1
CALL ShowWarningError('Chiller:Absorption:Indirect "'//TRIM(IndirectAbsorber(ChillNum)%Name)//'"')
CALL ShowContinueError('...Entering condenser water temperature below specified minimum ('// &
TRIM(RoundSigDigits(IndirectAbsorber(ChillNum)%MinCondInletTemp,3))//' C).')
CALL ShowContinueError('...Entering condenser water temperature = ' &
//TRIM(RoundSigDigits(Node(CondInletNode)%Temp,3))//' C.')
CALL ShowContinueErrorTimeStamp('...simulation continues.')
ELSE
CALL ShowRecurringWarningErrorAtEnd('Entering condenser water temperature below specified minimum error continues.', &
IndirectAbsorber(ChillNum)%MinCondInletTempIndex,Node(CondInletNode)%Temp, &
Node(CondInletNode)%Temp)
END IF
END IF
END IF
! Warn if entering generator fluid temperature is below minimum
IF(GeneratorInletNode .GT. 0)THEN
IF(Node(GeneratorInletNode)%Temp .LT. IndirectAbsorber(ChillNum)%MinGeneratorInletTemp)THEN
IF(.NOT. WarmupFlag)THEN
IF(IndirectAbsorber(ChillNum)%MinGenInletTempCtr .LT. 1)THEN
IndirectAbsorber(ChillNum)%MinGenInletTempCtr = IndirectAbsorber(ChillNum)%MinGenInletTempCtr + 1
CALL ShowWarningError('Chiller:Absorption:Indirect "'//TRIM(IndirectAbsorber(ChillNum)%Name)//'"')
CALL ShowContinueError('...Entering generator fluid temperature below specified minimum ('// &
TRIM(RoundSigDigits(IndirectAbsorber(ChillNum)%MinGeneratorInletTemp,3))//' C).')
CALL ShowContinueError('...Entering generator fluid temperature = ' &
//TRIM(RoundSigDigits(Node(GeneratorInletNode)%Temp,3))//' C.')
CALL ShowContinueErrorTimeStamp('...simulation continues.')
ELSE
CALL ShowRecurringWarningErrorAtEnd('Entering generator fluid temperature below specified minimum error continues.', &
IndirectAbsorber(ChillNum)%MinGenInletTempIndex,Node(GeneratorInletNode)%Temp, &
Node(GeneratorInletNode)%Temp)
END IF
END IF
END IF
END IF
! Set module level Absorber inlet and temperature variables
EvapInletTemp = Node(EvapInletNode)%Temp
CondInletTemp = Node(CondInletNode)%Temp
! Set the condenser mass flow rates
CondMassFlowRate = Node(CondInletNode)%MassFlowRate
! LOAD LOCAL VARIABLES FROM DATA STRUCTURE (for code readability)
MinPartLoadRat = IndirectAbsorber(ChillNum)%MinPartLoadRat
MaxPartLoadRat = IndirectAbsorber(ChillNum)%MaxPartLoadRat
AbsorberNomCap = IndirectAbsorber(ChillNum)%NomCap
NomPumpPower = IndirectAbsorber(ChillNum)%NomPumpPower
TempCondIn = Node(IndirectAbsorber(ChillNum)%CondInletNodeNum)%Temp
TempEvapOut = Node(IndirectAbsorber(ChillNum)%EvapOutletNodeNum)%Temp
TempLowLimitEout = IndirectAbsorber(ChillNum)%TempLowLimitEvapOut
LoopNum = IndirectAbsorber(ChillNum)%CWLoopNum
LoopSideNum = IndirectAbsorber(ChillNum)%CWLoopSideNum
CpFluid = GetSpecificHeatGlycol(PlantLoop(IndirectAbsorber(ChillNum)%CWLoopNum)%FluidName, &
EvapInletTemp, &
PlantLoop(IndirectAbsorber(ChillNum)%CWLoopNum)%FluidIndex, &
'CalcIndirectAbsorberModel')
IF(IndirectAbsorber(ChillNum)%CapFCondenserTempPtr .GT. 0)THEN
CapacityfAbsorberTemp = CurveValue(IndirectAbsorber(ChillNum)%CapFCondenserTempPtr, TempCondIn)
ELSE
CapacityfAbsorberTemp = 1.0d0
END IF
IF(IndirectAbsorber(ChillNum)%CapFEvaporatorTempPtr .GT. 0)THEN
CapacityfEvaporatorTemp = CurveValue(IndirectAbsorber(ChillNum)%CapFEvaporatorTempPtr, TempEvapOut)
ELSE
CapacityfEvaporatorTemp = 1.0d0
END IF
IF(IndirectAbsorber(ChillNum)%CapFGeneratorTempPtr .GT. 0)THEN
IF(GeneratorInletNode .GT. 0)THEN
IF(IndirectAbsorber(ChillNum)%GenHeatSourceType == NodeType_Water)THEN
CapacityfGeneratorTemp = CurveValue(IndirectAbsorber(ChillNum)%CapFGeneratorTempPtr, Node(GeneratorInletNode)%Temp)
ELSE
CapacityfGeneratorTemp = 1.0d0
END IF
ELSE
CapacityfGeneratorTemp = 1.0d0
END IF
ELSE
CapacityfGeneratorTemp = 1.0d0
END IF
AbsorberNomCap = AbsorberNomCap * CapacityfAbsorberTemp * CapacityfEvaporatorTemp * CapacityfGeneratorTemp
! If FlowLock is True, the new resolved mdot is used to update Power, QEvap, Qcond, and
! condenser side outlet temperature.
IF (PlantLoop(LoopNum)%Loopside(LoopSideNum)%FlowLock==0) THEN
IndirectAbsorber(ChillNum)%PossibleSubCooling = .FALSE.
QEvaporator = ABS(MyLoad)
! Either set the flow to the Constant value or caluclate the flow for the variable volume
IF((IndirectAbsorber(ChillNum)%FlowMode == ConstantFlow) &
.OR. (IndirectAbsorber(ChillNum)%FlowMode == NotModulated ))THEN
EvapMassFlowRate = Node(EvapInletNode)%MassFlowRate
IF (EvapMassFlowRate /= 0.0D0) THEN
EvapDeltaTemp = QEvaporator/EvapMassFlowRate/CpFluid
ELSE
EvapDeltaTemp = 0.0D0
ENDIF
EvapOutletTemp = Node(EvapInletNode)%Temp - EvapDeltaTemp
ELSE IF(IndirectAbsorber(ChillNum)%FlowMode == LeavingSetpointModulated)THEN
! Calculate the Delta Temp from the inlet temp to the chiller outlet setpoint
SELECT CASE (PlantLoop(IndirectAbsorber(ChillNum)%CWLoopNum)%LoopDemandCalcScheme)
CASE (SingleSetpoint)
EvapDeltaTemp = Node(EvapInletNode)%Temp - Node(EvapOutletNode)%TempSetPoint
CASE (DualSetpointDeadband)
EvapDeltaTemp = Node(EvapInletNode)%Temp - Node(EvapOutletNode)%TempSetPointHi
END SELECT
IF (EvapDeltaTemp /= 0) THEN
EvapMassFlowRate = ABS(QEvaporator/CpFluid/EvapDeltaTemp)
IF((EvapMassFlowRate - IndirectAbsorber(ChillNum)%EvapMassFlowRateMax) .GT. MassFlowTolerance) &
PossibleSubCooling = .TRUE.
!Check to see if the Maximum is exceeded, if so set to maximum
EvapMassFlowRate = MIN(IndirectAbsorber(ChillNum)%EvapMassFlowRateMax, EvapMassFlowRate)
CALL SetComponentFlowRate(EvapMassFlowRate, &
IndirectAbsorber(ChillNum)%EvapInletNodeNum, &
IndirectAbsorber(ChillNum)%EvapOutletNodeNum,&
IndirectAbsorber(ChillNum)%CWLoopNum, &
IndirectAbsorber(ChillNum)%CWLoopSideNum, &
IndirectAbsorber(ChillNum)%CWBranchNum, &
IndirectAbsorber(ChillNum)%CWCompNum)
SELECT CASE (PlantLoop(IndirectAbsorber(ChillNum)%CWLoopNum)%LoopDemandCalcScheme)
CASE (SingleSetpoint)
EvapOutletTemp = Node(EvapOutletNode)%TempSetPoint
CASE (DualSetpointDeadband)
EvapOutletTemp = Node(EvapOutletNode)%TempSetPointHi
END SELECT
ELSE
EvapMassFlowRate=0.0d0
EvapOutletTemp = Node(EvapInletNode)%Temp
CALL ShowRecurringWarningErrorAtEnd('CalcIndirectAbsorberModel: Name="'// &
TRIM(IndirectAbsorber(ChillNum)%Name)// &
'" Evaporative Condenser Delta Temperature = 0 in mass flow calculation.', &
IndirectAbsorber(ChillNum)%ErrCount2)
END IF
END IF !End of Constant Variable Flow If Block
ELSE ! If FlowLock is True
EvapMassFlowRate = Node(EvapInletNode)%MassFlowRate
IF(PossibleSubCooling) THEN
QEvaporator = ABS(MyLoad)
EvapDeltaTemp = QEvaporator/EvapMassFlowRate/CpFluid
EvapOutletTemp = Node(EvapInletNode)%Temp - EvapDeltaTemp
ELSE
SELECT CASE (PlantLoop(LoopNum)%LoopDemandCalcScheme)
CASE (SingleSetpoint)
IF ((IndirectAbsorber(ChillNum)%FlowMode == LeavingSetpointModulated) .OR. &
(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(IndirectAbsorber(ChillNum)%CWBranchNum) &
%Comp(IndirectAbsorber(ChillNum)%CWCompNum)%CurOpSchemeType &
== CompSetPtBasedSchemeType) .OR. &
(Node(EvapOutletNode)%TempSetPoint /= SensedNodeFlagValue) ) THEN
TempEvapOutSetpoint = Node(EvapOutletNode)%TempSetPoint
ELSE
TempEvapOutSetpoint = Node(PlantLoop(LoopNum)%TempSetPointNodeNum)%TempSetPoint
ENDIF
CASE (DualSetpointDeadband)
IF ((IndirectAbsorber(ChillNum)%FlowMode == LeavingSetpointModulated) .OR. &
(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(IndirectAbsorber(ChillNum)%CWBranchNum) &
%Comp(IndirectAbsorber(ChillNum)%CWCompNum)%CurOpSchemeType &
== CompSetPtBasedSchemeType) .OR. &
(Node(EvapOutletNode)%TempSetPointHi /= SensedNodeFlagValue) ) THEN
TempEvapOutSetpoint = Node(EvapOutletNode)%TempSetPointHi
ELSE
TempEvapOutSetpoint = Node(PlantLoop(LoopNum)%TempSetPointNodeNum)%TempSetPointHi
ENDIF
END SELECT
EvapDeltaTemp = Node(EvapInletNode)%Temp - TempEvapOutSetpoint
QEvaporator = ABS(EvapMassFlowRate*CpFluid*EvapDeltaTemp)
EvapOutletTemp = TempEvapOutSetpoint
END IF
!Check that the Evap outlet temp honors both plant loop temp low limit and also the chiller low limit
IF(EvapOutletTemp .LT. TempLowLimitEout) THEN
IF((Node(EvapInletNode)%Temp - TempLowLimitEout) .GT. DeltaTemptol) THEN
EvapOutletTemp = TempLowLimitEout
EvapDeltaTemp = Node(EvapInletNode)%Temp - EvapOutletTemp
QEvaporator = EvapMassFlowRate*CpFluid*EvapDeltaTemp
ELSE
EvapOutletTemp = Node(EvapInletNode)%Temp
EvapDeltaTemp = Node(EvapInletNode)%Temp - EvapOutletTemp
QEvaporator = EvapMassFlowRate*CpFluid*EvapDeltaTemp
END IF
END IF
IF(EvapOutletTemp .LT. Node(EvapOutletNode)%TempMin) THEN
IF((Node(EvapInletNode)%Temp - Node(EvapOutletNode)%TempMin) .GT. DeltaTemptol) THEN
EvapOutletTemp = Node(EvapOutletNode)%TempMin
EvapDeltaTemp = Node(EvapInletNode)%Temp - EvapOutletTemp
QEvaporator = EvapMassFlowRate*CpFluid*EvapDeltaTemp
ELSE
EvapOutletTemp = Node(EvapInletNode)%Temp
EvapDeltaTemp = Node(EvapInletNode)%Temp - EvapOutletTemp
QEvaporator = EvapMassFlowRate*CpFluid*EvapDeltaTemp
END IF
END IF
! Checks QEvaporator on the basis of the machine limits.
IF(QEvaporator > ABS(MyLoad)) Then
IF(EvapMassFlowRate > MassFlowTolerance) THEN
QEvaporator = ABS(MyLoad)
EvapDeltaTemp = QEvaporator/EvapMassFlowRate/CpFluid
EvapOutletTemp = Node(EvapInletNode)%Temp - EvapDeltaTemp
ELSE
QEvaporator = 0.0d0
EvapOutletTemp = Node(EvapInletNode)%Temp
END IF
END IF
END IF !This is the end of the FlowLock Block
OperPartLoadRat = QEvaporator/AbsorberNomCap
PartLoadRat = MAX(MinPartLoadRat,OperPartLoadRat)
IndirectAbsorberReport(ChillNum)%ChillerPartLoadRatio = OperPartLoadRat
IF(OperPartLoadRat .LT. PartLoadRat) THEN
FRAC = MIN(1.0d0,OperPartLoadRat/MinPartLoadRat)
ELSE
FRAC = 1.0d0
END IF
ChillerONOFFCyclingFrac = FRAC
IF(GeneratorInletNode .GT. 0)THEN
IF(IndirectAbsorber(ChillNum)%HeatInputFCondTempPtr .GT. 0)THEN
HeatInputfCondTemp = CurveValue(IndirectAbsorber(ChillNum)%HeatInputFCondTempPtr, Node(GeneratorInletNode)%Temp)
ELSE
HeatInputfCondTemp = 1.0d0
END IF
ELSE
HeatInputfCondTemp = 1.0d0
END IF
IF(IndirectAbsorber(ChillNum)%HeatInputFEvapTempPtr .GT. 0)THEN
HeatInputfEvapTemp = CurveValue(IndirectAbsorber(ChillNum)%HeatInputFEvapTempPtr, Node(EvapOutletNode)%Temp)
ELSE
HeatInputfEvapTemp = 1.0d0
END IF
!Calculate steam input ratio. Inlcude impact of generator and evaporator temperatures
IF(IndirectAbsorber(ChillNum)%GeneratorInputCurvePtr .GT. 0)THEN
HeatInputRat = CurveValue(IndirectAbsorber(ChillNum)%GeneratorInputCurvePtr,PartLoadRat) * &
HeatInputfCondTemp * HeatInputfEvapTemp
ELSE
HeatInputRat = HeatInputfCondTemp * HeatInputfEvapTemp
END IF
!Calculate electric input ratio
IF(IndirectAbsorber(ChillNum)%PumpPowerCurvePtr .GT. 0)THEN
ElectricInputRat = CurveValue(IndirectAbsorber(ChillNum)%PumpPowerCurvePtr,PartLoadRat)
ELSE
ElectricInputRat = 1.0d0
END IF
QGenerator = HeatInputRat * AbsorberNomCap * FRAC
PumpingPower = ElectricInputRat * NomPumpPower * FRAC
IF(EvapMassFlowRate == 0.0d0) THEN
QGenerator = 0.0d0
EvapOutletTemp = Node(EvapInletNode)%Temp
PumpingPower = 0.0d0
END IF
QCondenser = QEvaporator + QGenerator + PumpingPower
CpFluid = GetSpecificHeatGlycol(PlantLoop(IndirectAbsorber(ChillNum)%CDLoopNum)%FluidName, &
CondInletTemp, &
PlantLoop(IndirectAbsorber(ChillNum)%CDLoopNum)%FluidIndex, &
'CalcIndirectAbsorberModel')
IF (CondMassFlowRate > MassFlowTolerance) THEN
CondOutletTemp = QCondenser/CondMassFlowRate/CpFluid + CondInletTemp
ELSE
CondOutletTemp = CondInletTemp
CondMassFlowRate = 0.d0
QCondenser = 0.d0
RETURN
!V7 plant upgrade, no longer fatal here anymore... set some things and return
END IF
IF(GeneratorInletNode .GT. 0)THEN
! Hot water plant is used for the generator
IF(IndirectAbsorber(ChillNum)%GenHeatSourceType == NodeType_Water)THEN
CpFluid = GetSpecificHeatGlycol(PlantLoop(IndirectAbsorber(ChillNum)%GenLoopNum)%FluidName, &
Node(GeneratorInletNode)%Temp, &
PlantLoop(IndirectAbsorber(ChillNum)%GenLoopNum)%FluidIndex, &
'CalcIndirectAbsorberModel')
IF (( IndirectAbsorber(ChillNum)%FlowMode == ConstantFlow) &
.OR. (IndirectAbsorber(ChillNum)%FlowMode == NotModulated ) ) THEN
GenMassFlowRate = IndirectAbsorber(ChillNum)%GenMassFlowRateMax
ELSE
GenMassFlowRate = QGenerator/CpFluid/IndirectAbsorber(ChillNum)%GeneratorDeltaTemp
END IF
Call SetComponentFlowRate(GenMassFlowRate, &
GeneratorInletNode, GeneratorOutletNode, &
IndirectAbsorber(ChillNum)%GenLoopNum, &
IndirectAbsorber(ChillNum)%GenLoopSideNum, &
IndirectAbsorber(ChillNum)%GenBranchNum, &
IndirectAbsorber(ChillNum)%GenCompNum)
IF(GenMassFlowRate .LE. 0.0d0)THEN
GenOutletTemp = Node(GeneratorInletNode)%Temp
SteamOutletEnthalpy = Node(GeneratorInletNode)%Enthalpy
ELSE
GenOutletTemp = Node(GeneratorInletNode)%Temp - QGenerator/(CpFluid*GenMassFlowRate)
SteamOutletEnthalpy = Node(GeneratorInletNode)%Enthalpy - QGenerator/GenMassFlowRate
END IF
ELSE ! using a steam plant for the generator
EnthSteamOutDry = GetSatEnthalpyRefrig('STEAM',Node(GeneratorInletNode)%Temp,1.0d0, &
IndirectAbsorber(ChillNum)%SteamFluidIndex, &
'CALC Chiller:Absorption:Indirect '//TRIM(IndirectAbsorber(ChillNum)%Name))
EnthSteamOutWet = GetSatEnthalpyRefrig('STEAM',Node(GeneratorInletNode)%Temp,0.0d0, &
IndirectAbsorber(ChillNum)%SteamFluidIndex, &
'CALC Chiller:Absorption:Indirect '//TRIM(IndirectAbsorber(ChillNum)%Name))
SteamDeltaT = IndirectAbsorber(ChillNum)%GeneratorSubCool
SteamOutletTemp = Node(GeneratorInletNode)%Temp - SteamDeltaT
HfgSteam = EnthSteamOutDry - EnthSteamOutWet
CpFluid = GetSpecificHeatGlycol('WATER', SteamOutletTemp, DummyWaterIndex, &
'CALC Chiller:Absorption:Indirect '//TRIM(IndirectAbsorber(ChillNum)%Name) )
GenMassFlowRate = QGenerator/(HfgSteam+CpFluid*SteamDeltaT)
Call SetComponentFlowRate(GenMassFlowRate, &
GeneratorInletNode, GeneratorOutletNode, &
IndirectAbsorber(ChillNum)%GenLoopNum, &
IndirectAbsorber(ChillNum)%GenLoopSideNum, &
IndirectAbsorber(ChillNum)%GenBranchNum, &
IndirectAbsorber(ChillNum)%GenCompNum)
IF(GenMassFlowRate .LE. 0.0d0)THEN
GenOutletTemp = Node(GeneratorInletNode)%Temp
SteamOutletEnthalpy = Node(GeneratorInletNode)%Enthalpy
ELSE
GenOutletTemp = Node(GeneratorInletNode)%Temp - SteamDeltaT
SteamOutletEnthalpy = GetSatEnthalpyRefrig('STEAM',Node(GeneratorInletNode)%Temp,0.0d0, &
IndirectAbsorber(ChillNum)%SteamFluidIndex, &
'Loop Losses: Chiller:Absorption:Indirect'//TRIM(IndirectAbsorber(ChillNum)%Name))
CpFluid = GetSpecificHeatGlycol('WATER', Node(GeneratorInletNode)%Temp, DummyWaterIndex, &
'CALC Chiller:Absorption:Indirect '//TRIM(IndirectAbsorber(ChillNum)%Name) )
SteamOutletEnthalpy = SteamOutletEnthalpy - CpFluid*SteamDeltaT
!************************* Loop Losses *****************************
TempWaterAtmPress = GetSatTemperatureRefrig('Steam',OutBaroPress, &
IndirectAbsorber(ChillNum)%SteamFluidIndex, &
'Loop Losses: Chiller:Absorption:Indirect'//TRIM(IndirectAbsorber(ChillNum)%Name))
EnthAtAtmPress = GetSatEnthalpyRefrig('STEAM',TempWaterAtmPress,0.0d0, &
IndirectAbsorber(ChillNum)%SteamFluidIndex, &
'Loop Losses: Chiller:Absorption:Indirect '//TRIM(IndirectAbsorber(ChillNum)%Name))
! Point 4 at atm - loop delta subcool during return journery back to pump
TempLoopOutToPump = TempWaterAtmPress - IndirectAbsorber(ChillNum)%LoopSubCool
! Reported value of coil outlet enthalpy at the node to match the node outlet temperature
EnthPumpInlet = EnthAtAtmPress - CpFluid * IndirectAbsorber(ChillNum)%LoopSubCool
! Point 3-Point 5,
EnergyLossToEnvironment=GenMassFlowRate*(SteamOutletEnthalpy-EnthPumpInlet)
!************************* Loop Losses *****************************
GenOutletTemp = TempLoopOutToPump
SteamOutletEnthalpy = EnthPumpInlet
END IF ! IF(GenMassFlowRate .LE. 0.0d0)THEN
END IF ! IF(IndirectAbsorber(ChillNum)%GenHeatSourceType == NodeType_Water)THEN
END IF ! IF(GeneratorInletNode .GT. 0)THEN
!convert power to energy
GeneratorEnergy = QGenerator * TimeStepSys * SecInHour
EvaporatorEnergy = QEvaporator * TimeStepSys * SecInHour
CondenserEnergy = QCondenser * TimeStepSys * SecInHour
PumpingEnergy = PumpingPower * TimeStepSys * SecInHour
RETURN
! ------
! / \
! / |
! 6/-------------1 - Boiler Outlet Temp/Enthalpy/Pressure
! / / /.
! / / / . \
! / / / . pressure drop (PD) across steam pressure regulator
! P / / / . /
! r 5 / / .
! e / 3-2'-------------2------ - Generator Inlet Temp/Enthalpy/Pressure
! s / |/ /
! s / | PD across / 2-2' latent heat of vaporization (neglecting amount of superheat due to PD)
! u / /| condensate / 1-3 delta H in generator
! r / / | trap / 2'-3 subcooling of hot water in generator
! e 4------/--3' / 3-3' pressure drop at generator hot-water condensate trap
! / / 3-4 loop subcooling back to loop pump
! / / 4-5 pressure/temp/enthalpy increase due to loop condensate pump
! / / 5-6 heat addition in boiler to return condensate
! / / 6-1 heat of vaporization in boiler of return condensate to steam
!____________________________________
! Enthalpy (H)
END SUBROUTINE CalcIndirectAbsorberModel