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) | :: | LoopNum | |||
integer, | intent(in) | :: | LoopSideNum | |||
integer, | intent(in) | :: | BranchNum | |||
integer, | intent(in) | :: | CompNum | |||
real(kind=r64), | intent(inout) | :: | ChangeInLoad |
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 AdjustChangeInLoadByHowServed( LoopNum, LoopSideNum, BranchNum, CompNum, ChangeInLoad)
! SUBROUTINE INFORMATION:
! AUTHOR B. Griffith
! DATE WRITTEN Nov 2011
! MODIFIED March 2012, B. Griffith add controls for free cooling heat exchanger overrides of chillers
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! central place to apply limits to machine load dispatch based on how the machine serves loads
! METHODOLOGY EMPLOYED:
! Components are machines on plant equipment operation lists. Need to make adjustments to the
! load dispatch to account for limits and floating capacities.
!
! REFERENCES:
! na
! USE STATEMENTS:
! USE EconomizerHeatExchanger, ONLY: GetEconHeatExchangerCurrentCapacity
USE DataLoopNode, ONLY: Node
USE DataEnvironment, ONLY : OutDryBulbTemp, OutWetBulbTemp
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: LoopNum ! component topology
INTEGER, INTENT(IN) :: LoopSideNum ! component topology
INTEGER, INTENT(IN) :: BranchNum ! component topology
INTEGER, INTENT(IN) :: CompNum ! component topology
REAL(r64), INTENT(INOUT) :: ChangeInLoad ! positive magnitude of load change
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: CurMassFlowRate = 0.d0
REAL(r64) :: ToutLowLimit = 0.d0
REAL(r64) :: ToutHiLimit = 0.d0
REAL(r64) :: TinLowLimit = 0.d0
REAL(r64) :: Tinlet = 0.d0
REAL(r64) :: Tsensor = 0.d0
REAL(r64) :: CurSpecHeat = 0.d0
REAL(r64) :: QdotTmp = 0.d0
INTEGER :: ControlNodeNum = 0
!start of bad band-aid, need a general and comprehensive approach for determining current capacity of all kinds of equipment
! Need to truncate the load down in case outlet temperature will hit a lower/upper limit
SELECT CASE(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%HowLoadServed)
!Chillers
CASE(HowMet_ByNominalCapLowOutLimit) ! chillers with lower limit on outlet temperature
!- Retrieve data from the plant loop data structure
CurMassFlowRate = Node(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn)%MassFlowRate
ToutLowLimit = PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%MinOutletTemp
Tinlet = Node(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn)%Temp
CurSpecHeat = GetSpecificHeatGlycol(PlantLoop(LoopNum)%FluidName,Tinlet,PlantLoop(LoopNum)%FluidIndex, &
'PlantCondLoopOperation:DistributePlantLoad')
QdotTmp = CurMassFlowRate*CurSpecHeat*(Tinlet-ToutLowLimit)
! !- Don't correct if Q is zero, as this could indicate a component which this hasn't been implemented or not yet turned on
IF(CurMassFlowRate > 0.d0) THEN
ChangeInLoad = MIN(ChangeInLoad,QdotTmp)
ENDIF
CASE(HowMet_ByNominalCapFreeCoolCntrl)
! for chillers with free cooling shutdown (HeatExchanger:Hydronic currently)
! determine if free cooling controls shut off chiller
TinLowLimit = PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%FreeCoolCntrlMinCntrlTemp
SELECT CASE (PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%FreeCoolCntrlMode)
CASE (FreeCoolControlMode_WetBulb)
Tsensor = OutWetBulbTemp
CASE (FreeCoolControlMode_DryBulb)
Tsensor = OutDryBulbTemp
CASE (FreeCoolControlMode_Loop)
ControlNodeNum = PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%FreeCoolCntrlNodeNum
IF (ControlNodeNum > 0) THEN
Tsensor = Node(ControlNodeNum)%TempLastTimestep ! use lagged value for stability
ELSE
Tsensor = 23.d0
ENDIF
END SELECT
IF (Tsensor < TinLowLimit) THEN ! turn off chiller to initiate free cooling
ChangeInLoad = 0.d0
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%Available = .FALSE.
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%FreeCoolCntrlShutDown = .TRUE.
ELSE
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%Available = .TRUE.
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%FreeCoolCntrlShutDown = .FALSE.
ENDIF
CASE(HowMet_ByNominalCapLowOutLimitFreeCoolCntrl)
! for chillers with free cooling shutdown (HeatExchanger:Hydronic currently)
! determine if free cooling controls shut off chiller
TinLowLimit = PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%FreeCoolCntrlMinCntrlTemp
SELECT CASE (PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%FreeCoolCntrlMode)
CASE (FreeCoolControlMode_WetBulb)
Tsensor = OutWetBulbTemp
CASE (FreeCoolControlMode_DryBulb)
Tsensor = OutDryBulbTemp
CASE (FreeCoolControlMode_Loop)
ControlNodeNum = PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%FreeCoolCntrlNodeNum
IF (ControlNodeNum > 0) THEN
Tsensor = Node(ControlNodeNum)%TempLastTimestep ! use lagged value for stability
ELSE
Tsensor = 23.d0
ENDIF
END SELECT
IF (Tsensor < TinLowLimit) THEN ! turn off chiller to initiate free cooling
ChangeInLoad = 0.d0
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%Available = .FALSE.
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%FreeCoolCntrlShutDown = .TRUE.
ELSE
!- Retrieve data from the plant loop data structure
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%Available = .TRUE.
PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%FreeCoolCntrlShutDown = .FALSE.
CurMassFlowRate = Node(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn)%MassFlowRate
ToutLowLimit = PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%MinOutletTemp
Tinlet = Node(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn)%Temp
CurSpecHeat = GetSpecificHeatGlycol(PlantLoop(LoopNum)%FluidName,Tinlet,PlantLoop(LoopNum)%FluidIndex, &
'PlantCondLoopOperation:DistributePlantLoad')
QdotTmp = CurMassFlowRate*CurSpecHeat*(Tinlet-ToutLowLimit)
! !- Don't correct if Q is zero, as this could indicate a component which this hasn't been implemented or not yet turned on
IF(CurMassFlowRate > 0.d0) THEN
ChangeInLoad = MIN(ChangeInLoad,QdotTmp)
ENDIF
ENDIF
CASE(HowMet_ByNominalCapHiOutLimit) ! boilers with upper limit on outlet temperature
!- Retrieve data from the plant loop data structure
CurMassFlowRate = Node(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn)%MassFlowRate
ToutHiLimit = PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%MaxOutletTemp
Tinlet = Node(PlantLoop(LoopNum)%LoopSide(LoopSideNum)%Branch(BranchNum)%Comp(CompNum)%NodeNumIn)%Temp
CurSpecHeat = GetSpecificHeatGlycol(PlantLoop(LoopNum)%FluidName,Tinlet,PlantLoop(LoopNum)%FluidIndex, &
'PlantCondLoopOperation:DistributePlantLoad')
QdotTmp = CurMassFlowRate*CurSpecHeat*(ToutHiLimit - Tinlet)
IF(CurMassFlowRate> 0.d0) THEN
ChangeInLoad = MIN(ChangeInLoad,QdotTmp)
ENDIF
CASE (HowMet_PassiveCap) ! need to estimate current capacity if more or less passive devices ??
CASE DEFAULT
END SELECT
RETURN
END SUBROUTINE AdjustChangeInLoadByHowServed