Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | DeltaTemp | |||
real(kind=r64), | intent(in) | :: | Height | |||
real(kind=r64), | intent(in) | :: | SurfTemp | |||
real(kind=r64), | intent(in) | :: | SupplyAirTemp | |||
real(kind=r64), | intent(in) | :: | AirChangeRate | |||
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.
FUNCTION CalcBeausoleilMorrisonMixedOpposingWall(DeltaTemp, Height, SurfTemp, SupplyAirTemp, AirChangeRate, ZoneNum) RESULT (Hc)
! FUNCTION INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN Jul 2010
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Calculate model equation Beausoleil-Morrison's mixed flow regime
! with mechanical and bouyancy forces opposing each other along a Wall
! METHODOLOGY EMPLOYED:
! isolate function for equation.
! REFERENCES:
! Beausoleil-Morrison, I. 2000. The adaptive coupling of heat and
! air flow modeling within dynamic whole-building simulations.
! PhD. Thesis. University of Strathclyde, Glasgow, UK.
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: DeltaTemp ! [C] temperature difference between surface and air
REAL(r64), INTENT(IN) :: Height ! [m] characteristic size
REAL(r64), INTENT(IN) :: SurfTemp ![C] surface temperature
REAL(r64), INTENT(IN) :: SupplyAirTemp ![C] temperature of supply air into zone
REAL(r64), INTENT(IN) :: AirChangeRate ! [ACH] [1/hour] supply air ACH for zone
INTEGER, INTENT(IN) :: ZoneNum ! index of zone for messaging
REAL(r64) :: Hc ! function result
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: HcTmp1
REAL(r64) :: HcTmp2
REAL(r64) :: HcTmp3
INTEGER, SAVE :: ErrorIndex = 0
INTEGER, SAVE :: ErrorIndex2 = 0
IF ((DeltaTemp /= 0.d0) ) THEN ! protect divide by zero
IF (Height /= 0.d0) THEN
HcTmp1 = ( (( ((1.5d0 * (( ABS(DeltaTemp)/Height)**OneFourth))**6) &
+ ((1.23d0*( (ABS(DeltaTemp))**OneThird)**6) )**OneSixth)**0.5d0 &
- (( ((SurfTemp - SupplyAirTemp)/ABS(DeltaTemp)) *(-0.199d0 + 0.190d0*(AirChangeRate**0.8d0) ) )**3) ))**OneThird
HcTmp2 = 0.8d0 * (( ((1.5d0 * (( ABS(DeltaTemp)/Height)**OneFourth))**6) &
+ ((1.23d0*( (ABS(DeltaTemp))**OneThird)**6) ))**OneSixth)
ELSE
HcTmp1 = 9.999d0
HcTmp2 = 9.999d0
IF (ErrorIndex2 == 0) THEN
CALL ShowSevereMessage('CalcBeausoleilMorrisonMixedOpposingWall: Convection model not evaluated (would divide by zero)')
CALL ShowContinueError('Effective height is zero, convection model not applicable for zone named =' &
//TRIM(Zone(ZoneNum)%Name))
CALL ShowContinueError('Convection surface heat transfer coefficient set to 9.999 [W/m2-K] and the simulation continues')
ENDIF
CALL ShowRecurringSevereErrorAtEnd('CalcBeausoleilMorrisonMixedOpposingWall: Convection model not evaluated because ' &
//' of zero height and set to 9.999 [W/m2-K]', ErrorIndex2 )
ENDIF
HcTmp3 = 0.8d0 * ((SurfTemp - SupplyAirTemp)/ABS(DeltaTemp)) *(-0.199d0 + 0.190d0*(AirChangeRate**0.8d0) )
Hc = MAX( MAX(HcTmp1,HcTmp2), HcTmp3)
ELSE
Hc = 9.999d0
IF (.NOT. WarmUpFlag) THEN
IF (ErrorIndex == 0) Then
CALL ShowSevereMessage('CalcBeausoleilMorrisonMixedOpposingWall: Convection model not evaluated (would divide by zero)')
CALL ShowContinueError('The temperature difference between surface and air is zero')
CALL ShowContinueError('Occurs for zone named = ' //TRIM(Zone(ZoneNum)%Name))
CALL ShowContinueError('Convection surface heat transfer coefficient set to 9.999 [W/m2-K] and the simulation continues')
ENDIF
CALL ShowRecurringSevereErrorAtEnd('CalcBeausoleilMorrisonMixedOpposingWall: Convection model not evaluated because ' &
//'of zero temperature difference and set to 9.999 [W/m2-K]', ErrorIndex )
ENDIF
ENDIF
RETURN
END FUNCTION CalcBeausoleilMorrisonMixedOpposingWall