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) | :: | FanSpeedRatio | |||
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 VSEvapUnitLoadResidual(FanSpeedRatio, Par) RESULT (Residual)
! FUNCTION INFORMATION:
! AUTHOR <author>
! DATE WRITTEN <date_written>
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! <description>
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
USE DataHVACGlobals, ONLY: ZoneCompTurnFansOn, ZoneCompTurnFansOff
USE Fans, ONLY: SimulateFanComponents
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: FanSpeedRatio
REAL(r64), INTENT(IN), DIMENSION(:), OPTIONAL :: Par ! parameters
REAL(r64) :: Residual
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: UnitNum
INTEGER :: ZoneNum
INTEGER :: ZoneNodeNum
REAL(r64) :: LoadToBeMet ! sensible load to be met
REAL(r64) :: MinHumRat
REAL(r64) :: SensibleOutputProvided
UnitNum = INT(Par(1))
ZoneNum = INT(Par(2))
ZoneNodeNum = INT(Par(3))
LoadToBeMet = Par(5)
Node(ZoneEvapUnit(UnitNum)%OAInletNodeNum)%MassFlowRate = ZoneEvapUnit(UnitNum)%DesignAirMassFlowRate &
* FanSpeedRatio
Node(ZoneEvapUnit(UnitNum)%OAInletNodeNum)%MassFlowRateMaxAvail = Node(ZoneEvapUnit(UnitNum)%OAInletNodeNum)%MassFlowRate
Node(ZoneEvapUnit(UnitNum)%UnitOutletNodeNum)%MassFlowRate = Node(ZoneEvapUnit(UnitNum)%OAInletNodeNum)%MassFlowRate
Node(ZoneEvapUnit(UnitNum)%UnitOutletNodeNum)%MassFlowRateMaxAvail = &
Node(ZoneEvapUnit(UnitNum)%UnitOutletNodeNum)%MassFlowRate
IF (ZoneEvapUnit(UnitNum)%UnitReliefNodeNum > 0) THEN
Node(ZoneEvapUnit(UnitNum)%UnitReliefNodeNum)%MassFlowRate = Node(ZoneEvapUnit(UnitNum)%OAInletNodeNum)%MassFlowRate
Node(ZoneEvapUnit(UnitNum)%UnitReliefNodeNum)%MassFlowRateMaxAvail = &
Node(ZoneEvapUnit(UnitNum)%OAInletNodeNum)%MassFlowRate
ENDIF
IF (ZoneEvapUnit(UnitNum)%FanLocation == BlowThruFan) THEN
Node(ZoneEvapUnit(UnitNum)%FanOutletNodeNum)%MassFlowRate = Node(ZoneEvapUnit(UnitNum)%OAInletNodeNum)%MassFlowRate
Node(ZoneEvapUnit(UnitNum)%FanOutletNodeNum)%MassFlowRateMaxAvail = Node(ZoneEvapUnit(UnitNum)%OAInletNodeNum)%MassFlowRate
CALL SimulateFanComponents(ZoneEvapUnit(UnitNum)%FanName,.FALSE.,ZoneEvapUnit(UnitNum)%FanIndex,FanSpeedRatio,&
ZoneCompTurnFansOn,ZoneCompTurnFansOff)
ENDIF
IF (ZoneEvapUnit(UnitNum)%EvapCooler_1_AvailStatus) THEN
CALL SimEvapCooler(ZoneEvapUnit(UnitNum)%EvapCooler_1_Name , ZoneEvapUnit(UnitNum)%EvapCooler_1_Index)
ENDIF
IF ((ZoneEvapUnit(UnitNum)%EvapCooler_2_Index > 0) .AND. ZoneEvapUnit(UnitNum)%EvapCooler_2_AvailStatus) THEN
CALL SimEvapCooler(ZoneEvapUnit(UnitNum)%EvapCooler_2_Name , ZoneEvapUnit(UnitNum)%EvapCooler_2_Index)
ENDIF
IF (ZoneEvapUnit(UnitNum)%FanLocation == DrawThruFan) THEN
CALL SimulateFanComponents(ZoneEvapUnit(UnitNum)%FanName,.FALSE.,ZoneEvapUnit(UnitNum)%FanIndex,FanSpeedRatio,&
ZoneCompTurnFansOn,ZoneCompTurnFansOff)
ENDIF
MinHumRat = MIN(Node(ZoneEvapUnit(UnitNum)%ZoneNodeNum )%HumRat,Node(ZoneEvapUnit(UnitNum)%UnitOutletNodeNum)%HumRat)
SensibleOutputProvided = Node(ZoneEvapUnit(UnitNum)%UnitOutletNodeNum)%MassFlowRate &
* (PsyHFnTdbW(Node(ZoneEvapUnit(UnitNum)%UnitOutletNodeNum)%Temp,MinHumRat) &
- PsyHFnTdbW(Node(ZoneEvapUnit(UnitNum)%ZoneNodeNum)%Temp,MinHumRat))
Residual = SensibleOutputProvided - LoadToBeMet
RETURN
END FUNCTION VSEvapUnitLoadResidual