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 | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ZoneNum |
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 CalcTempDistModel(ZoneNum)
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN August 2005
! MODIFIED
! RE-ENGINEERED
! PURPOSE OF THIS SUBROUTINE:
! figure out which pattern is scheduled and call
! appropriate subroutine
! METHODOLOGY EMPLOYED:
! REFERENCES:
! na
! USE STATEMENTS:
USE DataSurfaces, ONLY : Surface, AdjacentAirTemp, ZoneMeanAirTemp
USE ScheduleManager , ONLY : GetCurrentScheduleValue
USE DataHeatBalance , ONLY : Zone
USE InputProcessor , ONLY : FindItem
Use OutputReportTabular, ONLY : IntToStr
USE FluidProperties, ONLY : FindArrayIndex ! routine should be moved to a general module rather than FluidProperties
USE General, ONLY : FindNumberinList
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ZoneNum ! index number for the specified zone
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
!unused INTEGER :: thisZoneInfo
REAL(r64) :: AvailTest
INTEGER :: CurntPatternKey
INTEGER :: CurPatrnID
!unused INTEGER :: thisZoneInfoSurf
!unused INTEGER :: lowSideID
!unused INTEGER :: highSideID
!unused REAL(r64) :: thisZeta
!unused REAL(r64) :: lowSideZeta
!unused REAL(r64) :: hiSideZeta
!unused REAL(r64) :: fractBtwn
!unused REAL(r64) :: tmpDeltaTai
!first determine availability
AvailTest = GetCurrentScheduleValue(AirPatternZoneInfo(ZoneNum)%AvailSchedID)
If ((AvailTest /= 1.0d0) .OR. ( .NOT. AirPatternZoneInfo(ZoneNum)%IsUsed) ) Then
! model not to be used. Use complete mixing method
AirPatternZoneInfo(ZoneNum)%Tstat = AirPatternZoneInfo(ZoneNum)%TairMean
AirPatternZoneInfo(ZoneNum)%Tleaving = AirPatternZoneInfo(ZoneNum)%TairMean
AirPatternZoneInfo(ZoneNum)%Texhaust = AirPatternZoneInfo(ZoneNum)%TairMean
AirPatternZoneInfo(ZoneNum)%Surf%TadjacentAir = AirPatternZoneInfo(ZoneNum)%TairMean
RETURN
ELSE ! choose pattern and call subroutine
CurntPatternKey = GetCurrentScheduleValue(AirPatternZoneInfo(ZoneNum)%PatternSchedID)
CurPatrnID = FindNumberinList(CurntPatternKey,RoomAirPattern%PatrnID,NumAirTempPatterns)
If (CurPatrnID == 0) Then
! throw error here ? way to test schedules before getting to this point?
CALL showFatalError('User defined room air pattern index not found: '//trim(IntToStr(CurntPatternKey)) )
RETURN
ENDIF
Select Case (RoomAirPattern(CurPatrnID)%PatternMode)
CASE(ConstGradTempPattern)
CALL FigureConstGradPattern(CurPatrnID, ZoneNum)
CASE(TwoGradInterpPattern)
CALL FigureTwoGradInterpPattern(CurPatrnID, ZoneNum)
CASE(NonDimenHeightPattern)
CALL FigureHeightPattern(CurPatrnID, ZoneNum)
CASE(SurfMapTempPattern)
CALL FigureSurfMapPattern(CurPatrnID, ZoneNum)
CASE DEFAULT
!should not come here
END SELECT
ENDIF ! availability control construct
RETURN
END SUBROUTINE CalcTempDistModel