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) | :: | AirFlowRateRatio | |||
| 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 VSMerkelResidual(AirFlowRateRatio, Par) RESULT (Residuum)
          ! 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 CurveManager,  ONLY : CurveValue
  IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
          ! FUNCTION ARGUMENT DEFINITIONS:
  REAL(r64), INTENT(IN)  :: AirFlowRateRatio ! fan speed ratio (1.0 is continuous, 0.0 is off)
  REAL(r64), INTENT(IN), DIMENSION(:), OPTIONAL :: Par ! par(1) = Tower number
                                                  ! par(2) =MyLoad [W] , negative is cooling
                                                  ! par(3) = water mass flow per cell
                                                  ! par(4) = Design UA per cell
                                                  ! par(5) = UA adjust factor for wetbulb
                                                  ! par(6) = UA adjust factor for water flow rate
                                                  ! par(7) = specific heat of water at inlet temp
                                                  ! par(8) = water mass flow rate, total [kg/s]
  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 :: TowerNum
  REAL(r64) :: WaterMassFlowRatePerCell
  REAL(r64) :: TargetLoad
  REAL(r64) :: UAdesignPerCell
  REAL(r64) :: UAwetbulbAdjFac
  REAL(r64) :: UAairflowAdjFac
  REAL(r64) :: UAwaterflowAdjFac
  REAL(r64) :: CpWater
  REAL(r64) :: TotalWaterMassFlowRate
  REAL(r64) :: AirFlowRatePerCell
  REAL(r64) :: UAadjustedPerCell
  REAL(r64) :: Qdot
  REAL(r64) :: OutletWaterTempTrial
  TowerNum                 = INT(Par(1))
  TargetLoad               = Par(2)
  WaterMassFlowRatePerCell = Par(3)
  UAdesignPerCell          = Par(4)
  UAwetbulbAdjFac          = Par(5)
  UAwaterflowAdjFac        = Par(6)
  CpWater                  = Par(7)
  TotalWaterMassFlowRate   = Par(8)
  AirFlowRatePerCell = AirFlowRateRatio * SimpleTower(TowerNum)%HighSpeedAirFlowRate / SimpleTower(TowerNum)%NumCell
  UAairflowAdjFac =  CurveValue(SimpleTower(TowerNum)%UAModFuncAirFlowRatioCurvePtr, AirFlowRateRatio)
  UAadjustedPerCell = UAdesignPerCell*UAwetbulbAdjFac*UAairflowAdjFac*UAwaterflowAdjFac
  CALL SimSimpleTower(TowerNum,WaterMassFlowRatePerCell,AirFlowRatePerCell,UAadjustedPerCell, OutletWaterTempTrial)
  Qdot = TotalWaterMassFlowRate * CpWater * (Node(SimpleTower(TowerNum)%WaterInletNodeNum)%Temp - OutletWaterTempTrial)
  Residuum =  ABS(TargetLoad) - Qdot
  RETURN
END FUNCTION VSMerkelResidual