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) | :: | FurnaceNum | |||
integer, | intent(in) | :: | ZoneNum | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
integer, | intent(in) | :: | AirLoopNum | |||
real(kind=r64), | intent(inout) | :: | OnOffAirFlowRatio | |||
integer, | intent(in) | :: | OpMode | |||
real(kind=r64), | intent(in) | :: | QZnReq | |||
real(kind=r64), | intent(in) | :: | MoistureLoad | |||
real(kind=r64), | intent(inout) | :: | PartLoadRatio |
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 SetOnOffMassFlowRateVSCoil(FurnaceNum, ZoneNum, FirstHVACIteration, AirLoopNum, OnOffAirFlowRatio, OpMode, &
QZnReq, MoistureLoad, PartLoadRatio)
! SUBROUTINE INFORMATION:
! AUTHOR Bo Shen
! DATE WRITTEN March 2012
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for initializations of the Furnace Components.
! METHODOLOGY EMPLOYED:
! The HeatCool furnace/unitarysystem and air-to-air heat pump may have alternate air flow rates
! in cooling, heating, and when no cooling or heating is needed. Set up the coil (comp) ON and OFF
! air flow rates. Use these flow rates during the Calc routines to set the average mass flow rates
! based on PLR.
! REFERENCES:
! na
! USE STATEMENTS:
USE General, ONLY: RoundSigDigits
USE DataZoneEnergyDemands, ONLY: CurDeadbandOrSetback
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: FurnaceNum ! index to furnace
INTEGER, INTENT(IN) :: ZoneNum ! index to zone
INTEGER, INTENT(IN) :: AirLoopNum ! index to air loop !unused1208
REAL(r64), INTENT(INOUT) :: OnOffAirFlowRatio ! ratio of coil on to coil off air flow rate
INTEGER, INTENT(IN) :: OpMode ! fan operating mode
REAL(r64), INTENT(IN) :: QZnReq ! sensible load to be met (W) !unused1208
REAL(r64), INTENT(IN) :: MoistureLoad ! moisture load to be met (W)
REAL(r64), INTENT(INOUT) :: PartLoadRatio ! coil part-load ratio
LOGICAL, INTENT (IN) :: FirstHVACIteration ! Flag for 1st HVAC iteration
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: InNode ! Inlet node number in MSHP loop
INTEGER :: OutNode ! Outlet node number in MSHP loop
InNode = Furnace(FurnaceNum)%FurnaceInletNodeNum
OutNode = Furnace(FurnaceNum)%FurnaceOutletNodeNum
! FLOW:
If (CoolingLoad) then
Furnace(FurnaceNum)%HeatCoolMode = CoolingMode
ELSE If (HeatingLoad) then
Furnace(FurnaceNum)%HeatCoolMode = HeatingMode
Else
Furnace(FurnaceNum)%HeatCoolMode = 0
End If
! Set the inlet node mass flow rate
IF (Furnace(FurnaceNum)%OpMode .EQ. ContFanCycCoil) THEN
! constant fan mode
IF ((Furnace(FurnaceNum)%HeatCoolMode == HeatingMode) .AND. .NOT. CurDeadbandOrSetback(ZoneNum)) THEN
CompOnMassFlow = Furnace(FurnaceNum)%HeatMassFlowRate(1)
CompOnFlowRatio = Furnace(FurnaceNum)%MSHeatingSpeedRatio(1)
Furnace(FurnaceNum)%LastMode = HeatingMode
ELSE IF ((Furnace(FurnaceNum)%HeatCoolMode == CoolingMode) .AND. .NOT. CurDeadbandOrSetback(ZoneNum)) THEN
CompOnMassFlow = Furnace(FurnaceNum)%CoolMassFlowRate(1)
CompOnFlowRatio = Furnace(FurnaceNum)%MSCoolingSpeedRatio(1)
Furnace(FurnaceNum)%LastMode = CoolingMode
ELSE
CompOnMassFlow = Furnace(FurnaceNum)%IdleMassFlowRate
CompOnFlowRatio = Furnace(FurnaceNum)%IdleSpeedRatio
END IF
CompOffMassFlow = Furnace(FurnaceNum)%IdleMassFlowRate
CompOffFlowRatio = Furnace(FurnaceNum)%IdleSpeedRatio
ELSE
! cycling fan mode
IF ((Furnace(FurnaceNum)%HeatCoolMode == HeatingMode).AND. .NOT. CurDeadbandOrSetback(ZoneNum)) THEN
CompOnMassFlow = Furnace(FurnaceNum)%HeatMassFlowRate(1)
CompOnFlowRatio = Furnace(FurnaceNum)%MSHeatingSpeedRatio(1)
ELSE IF ((Furnace(FurnaceNum)%HeatCoolMode == CoolingMode).AND. .NOT. CurDeadbandOrSetback(ZoneNum)) THEN
CompOnMassFlow = Furnace(FurnaceNum)%CoolMassFlowRate(1)
CompOnFlowRatio = Furnace(FurnaceNum)%MSCoolingSpeedRatio(1)
ELSE
CompOnMassFlow = 0.0d0
CompOnFlowRatio = 0.0d0
END IF
CompOffMassFlow = 0.0d0
CompOffFlowRatio = 0.0d0
END IF
! Set the inlet node mass flow rate
IF (GetCurrentScheduleValue(Furnace(FurnaceNum)%FanAvailSchedPtr) .gt. 0.0d0 .AND. CompOnMassFlow .NE. 0.0d0) THEN
OnOffAirFlowRatio = 1.0d0
IF(FirstHVACIteration)THEN
Node(InNode)%MassFlowRate = CompOnMassFlow
PartLoadRatio = 0.0d0
ELSE
IF (Furnace(FurnaceNum)%HeatCoolMode /= 0) THEN
PartLoadRatio = 1.0d0
ELSE
PartLoadRatio = 0.0d0
END IF
END IF
ELSE
PartLoadRatio = 0.0d0
Node(InNode)%MassFlowRate = 0.0d0
Node(OutNode)%MassFlowRate = 0.0d0
Node(OutNode)%MassFlowRateMaxAvail = 0.0d0
OnOffAirFlowRatio = 1.0d0
END IF
! Set the system mass flow rates
CALL SetVSHPAirFlow(FurnaceNum,PartLoadRatio,OnOffAirFlowRatio)
END SUBROUTINE SetOnOffMassFlowRateVSCoil