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 |
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 CalcPassiveSystem(UnitarySysNum, FirstHVACIteration)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Raustad, FSEC
! DATE WRITTEN February 2013
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine calculates the set point based output of the unitary system.
! 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
! 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
REAL(R64) :: QZnReq
INTEGER :: CompOn ! compressor control (0=off, 1=on)
LOGICAL :: HXUnitOn
OnOffAirFlowRatio = 1.0d0
CoilCoolHeatRat = 1.0d0
QZnReq = 0.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
PartLoadRatio = UnitarySystem(UnitarySysNum)%CoolingPartLoadFrac
CompOn = 0
IF(PartLoadRatio > 0.0d0)CompOn = 1
HXUnitOn = .FALSE.
CALL CalcUnitaryCoolingSystem(UnitarySysNum,FirstHVACIteration,PartLoadRatio, &
CompOn,OnOffAirFlowRatio,CoilCoolHeatRat,HXUnitOn)
END IF
IF (UnitarySystem(UnitarySysNum)%HeatCoilExists)THEN
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
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
PartLoadRatio = UnitarySystem(UnitarySysNum)%CoolingPartLoadFrac
CompOn = 0
IF(PartLoadRatio > 0.0d0)CompOn = 1
HXUnitOn = .FALSE.
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
! CALL reheat coils next
IF (UnitarySystem(UnitarySysNum)%SuppCoilExists)THEN
SuppHeatingCoilFlag = .TRUE.
CALL CalcUnitarySuppSystemToSP(UnitarySysNum,FirstHVACIteration)
SuppHeatingCoilFlag = .FALSE.
END IF
RETURN
END SUBROUTINE CalcPassiveSystem