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) | :: | OASignal | |||
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 MixedAirControlTempResidual(OASignal, Par) RESULT (Residuum)
! FUNCTION INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN April, 2003
! MODIFIED
! RE-ENGINEERED
! PURPOSE OF THIS FUNCTION:
! Calculates residual function TMixSetPoint - TMix.
! Economizer damper position (OASignal) is being varied to zero the residual.
! METHODOLOGY EMPLOYED:
! Using a mass and energy balance at the mixed air node, calculates the
! mixed air temperature given the outside air damper position.
! REFERENCES:
! USE STATEMENTS:
USE Psychrometrics, ONLY:PsyTdbFnHW
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: OASignal ! Relative outside air flow rate (0 to 1)
REAL(r64), INTENT(IN), DIMENSION(:), OPTIONAL :: Par ! par(1) = mixed node number
! par(2) = return node number
! par(3) = outside air node number
! par(4) = mixed air flow rate
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 :: MixNode ! mixed air node number
INTEGER :: RetNode ! return air node number
INTEGER :: OANode ! outside air node number
REAL(r64) :: MixMassFlowRate ! mixed air mass flow rare [kg/s]
REAL(r64) :: OAMassFlowRate ! outside air mass flow rate [kg/s]
REAL(r64) :: RecircMassFlowRate ! recirculated air mass flow rate [kg/s]
REAL(r64) :: RecircEnth ! recirculated air specific enthalpy [J/kg]
REAL(r64) :: RecircHumRat ! recirculated air humidity ratio [kg water/kg dry air]
REAL(r64) :: MixEnth ! mixed air specific enthalpy [J/kg]
REAL(r64) :: MixHumRat ! mixed air humidity ratio [kg water/kg dry air]
REAL(r64) :: MixTemp ! mixed air temperature [C]
MixNode = INT(Par(1))
RetNode = INT(Par(2))
OANode = INT(Par(3))
MixMassFlowRate = Par(4)
OAMassFlowRate = OASignal*MixMassFlowRate
RecircMassFlowRate = MAX(MixMassFlowRate-OAMassFlowRate,0.0d0)
RecircEnth = Node(RetNode)%Enthalpy
RecircHumRat = Node(RetNode)%HumRat
MixEnth = (RecircMassFlowRate*RecircEnth + OAMassFlowRate*Node(OANode)%Enthalpy) / MixMassFlowRate
MixHumRat = (RecircMassFlowRate*RecircHumRat + OAMassFlowRate*Node(OANode)%HumRat) / MixMassFlowRate
MixTemp = PsyTdbFnHW(MixEnth,MixHumRat)
Residuum = Node(MixNode)%TempSetPoint - MixTemp
RETURN
END FUNCTION MixedAirControlTempResidual