Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | VRFTUNum | |||
integer, | intent(in) | :: | VRFCond | |||
logical, | intent(in), | optional | :: | UseCurrentMode |
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 SetCompFlowRate(VRFTUNum, VRFCond, UseCurrentMode)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Raustad, FSEC
! DATE WRITTEN June 2011
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for calling VRF terminal units during Init to initialize flow rate
! while looping through all terminal units connected to a specific condenser.
! This allows polling of capacities for all terminal units.
! Since the heat pump can only heat or cool, a single operating mode is chosen for each condenser.
! METHODOLOGY EMPLOYED:
! Initializes flow rates for a specific terminal unit.
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
Integer, Intent(IN) :: VRFTUNum
Integer, Intent(IN) :: VRFCond
Logical, OPTIONAL, Intent(IN) :: UseCurrentMode
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL :: CurrentMode !- specifies whether current or previous operating mode is used
INTEGER :: IndexToTUInTUList !- index to TU in specific list for this VRF system
INTEGER :: TUListIndex ! index to TU list for this VRF system
IndexToTUInTUList = VRFTU(VRFTUNum)%IndexToTUInTUList
TUListIndex = VRFTU(VRFTUNum)%TUListIndex
IF(Present(UseCurrentMode))THEN
CurrentMode = UseCurrentMode
ELSE
CurrentMode = .FALSE.
END IF
! uses current operating mode to set flow rate (after mode is set)
! IF(VRF(VRFCond)%HeatRecoveryUsed .AND. TerminalUnitList(TUListIndex)%HRCoolRequest(IndexToTUInTUList))THEN
IF(TerminalUnitList(TUListIndex)%HRCoolRequest(IndexToTUInTUList))THEN
CompOnMassFlow = VRFTU(VRFTUNum)%MaxCoolAirMassFlow
CompOffMassFlow = VRFTU(VRFTUNum)%MaxNoCoolAirMassFlow
OACompOnMassFlow = VRFTU(VRFTUNum)%CoolOutAirMassFlow
OACompOffMassFlow = VRFTU(VRFTUNum)%NoCoolHeatOutAirVolFlow
! uses current operating mode to set flow rate (after mode is set)
! ELSE IF(VRF(VRFCond)%HeatRecoveryUsed .AND. TerminalUnitList(TUListIndex)%HRHeatRequest(IndexToTUInTUList))THEN
ELSE IF(TerminalUnitList(TUListIndex)%HRHeatRequest(IndexToTUInTUList))THEN
CompOnMassFlow = VRFTU(VRFTUNum)%MaxHeatAirMassFlow
CompOffMassFlow = VRFTU(VRFTUNum)%MaxNoHeatAirMassFlow
OACompOnMassFlow = VRFTU(VRFTUNum)%HeatOutAirMassFlow
OACompOffMassFlow = VRFTU(VRFTUNum)%NoCoolHeatOutAirVolFlow
ELSE IF(CurrentMode)THEN ! uses current operating mode to set flow rate (after mode is set)
IF(CoolingLoad(VRFCond))THEN
CompOnMassFlow = VRFTU(VRFTUNum)%MaxCoolAirMassFlow
CompOffMassFlow = VRFTU(VRFTUNum)%MaxNoCoolAirMassFlow
OACompOnMassFlow = VRFTU(VRFTUNum)%CoolOutAirMassFlow
OACompOffMassFlow = VRFTU(VRFTUNum)%NoCoolHeatOutAirVolFlow
ELSE IF(HeatingLoad(VRFCond))THEN
CompOnMassFlow = VRFTU(VRFTUNum)%MaxHeatAirMassFlow
CompOffMassFlow = VRFTU(VRFTUNum)%MaxNoHeatAirMassFlow
OACompOnMassFlow = VRFTU(VRFTUNum)%HeatOutAirMassFlow
OACompOffMassFlow = VRFTU(VRFTUNum)%NoCoolHeatOutAirVolFlow
ELSE IF(LastModeCooling(VRFCond))THEN ! if NOT cooling or heating then use last mode
CompOnMassFlow = VRFTU(VRFTUNum)%MaxCoolAirMassFlow
CompOffMassFlow = VRFTU(VRFTUNum)%MaxNoCoolAirMassFlow
OACompOnMassFlow = VRFTU(VRFTUNum)%CoolOutAirMassFlow
OACompOffMassFlow = VRFTU(VRFTUNum)%NoCoolHeatOutAirVolFlow
ELSE IF(LastModeHeating(VRFCond))THEN ! if NOT cooling or heating then use last mode
CompOnMassFlow = VRFTU(VRFTUNum)%MaxHeatAirMassFlow
CompOffMassFlow = VRFTU(VRFTUNum)%MaxNoHeatAirMassFlow
OACompOnMassFlow = VRFTU(VRFTUNum)%HeatOutAirMassFlow
OACompOffMassFlow = VRFTU(VRFTUNum)%NoCoolHeatOutAirVolFlow
ELSE ! should not happen so just set to cooling flow rate
CompOnMassFlow = VRFTU(VRFTUNum)%MaxCoolAirMassFlow
CompOffMassFlow = VRFTU(VRFTUNum)%MaxNoCoolAirMassFlow
OACompOnMassFlow = VRFTU(VRFTUNum)%CoolOutAirMassFlow
OACompOffMassFlow = VRFTU(VRFTUNum)%NoCoolHeatOutAirVolFlow
END IF
ELSE ! uses previous operating mode to set flow rate (used for looping through each TU in Init before mode is set)
IF(LastModeCooling(VRFCond))THEN
CompOnMassFlow = VRFTU(VRFTUNum)%MaxCoolAirMassFlow
CompOffMassFlow = VRFTU(VRFTUNum)%MaxNoCoolAirMassFlow
OACompOnMassFlow = VRFTU(VRFTUNum)%CoolOutAirMassFlow
OACompOffMassFlow = VRFTU(VRFTUNum)%NoCoolHeatOutAirVolFlow
ELSE IF(LastModeHeating(VRFCond))THEN
CompOnMassFlow = VRFTU(VRFTUNum)%MaxHeatAirMassFlow
CompOffMassFlow = VRFTU(VRFTUNum)%MaxNoHeatAirMassFlow
OACompOnMassFlow = VRFTU(VRFTUNum)%HeatOutAirMassFlow
OACompOffMassFlow = VRFTU(VRFTUNum)%NoCoolHeatOutAirVolFlow
ELSE ! should not happen so just set to cooling flow rate
CompOnMassFlow = VRFTU(VRFTUNum)%MaxCoolAirMassFlow
CompOffMassFlow = VRFTU(VRFTUNum)%MaxNoCoolAirMassFlow
OACompOnMassFlow = VRFTU(VRFTUNum)%CoolOutAirMassFlow
OACompOffMassFlow = VRFTU(VRFTUNum)%NoCoolHeatOutAirVolFlow
END IF
END IF
IF(VRFTU(VRFTUNum)%OpMode .EQ. CycFanCycCoil)THEN
CompOffMassFlow = 0.d0
OACompOffMassFlow = 0.d0
END IF
RETURN
END SUBROUTINE SetCompFlowRate