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 | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | PartLoadRatio | |||
real(kind=r64), | intent(in), | optional | DIMENSION(:) | :: | Par |
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.
FUNCTION HeatWatertoAirHPTempResidual(PartLoadRatio, Par) RESULT (Residuum)
! FUNCTION INFORMATION:
! AUTHOR Chandan Sharma, FSEC
! DATE WRITTEN January 2013
! MODIFIED
! RE-ENGINEERED
! PURPOSE OF THIS FUNCTION:
! Calculates residual function (desired outlet temp - actual outlet temp)
! Heat water coil output depends on the part load ratio which is being varied to zero the residual.
! METHODOLOGY EMPLOYED:
! Calls SimWatertoAirHP or SimWatertoAirHPSimple to get outlet humidity ratio at the given cycling ratio
! and calculates the residual as defined above
! REFERENCES:
! USE STATEMENTS:
USE WatertoAirHeatPumpSimple, ONLY: SimWatertoAirHPSimple
USE WatertoAirHeatPump, ONLY: SimWaterToAirHP
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: PartLoadRatio ! compressor cycling ratio (1.0 is continuous, 0.0 is off)
REAL(r64), INTENT(IN), DIMENSION(:), OPTIONAL :: Par ! par(1) = HeatWatertoAirHP coil number
! par(2) = desired air outlet humidity ratio [kg/kg]
! par(5) = supply air fan operating mode (ContFanCycCoil)
REAL(r64) :: Residuum ! residual to be minimized to zero
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: UnitarySysNum ! index of this coil
REAL(r64) :: OutletAirTemp ! outlet air humidity ratio [kg/kg]
REAL(r64) :: ReqOutput
LOGICAL :: FirstHVACIteration
LOGICAL :: errflag
REAL(r64) :: RuntimeFrac
REAL(r64) :: Dummy
UnitarySysNum = INT(Par(1))
IF (Par(2) > 0.0d0) THEN
FirstHVACIteration = .TRUE.
ELSE
FirstHVACIteration = .FALSE.
END IF
ReqOutput = Par(1)
CALL HeatPumpRunFrac(UnitarySysNum,PartLoadRatio,errflag,RuntimeFrac)
IF(RuntimeFrac > 0.0d0 .AND. UnitarySystem(UnitarySysNum)%FanOpMode == CycFanCycCoil)THEN
OnOffFanPartLoadFraction = PartLoadRatio/RuntimeFrac
ELSE
OnOffFanPartLoadFraction = 1
END IF
UnitarySystem(UnitarySysNum)%CompPartLoadRatio = PartLoadRatio
UnitarySystem(UnitarySysNum)%WSHPRuntimeFrac = RuntimeFrac
Dummy = 0.0d0
IF (UnitarySystem(UnitarySysNum)%HeatingCoilType_Num == Coil_HeatingWaterToAirHPSimple) THEN
CALL SimWatertoAirHPSimple(Blank, UnitarySystem(UnitarySysNum)%HeatingCoilIndex, ReqOutput, Dummy, &
UnitarySystem(UnitarySysNum)%FanOpMode,RuntimeFrac, &
UnitarySystem(UnitarySysNum)%MaxONOFFCyclesperHour, &
UnitarySystem(UnitarySysNum)%HPTimeConstant, UnitarySystem(UnitarySysNum)%FanDelayTime, &
0, PartLoadRatio, FirstHVACIteration)
ELSE
CALL SimWatertoAirHP(Blank, UnitarySystem(UnitarySysNum)%HeatingCoilIndex, &
UnitarySystem(UnitarySysNum)%MaxHeatAirMassFlow,UnitarySystem(UnitarySysNum)%FanOpMode, &
FirstHVACIteration,RuntimeFrac,UnitarySystem(UnitarySysNum)%MaxONOFFCyclesperHour, &
UnitarySystem(UnitarySysNum)%HPTimeConstant, UnitarySystem(UnitarySysNum)%FanDelayTime, &
UnitarySystem(UnitarySysNum)%InitHeatPump, ReqOutput,Dummy,0, PartLoadRatio)
END IF
OutletAirTemp = Node(UnitarySystem(UnitarySysNum)%HeatCoilOutletNodeNum)%Temp
Residuum = Par(3) - OutletAirTemp
RETURN
END FUNCTION HeatWatertoAirHPTempResidual