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.
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.
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.
SUBROUTINE CalcWaterMainsTemp()
! SUBROUTINE INFORMATION:
! AUTHOR Peter Graham Ellis
! DATE WRITTEN January 2005
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Calculates the daily water mains temperature based on input data from the WATER MAINS TEMPERATURES object.
! METHODOLOGY EMPLOYED:
! Water mains temperature is either taken from a schedule or calculated by a correlation. The correlation
! is fit to Fahrenheit units, so the air temperature values are first convert to F, then mains temperature
! is calculated and converted back to C.
! REFERENCES:
! Correlation developed by Jay Burch and Craig Christensen at NREL, described in:
! Hendron, R., Anderson, R., Christensen, C., Eastment, M., and Reeves, P. 2004. "Development of an Energy
! Savings Benchmark for All Residential End-Uses", Proceedings of SimBuild 2004, IBPSA-USA National Conference,
! Boulder, CO, August 4 - 6, 2004.
! USE STATEMENTS:
USE ScheduleManager, ONLY: GetCurrentScheduleValue
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: Tavg ! Annual Average Outdoor Air Temperature (F)
REAL(r64) :: Tdiff ! Maximum difference in monthly average outdoor air temperatures (deltaF)
REAL(r64) :: Ratio ! Value used in correlation
REAL(r64) :: Lag ! Value used in correlation
REAL(r64) :: Offset ! Value used in correlation
! FLOW:
SELECT CASE (WaterMainsTempsMethod)
CASE (ScheduleMethod)
WaterMainsTemp = GetCurrentScheduleValue(WaterMainsTempsSchedule)
CASE (CorrelationMethod)
! Convert C to F
Tavg = WaterMainsTempsAnnualAvgAirTemp * (9.0d0 / 5.0d0) + 32.0d0
Tdiff = WaterMainsTempsMaxDiffAirTemp * (9.0d0 / 5.0d0)
Ratio = 0.4d0 + 0.01d0 * (Tavg - 44.0d0)
Lag = 35.0d0 - 1.0d0 * (Tavg - 44.0d0)
Offset = 6.0d0
WaterMainsTemp = Tavg + Offset + Ratio * (Tdiff / 2.0d0) * &
SIN((0.986d0 * (DayOfYear - 15.0d0 - Lag) - 90.0d0) * DegToRadians)
IF (WaterMainsTemp < 32.0d0) WaterMainsTemp = 32.0d0
! Convert F to C
WaterMainsTemp = (WaterMainsTemp - 32.0d0) * (5.0d0 / 9.0d0)
CASE DEFAULT
WaterMainsTemp = 10.0d0 ! 50 F
END SELECT
RETURN
END SUBROUTINE CalcWaterMainsTemp