Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | HeatingFrac | |||
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 VAVVSHCFanOnResidual(HeatingFrac, Par) RESULT (Residuum)
! FUNCTION INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN July 2004
! MODIFIED
! RE-ENGINEERED
! PURPOSE OF THIS FUNCTION:
! Calculates residual function (Requested Zone Load - Unit Output) / Requested Zone Load
! Unit Output depends on the heating coil output which is being varied to zero the residual.
! METHODOLOGY EMPLOYED:
! Calls CalcVAVVS, and calculates
! the residual as defined above.
! REFERENCES:
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: HeatingFrac ! fraction of maximum heating output
REAL(r64), INTENT(IN), DIMENSION(:), OPTIONAL :: Par ! Par(1) = REAL(SysNum)
! Par(2) = FirstHVACIteration (1. or 0.)
! Par(3) = REAL(ZoneNodeNum)
! Par(4) = REAL(HCType)
! Par(5) = max heating coil output [W]
! Par(6) = REAL(FanType)
! Par(7) = REAL(FanOp)
! Par(8) = heating demand [W]
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 :: UnitIndex
LOGICAL :: FirstHVACSoln
INTEGER :: ZoneNodeIndex
REAL(r64) :: MaxHeatOut ! maximum heating output [W]
INTEGER :: HCType ! heating coil type (integer)
INTEGER :: FanType ! fan type (as an integer)
INTEGER :: FanOp ! fan operation; 0=off, 1=on.
REAL(r64) :: UnitOutput ! heating output [W]
REAL(r64) :: AirMassFlowRate ! [kg/s]
REAL(r64) :: HeatOut ! heating coil output [W]
UnitIndex = INT(Par(1))
IF (Par(2) > 0.0D0) THEN
FirstHVACSoln = .TRUE.
ELSE
FirstHVACSoln = .FALSE.
END IF
ZoneNodeIndex = INT(Par(3))
HCType = INT(Par(4))
MaxHeatOut= Par(5)
FanType = INT(Par(6))
FanOp = INT(Par(7))
HeatOut = HeatingFrac * MaxHeatOut
AirMassFlowRate = MAX(HeatingFrac * Sys(UnitIndex)%HeatAirMassFlowRateMax, &
SysInlet(UnitIndex)%AirMassFlowRateMaxAvail * Sys(UnitIndex)%ZoneMinAirFrac)
CALL CalcVAVVS(UnitIndex,FirstHVACSoln,ZoneNodeIndex,HCType,0.0d0, &
HeatOut,FanType,AirMassFlowRate,FanOp,UnitOutput)
Residuum = (Par(8) - UnitOutput) / Par(8)
RETURN
END FUNCTION VAVVSHCFanOnResidual