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) | :: | PTUnitNum | |||
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(PTUnitNum, 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) :: PTUnitNum ! 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 = PTUnit(PTUnitNum)%AirInNode
OutNode = PTUnit(PTUnitNum)%AirOutNode
CALL SetOnOffMassFlowRate(PTUnitNum, PartLoadRatio, OnOffAirFlowRatio)
!INTIALIZE FIXED SPEED FIRST, AND OVER-WRITE USING MUL-SPEED
! FLOW:
If (CoolingLoad) then
PTUnit(PTUnitNum)%HeatCoolMode = CoolingMode
ELSE If (HeatingLoad) then
PTUnit(PTUnitNum)%HeatCoolMode = HeatingMode
Else
PTUnit(PTUnitNum)%HeatCoolMode = 0
End If
! Set the inlet node mass flow rate
IF (PTUnit(PTUnitNum)%OpMode .EQ. ContFanCycCoil) THEN
! constant fan mode
IF ((PTUnit(PTUnitNum)%HeatCoolMode == HeatingMode) .AND. .NOT. CurDeadbandOrSetback(ZoneNum)) THEN
CompOnMassFlow = PTUnit(PTUnitNum)%HeatMassFlowRate(1)
CompOnFlowRatio = PTUnit(PTUnitNum)%MSHeatingSpeedRatio(1)
PTUnit(PTUnitNum)%LastMode = HeatingMode
ELSE IF ((PTUnit(PTUnitNum)%HeatCoolMode == CoolingMode) .AND. .NOT. CurDeadbandOrSetback(ZoneNum)) THEN
CompOnMassFlow = PTUnit(PTUnitNum)%CoolMassFlowRate(1)
CompOnFlowRatio = PTUnit(PTUnitNum)%MSCoolingSpeedRatio(1)
PTUnit(PTUnitNum)%LastMode = CoolingMode
ELSE
CompOnMassFlow = PTUnit(PTUnitNum)%IdleMassFlowRate
CompOnFlowRatio = PTUnit(PTUnitNum)%IdleSpeedRatio
END IF
CompOffMassFlow = PTUnit(PTUnitNum)%IdleMassFlowRate
CompOffFlowRatio = PTUnit(PTUnitNum)%IdleSpeedRatio
ELSE
! cycling fan mode
IF ((PTUnit(PTUnitNum)%HeatCoolMode == HeatingMode).AND. .NOT. CurDeadbandOrSetback(ZoneNum)) THEN
CompOnMassFlow = PTUnit(PTUnitNum)%HeatMassFlowRate(1)
CompOnFlowRatio = PTUnit(PTUnitNum)%MSHeatingSpeedRatio(1)
ELSE IF ((PTUnit(PTUnitNum)%HeatCoolMode == CoolingMode).AND. .NOT. CurDeadbandOrSetback(ZoneNum)) THEN
CompOnMassFlow = PTUnit(PTUnitNum)%CoolMassFlowRate(1)
CompOnFlowRatio = PTUnit(PTUnitNum)%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(PTUnit(PTUnitNum)%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 (PTUnit(PTUnitNum)%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(PTUnitNum, ZoneNum, PartLoadRatio,OnOffAirFlowRatio)
END SUBROUTINE SetOnOffMassFlowRateVSCoil