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) | :: | SensibleLoad | |||
real(kind=R64), | intent(in) | :: | 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.
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 SetSpeedVariables(UnitarySysNum, SensibleLoad, PartLoadRatio)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Raustad, FSEC
! DATE WRITTEN February 2013
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine determines operating PLR and calculates the load based system output.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE General, ONLY: SolveRegulaFalsi, TrimSigDigits
USE DataHeatBalFanSys, ONLY: TempControlType
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) :: SensibleLoad ! True when meeting a sensible load (not a moisture load)
REAL(R64), INTENT(IN) :: PartLoadRatio ! operating PLR
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL :: errflag ! error flag returned from subroutine
REAL(r64) :: RunTimeFrac ! heat pump runtime fraction
IF(HeatingLoad .AND. SensibleLoad)THEN
UnitarySystem(UnitarySysNum)%CoolingSpeedRatio = 0.0d0
UnitarySystem(UnitarySysNum)%CoolingCycRatio = 0.0d0
IF(UnitarySystem(UnitarySysNum)%MultiSpeedHeatingCoil .OR. UnitarySystem(UnitarySysNum)%VarSpeedHeatingCoil) THEN
IF(UnitarySystem(UnitarySysNum)%HeatingSpeedNum == 1)THEN
UnitarySystem(UnitarySysNum)%HeatingSpeedRatio = 0.0d0
UnitarySystem(UnitarySysNum)%HeatingCycRatio = PartLoadRatio
ELSE
UnitarySystem(UnitarySysNum)%HeatingSpeedRatio = PartLoadRatio
UnitarySystem(UnitarySysNum)%HeatingCycRatio = 1.0d0
END IF
ELSEIF(UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPSimple .OR. &
UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHP)THEN
CALL HeatPumpRunFrac(UnitarySysNum,PartLoadRatio,errflag,RuntimeFrac)
IF(RuntimeFrac > 0.0d0 .AND. UnitarySystem(UnitarySysNum)%FanOpMode == ContFanCycCoil)THEN
OnOffFanPartLoadFraction = PartLoadRatio/RuntimeFrac
ELSE
OnOffFanPartLoadFraction = 1
END IF
UnitarySystem(UnitarySysNum)%CompPartLoadRatio = PartLoadRatio
UnitarySystem(UnitarySysNum)%WSHPRuntimeFrac = RuntimeFrac
END IF
ELSE
UnitarySystem(UnitarySysNum)%HeatingSpeedRatio = 0.0d0
UnitarySystem(UnitarySysNum)%HeatingCycRatio = 0.0d0
IF(UnitarySystem(UnitarySysNum)%MultiSpeedCoolingCoil .OR. &
UnitarySystem(UnitarySysNum)%VarSpeedCoolingCoil) THEN
IF(UnitarySystem(UnitarySysNum)%CoolingSpeedNum == 1)THEN
UnitarySystem(UnitarySysNum)%CoolingSpeedRatio = 0.0d0
UnitarySystem(UnitarySysNum)%CoolingCycRatio = PartLoadRatio
ELSE
UnitarySystem(UnitarySysNum)%CoolingSpeedRatio = PartLoadRatio
UnitarySystem(UnitarySysNum)%CoolingCycRatio = 1.0d0
END IF
ELSEIF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == Coil_CoolingWaterToAirHPSimple .OR. &
UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == Coil_CoolingWaterToAirHP)THEN
CALL HeatPumpRunFrac(UnitarySysNum,PartLoadRatio,errflag,RuntimeFrac)
IF(RuntimeFrac > 0.0d0 .AND. UnitarySystem(UnitarySysNum)%FanOpMode == ContFanCycCoil)THEN
OnOffFanPartLoadFraction = PartLoadRatio/RuntimeFrac
ELSE
OnOffFanPartLoadFraction = 1.0d0
END IF
UnitarySystem(UnitarySysNum)%CompPartLoadRatio = PartLoadRatio
UnitarySystem(UnitarySysNum)%WSHPRuntimeFrac = RuntimeFrac
ELSEIF(UnitarySystem(UnitarySysNum)%CoolingCoilType_Num == CoilDX_CoolingTwoSpeed) THEN
IF(UnitarySystem(UnitarySysNum)%CoolingSpeedNum == 1)THEN
UnitarySystem(UnitarySysNum)%CoolingSpeedRatio = 0.0d0
UnitarySystem(UnitarySysNum)%CoolingCycRatio = PartLoadRatio
ELSE
UnitarySystem(UnitarySysNum)%CoolingSpeedRatio = PartLoadRatio
UnitarySystem(UnitarySysNum)%CoolingCycRatio = 1.0d0
END IF
END IF
END IF
RETURN
END SUBROUTINE SetSpeedVariables