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) | :: | HPPartLoadRatio | |||
| 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.
REAL(r64) FUNCTION PLRResidualMixedTank(HPPartLoadRatio, Par)
          ! FUNCTION INFORMATION:
          !       AUTHOR         Richard Raustad
          !       DATE WRITTEN   May 2005
          !       MODIFIED
          !       RE-ENGINEERED
          ! PURPOSE OF THIS FUNCTION:
          !  Calculates residual function (desired tank temp - actual tank temp)
          !  HP water heater output depends on the part load ratio which is being varied to zero the residual.
          ! METHODOLOGY EMPLOYED:
          !  Calls CalcWaterThermalTankMixed to get tank temperature at the given part load ratio (source water mass flow rate)
          !  and calculates the residual as defined above
          ! REFERENCES:
          ! USE STATEMENTS:
          ! USE STATEMENTS:
  USE DataHVACGlobals, ONLY: NumPlantLoops
  IMPLICIT NONE    ! Enforce explicit typing of all variables in this routine
          ! SUBROUTINE ARGUMENT DEFINITIONS:
  REAL(r64), INTENT(IN)     :: HPPartLoadRatio ! compressor cycling ratio (1.0 is continuous, 0.0 is off)
  REAL(r64), INTENT(IN), DIMENSION(:), OPTIONAL :: Par ! par(1) = HP set point temperature [C]
                                                  ! par(2) = tank mode
                                                  ! par(3) = water heater num
                                                  ! par(4) = FirstHVACIteration
                                                  ! par(5) = MdotWater
          ! FUNCTION PARAMETER DEFINITIONS:
          !  na
          ! INTERFACE BLOCK SPECIFICATIONS
          !  na
          ! DERIVED TYPE DEFINITIONS
          !  na
          ! FUNCTION LOCAL VARIABLE DECLARATIONS:
  INTEGER :: WaterThermalTankNum     ! index of water heater
  REAL(r64)    :: NewTankTemp        ! resulting tank temperature [C]
  LOGICAL :: FirstHVACIteration ! FirstHVACIteration flag
  WaterThermalTankNum = INT(Par(3))
  WaterThermalTank(WaterThermalTankNum)%Mode = INT(Par(2))
  WaterThermalTank(WaterThermalTankNum)%SourceMassFlowRate = Par(5) * HPPartLoadRatio
  ! FirstHVACIteration is a logical, Par is real, so make 1.0=TRUE and 0.0=FALSE
  IF(Par(4) .EQ. 1.0d0)THEN
    FirstHVACIteration = .TRUE.
  ELSE
    FirstHVACIteration = .FALSE.
  END IF
  CALL CalcWaterThermalTankMixed(WaterThermalTankNum)
  NewTankTemp = WaterThermalTank(WaterThermalTankNum)%TankTemp
  PLRResidualMixedTank = Par(1) - NewTankTemp
  RETURN
END FUNCTION PLRResidualMixedTank