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) | :: | UnitarySysNum | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
integer, | intent(in) | :: | AirLoopNum | |||
real(kind=r64), | intent(in), | optional | :: | OAUCoilOutTemp | ||
logical, | intent(inout), | optional | :: | HXUnitOn |
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 ControlUnitarySystemtoSP(UnitarySysNum, FirstHVACIteration, AirLoopNum,OAUCoilOutTemp,HXUnitOn)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Raustad, FSEC
! DATE WRITTEN February 2013
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine manages DXCoolingSystem component simulation.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE Fans, ONLY: SimulateFanComponents
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: UnitarySysNum ! Index of AirloopHVAC:UnitarySystem object
LOGICAL, INTENT(IN) :: FirstHVACIteration ! True when first HVAC iteration
INTEGER, INTENT(IN) :: AirLoopNum ! Primary air loop number
REAL(r64), INTENT(IN), OPTIONAL :: OAUCoilOutTemp ! the coil inlet temperature of OutdoorAirUnit
LOGICAL, INTENT(INOUT), OPTIONAL :: HXUnitOn ! Flag to control HX for HXAssisted Cooling Coil
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(R64) :: PartLoadRatio ! coil operating part-load ratio
REAL(R64) :: OnOffAirFlowRatio ! Setpoint based coil control does not use this variable
REAL(R64) :: CoilCoolHeatRat ! ratio of cooling to heating PLR for cycling fan RH control
INTEGER :: CompOn ! compressor control (0=off, 1=on)
OnOffAirFlowRatio = 1.0d0
CoilCoolHeatRat = 1.0d0
!CALL the series of components that simulate a Unitary System
IF (UnitarySystem(UnitarySysNum)%FanExists .AND. UnitarySystem(UnitarySysNum)%FanPlace .EQ. BlowThru) THEN
CALL SimulateFanComponents(Blank,FirstHVACIteration,UnitarySystem(UnitarySysNum)%FanIndex,FanSpeedRatio)
END IF
IF(UnitarySystem(UnitarySysNum)%CoolingCoilUpstream)THEN
IF (UnitarySystem(UnitarySysNum)%CoolCoilExists)THEN
CALL UpdateUnitarySystemControl(UnitarySysNum,AirLoopNum, &
UnitarySystem(UnitarySysNum)%CoolCoilOutletNodeNum, &
UnitarySystem(UnitarySysNum)%SystemCoolControlNodeNum, &
OnOffAirFlowRatio,OAUCoilOutTemp,FirstHVACIteration)
CALL ControlCoolingSystem(UnitarySysNum, FirstHVACIteration, HXUnitOn)
PartLoadRatio = UnitarySystem(UnitarySysNum)%CoolingPartLoadFrac
CompOn = 0
IF(PartLoadRatio > 0.0d0)CompOn = 1
CALL CalcUnitaryCoolingSystem(UnitarySysNum,FirstHVACIteration,PartLoadRatio, &
CompOn,OnOffAirFlowRatio,CoilCoolHeatRat,HXUnitOn)
END IF
IF (UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
CALL UpdateUnitarySystemControl(UnitarySysNum,AirLoopNum, &
UnitarySystem(UnitarySysNum)%HeatCoilOutletNodeNum, &
UnitarySystem(UnitarySysNum)%SystemHeatControlNodeNum, &
OnOffAirFlowRatio,OAUCoilOutTemp,FirstHVACIteration, &
MaxOutletTemp=UnitarySystem(UnitarySysNum)%DesignMaxOutletTemp)
CALL ControlHeatingSystem(UnitarySysNum, FirstHVACIteration)
PartLoadRatio = UnitarySystem(UnitarySysNum)%HeatingPartLoadFrac
CompOn = 0
IF(PartLoadRatio > 0.0d0)CompOn = 1
CALL CalcUnitaryHeatingSystem(UnitarySysNum,FirstHVACIteration,PartLoadRatio, CompOn, OnOffAirFlowRatio)
END IF
ELSE
IF (UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
CALL UpdateUnitarySystemControl(UnitarySysNum,AirLoopNum, &
UnitarySystem(UnitarySysNum)%HeatCoilOutletNodeNum, &
UnitarySystem(UnitarySysNum)%SystemHeatControlNodeNum, &
OnOffAirFlowRatio,OAUCoilOutTemp,FirstHVACIteration, &
MaxOutletTemp=UnitarySystem(UnitarySysNum)%DesignMaxOutletTemp)
CALL ControlHeatingSystem(UnitarySysNum, FirstHVACIteration)
PartLoadRatio = UnitarySystem(UnitarySysNum)%HeatingPartLoadFrac
CompOn = 0
IF(PartLoadRatio > 0.0d0)CompOn = 1
CALL CalcUnitaryHeatingSystem(UnitarySysNum,FirstHVACIteration,PartLoadRatio, CompOn, OnOffAirFlowRatio)
END IF
IF (UnitarySystem(UnitarySysNum)%CoolCoilExists)THEN
CALL UpdateUnitarySystemControl(UnitarySysNum,AirLoopNum, &
UnitarySystem(UnitarySysNum)%CoolCoilOutletNodeNum, &
UnitarySystem(UnitarySysNum)%SystemCoolControlNodeNum, &
OnOffAirFlowRatio,OAUCoilOutTemp,FirstHVACIteration)
CALL ControlCoolingSystem(UnitarySysNum, FirstHVACIteration, HXUnitOn)
PartLoadRatio = UnitarySystem(UnitarySysNum)%CoolingPartLoadFrac
CompOn = 0
IF(PartLoadRatio > 0.0d0)CompOn = 1
CALL CalcUnitaryCoolingSystem(UnitarySysNum,FirstHVACIteration,PartLoadRatio, &
CompOn,OnOffAirFlowRatio,CoilCoolHeatRat,HXUnitOn)
END IF
END IF
IF (UnitarySystem(UnitarySysNum)%FanExists .AND. UnitarySystem(UnitarySysNum)%FanPlace .EQ. DrawThru) THEN
CALL SimulateFanComponents(Blank,FirstHVACIteration,UnitarySystem(UnitarySysNum)%FanIndex,FanSpeedRatio)
END IF
IF (UnitarySystem(UnitarySysNum)%SuppCoilExists)THEN
SuppHeatingCoilFlag = .TRUE.
CALL UpdateUnitarySystemControl(UnitarySysNum,AirLoopNum, &
UnitarySystem(UnitarySysNum)%SuppCoilAirOutletNode, &
UnitarySystem(UnitarySysNum)%SuppHeatControlNodeNum, &
OnOffAirFlowRatio,OAUCoilOutTemp,FirstHVACIteration, &
MaxOutletTemp=UnitarySystem(UnitarySysNum)%DesignMaxOutletTemp)
CALL ControlSuppHeatSystem(UnitarySysNum, FirstHVACIteration)
CALL CalcUnitarySuppSystemToSP(UnitarySysNum,FirstHVACIteration)
SuppHeatingCoilFlag = .FALSE.
END IF
UnitarySystem(UnitarySysNum)%InitHeatPump = .FALSE.
RETURN
END SUBROUTINE ControlUnitarySystemtoSP