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) | :: | PattrnID | |||
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 FigureHeightPattern(PattrnID, ZoneNum)
! SUBROUTINE INFORMATION:
! AUTHOR B Griffith
! DATE WRITTEN August 2005
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! calculate the pattern for non-dimensional vertical profile
! METHODOLOGY EMPLOYED:
! treat profile as lookup table and interpolate
! REFERENCES:
! na
! USE STATEMENTS:
! na
USE FluidProperties, ONLY : FindArrayIndex !
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: PattrnID
INTEGER, INTENT(IN) :: ZoneNum
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: Tmean !
Integer :: lowSideID
INTEGER :: highSideID
REAL(r64) :: thisZeta
INTEGER :: I
REAL(r64) :: lowSideZeta
REAL(r64) :: hiSideZeta
REAL(r64) :: fractBtwn
REAL(r64) :: tmpDeltaTai
tmpDeltaTai = 0.0d0
Tmean = AirPatternZoneInfo(ZoneNum)%TairMean
Do i=1, AirPatternZoneInfo(ZoneNum)%totNumSurfs
thisZeta = AirPatternZoneInfo(ZoneNum)%Surf(i)%Zeta
lowSideID = FindArrayIndex(thisZeta,RoomAirPattern(PattrnID)%VertPatrn%ZetaPatrn)
highSideID = lowSideID + 1
If (lowSideID == 0) lowSideID = 1 !protect against array bounds
lowSideZeta = RoomAirPattern(PattrnID)%VertPatrn%ZetaPatrn(lowSideID)
IF (highSideID <= SIZE(RoomAirPattern(PattrnID)%VertPatrn%ZetaPatrn) ) THEN
hiSideZeta = RoomAirPattern(PattrnID)%VertPatrn%ZetaPatrn(highSideID)
ELSE !trap array bounds
hiSideZeta = lowSideZeta
ENDIF
IF ((hiSideZeta - lowSideZeta) /= 0.0d0) THEN !
fractBtwn = (thisZeta - lowSideZeta)/(hiSideZeta - lowSideZeta)
tmpDeltaTai = RoomAirPattern(PattrnID)%VertPatrn%DeltaTaiPatrn(lowSideID) &
+ fractBtwn * ( RoomAirPattern(PattrnID)%VertPatrn%DeltaTaiPatrn(highsideID) &
- RoomAirPattern(PattrnID)%VertPatrn%DeltaTaiPatrn(lowSideID ) )
ELSE ! would divide by zero, using low side value
tmpDeltaTai = RoomAirPattern(PattrnID)%VertPatrn%DeltaTaiPatrn(lowSideID)
ENDIF
AirPatternZoneInfo(ZoneNum)%Surf(i)%TadjacentAir = tmpDeltaTai + Tmean
ENDDO !surfaces in this zone
AirPatternZoneInfo(ZoneNum)%Tstat = RoomAirPattern(PattrnID)%DeltaTstat + Tmean
AirPatternZoneInfo(ZoneNum)%Tleaving = RoomAirPattern(PattrnID)%DeltaTleaving + Tmean
AirPatternZoneInfo(ZoneNum)%Texhaust = RoomAirPattern(PattrnID)%DeltaTexhaust + Tmean
RETURN
END SUBROUTINE FigureHeightPattern