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) | :: | SurfNum | |||
integer, | intent(in) | :: | ConvModelEquationNum | |||
real(kind=R64), | intent(out) | :: | Hc |
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 EvaluateIntHcModels(SurfNum, ConvModelEquationNum, Hc)
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith
! DATE WRITTEN Aug 2010
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! central case statement for calling inside convection models
! METHODOLOGY EMPLOYED:
! - fills value for Hc by calling the appropriate convection model, usually as a function.
! preperation of argument values for the function calls is contained in each Case block (repeats)
! - also updates the reference air temperature type for use in the surface heat balance calcs
! REFERENCES:
! na
! USE STATEMENTS:
USE DataHeatBalSurface, ONLY: TH, QdotConvInRepPerArea
USE DataHeatBalFanSys, ONLY: MAT
USE DataZoneEquipment
USE DataEnvironment, ONLY: OutBaroPress
USE Psychrometrics, ONLY: PsyRhoAirFnPbTdbW, PsyWFnTdpPb
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: SurfNum
INTEGER, INTENT(IN) :: ConvModelEquationNum
REAL(R64), INTENT(OUT) :: Hc ! calculated Hc value
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: SupplyAirTemp
REAL(r64) :: AirChangeRate
INTEGER :: ZoneNum ! zone associated with inside face of surface
INTEGER :: ZoneNode ! the system node for the zone, node index
INTEGER :: EquipNum
REAL(r64) :: SumMdotTemp
REAL(r64) :: SumMdot
REAL(r64) :: AirDensity
REAL(r64) :: AirSystemVolFlowRate
INTEGER :: thisZoneInletNode
REAL(r64) :: tmpHc
REAL(r64) :: ZoneMult ! local product of zone multiplier and zonelist multipler
tmpHc = 0.d0
!now call appropriate function to calculate Hc
SELECT CASE (ConvModelEquationNum)
CASE(HcInt_UserCurve)
CALL CalcUserDefinedInsideHcModel(SurfNum, Surface(SurfNum)%IntConvHcUserCurveIndex, tmpHc )
CASE(HcInt_ASHRAEVerticalWall)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcASHRAEVerticalWall((TH(SurfNum,1,2) - MAT(ZoneNum)))
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_WaltonUnstableHorizontalOrTilt)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcWaltonUnstableHorizontalOrTilt((TH(SurfNum,1,2) - MAT(ZoneNum)), &
Surface(SurfNum)%CosTilt ) !TODO verify CosTilt in vs out
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_WaltonStableHorizontalOrTilt)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcWaltonStableHorizontalOrTilt((TH(SurfNum,1,2) - MAT(ZoneNum)), &
Surface(SurfNum)%CosTilt ) !TODO verify CosTilt in vs out
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_FisherPedersenCeilDiffuserFloor)
ZoneNum = Surface(SurfNum)%Zone
ZoneNode = Zone(ZoneNum)%SystemZoneNodeNumber
IF (ZoneNode > 0) THEN
ZoneMult = Zone(ZoneNum)%Multiplier * Zone(ZoneNum)%ListMultiplier
AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress,Node(ZoneNode)%Temp,PsyWFnTdpPb(Node(ZoneNode)%Temp,OutBaroPress))
AirChangeRate = (Node(ZoneNode)%MassFlowRate * SecInHour)/ (AirDensity * Zone(ZoneNum)%Volume * ZoneMult)
AirChangeRate = MIN(AirChangeRate, MaxACH)
AirChangeRate = MAX(AirChangeRate, 0.0d0)
Surface(SurfNum)%TAirRef = ZoneSupplyAirTemp
ELSE
AirChangeRate = 0.d0
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
ENDIF
tmpHc = CalcFisherPedersenCeilDiffuserFloor(AirChangeRate)
CASE(HcInt_FisherPedersenCeilDiffuserCeiling)
ZoneNum = Surface(SurfNum)%Zone
ZoneNode = Zone(ZoneNum)%SystemZoneNodeNumber
IF (ZoneNode > 0 ) THEN
ZoneMult = Zone(ZoneNum)%Multiplier * Zone(ZoneNum)%ListMultiplier
AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress,Node(ZoneNode)%Temp,PsyWFnTdpPb(Node(ZoneNode)%Temp,OutBaroPress))
AirChangeRate = (Node(ZoneNode)%MassFlowRate * SecInHour)/ (AirDensity * Zone(ZoneNum)%Volume * ZoneMult)
AirChangeRate = MIN(AirChangeRate, MaxACH)
AirChangeRate = MAX(AirChangeRate, 0.0d0)
Surface(SurfNum)%TAirRef = ZoneSupplyAirTemp
ELSE
AirChangeRate = 0.d0
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
ENDIF
tmpHc = CalcFisherPedersenCeilDiffuserCeiling(AirChangeRate)
CASE(HcInt_FisherPedersenCeilDiffuserWalls)
ZoneNum = Surface(SurfNum)%Zone
ZoneNode = Zone(ZoneNum)%SystemZoneNodeNumber
IF (ZoneNode > 0) THEN
ZoneMult = Zone(ZoneNum)%Multiplier * Zone(ZoneNum)%ListMultiplier
AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress,Node(ZoneNode)%Temp,PsyWFnTdpPb(Node(ZoneNode)%Temp,OutBaroPress))
AirChangeRate = (Node(ZoneNode)%MassFlowRate * SecInHour)/ (AirDensity * Zone(ZoneNum)%Volume * ZoneMult)
AirChangeRate = MIN(AirChangeRate, MaxACH)
AirChangeRate = MAX(AirChangeRate, 0.0d0)
Surface(SurfNum)%TAirRef = ZoneSupplyAirTemp
ELSE
AirChangeRate = 0.d0
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
ENDIF
tmpHc = CalcFisherPedersenCeilDiffuserWalls(AirChangeRate)
CASE(HcInt_AlamdariHammondStableHorizontal)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcAlamdariHammondStableHorizontal((TH(SurfNum,1,2) - MAT(ZoneNum)), &
Surface(SurfNum)%IntConvZoneHorizHydrDiam, SurfNum )
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_AlamdariHammondVerticalWall)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcAlamdariHammondVerticalWall((TH(SurfNum,1,2) - MAT(ZoneNum)), &
Surface(SurfNum)%IntConvZoneWallHeight, SurfNum )
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_AlamdariHammondUnstableHorizontal)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcAlamdariHammondUnstableHorizontal((TH(SurfNum,1,2) - MAT(ZoneNum)), &
Surface(SurfNum)%IntConvZoneHorizHydrDiam , SurfNum)
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_KhalifaEq3WallAwayFromHeat)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcKhalifaEq3WallAwayFromHeat((TH(SurfNum,1,2) - MAT(ZoneNum)) )
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_KhalifaEq4CeilingAwayFromHeat)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcKhalifaEq4CeilingAwayFromHeat((TH(SurfNum,1,2) - MAT(ZoneNum)) )
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_KhalifaEq5WallNearHeat)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcKhalifaEq5WallsNearHeat((TH(SurfNum,1,2) - MAT(ZoneNum)) )
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_KhalifaEq6NonHeatedWalls)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcKhalifaEq6NonHeatedWalls((TH(SurfNum,1,2) - MAT(ZoneNum)) )
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_KhalifaEq7Ceiling)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcKhalifaEq7Ceiling((TH(SurfNum,1,2) - MAT(ZoneNum)) )
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_AwbiHattonHeatedFloor)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcAwbiHattonHeatedFloor((TH(SurfNum,1,2) - MAT(ZoneNum)), &
Surface(SurfNum)%IntConvZoneHorizHydrDiam )
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_AwbiHattonHeatedWall)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcAwbiHattonHeatedWall((TH(SurfNum,1,2) - MAT(ZoneNum)), &
Surface(SurfNum)%IntConvZoneHorizHydrDiam )
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_BeausoleilMorrisonMixedAssistingWall)
ZoneNum = Surface(SurfNum)%Zone
ZoneNode = Zone(ZoneNum)%SystemZoneNodeNumber
IF (ZoneNode > 0 ) THEN
ZoneMult = Zone(ZoneNum)%Multiplier * Zone(ZoneNum)%ListMultiplier
AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress,Node(ZoneNode)%Temp,PsyWFnTdpPb(Node(ZoneNode)%Temp,OutBaroPress))
AirChangeRate = (Node(ZoneNode)%MassFlowRate * SecInHour)/ (AirDensity * Zone(ZoneNum)%Volume * ZoneMult)
SumMdotTemp = 0.d0
SumMdot = 0.d0
DO EquipNum = 1, ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%NumOfEquipTypes
IF (ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%EquipData(EquipNum)%NumOutlets > 0) THEN
thisZoneInletNode = ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%EquipData(EquipNum)%OutletNodeNums(1)
IF ((thisZoneInletNode > 0) .AND. (Node(thisZoneInletNode)%MassFlowRate > 0.d0)) THEN
SumMdotTemp = SumMdotTemp + Node(thisZoneInletNode)%MassFlowRate * Node(thisZoneInletNode)%Temp
SumMdot = SumMdot + Node(thisZoneInletNode)%MassFlowRate
ENDIF
ENDIF
ENDDO
IF (SumMdot > 0.d0) THEN
SupplyAirTemp = SumMdotTemp / SumMdot ! mass flow weighted inlet temperature
ELSE
IF (thisZoneInletNode > 0) THEN
SupplyAirTemp = Node(thisZoneInletNode)%Temp
ELSE
SupplyAirTemp = Node(ZoneNode)%Temp
ENDIF
ENDIF
ELSE
AirChangeRate = 0.d0
SupplyAirTemp = Node(ZoneNode)%Temp
ENDIF
tmpHc = CalcBeausoleilMorrisonMixedAssistedWall((TH(SurfNum,1,2) - MAT(ZoneNum)), &
Surface(SurfNum)%IntConvZoneWallHeight, &
TH(SurfNum,1,2), &
SupplyAirTemp, &
AirChangeRate, ZoneNum)
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_BeausoleilMorrisonMixedOppossingWall)
ZoneNum = Surface(SurfNum)%Zone
ZoneNode = Zone(ZoneNum)%SystemZoneNodeNumber
IF (ZoneNode > 0) THEN
ZoneMult = Zone(ZoneNum)%Multiplier * Zone(ZoneNum)%ListMultiplier
AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress,Node(ZoneNode)%Temp,PsyWFnTdpPb(Node(ZoneNode)%Temp,OutBaroPress))
AirChangeRate = (Node(ZoneNode)%MassFlowRate * SecInHour)/ (AirDensity * Zone(ZoneNum)%Volume* ZoneMult)
SumMdotTemp = 0.d0
SumMdot = 0.d0
DO EquipNum = 1, ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%NumOfEquipTypes
IF (ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%EquipData(EquipNum)%NumOutlets > 0) THEN
thisZoneInletNode = ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%EquipData(EquipNum)%OutletNodeNums(1)
IF ((thisZoneInletNode > 0) .AND. (Node(thisZoneInletNode)%MassFlowRate > 0.d0)) THEN
SumMdotTemp = SumMdotTemp + Node(thisZoneInletNode)%MassFlowRate * Node(thisZoneInletNode)%Temp
SumMdot = SumMdot + Node(thisZoneInletNode)%MassFlowRate
ENDIF
ENDIF
ENDDO
IF (SumMdot > 0.d0) THEN
SupplyAirTemp = SumMdotTemp / SumMdot ! mass flow weighted inlet temperature
ELSE
IF (thisZoneInletNode > 0) THEN
SupplyAirTemp = Node(thisZoneInletNode)%Temp
ELSE
SupplyAirTemp = Node(ZoneNode)%Temp
ENDIF
ENDIF
ELSE
AirChangeRate = 0.d0
SupplyAirTemp = Node(ZoneNode)%Temp
ENDIF
tmpHc = CalcBeausoleilMorrisonMixedOpposingWall((TH(SurfNum,1,2) - MAT(ZoneNum)), &
Surface(SurfNum)%IntConvZoneWallHeight, &
TH(SurfNum,1,2), &
SupplyAirTemp, &
AirChangeRate, ZoneNum)
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_BeausoleilMorrisonMixedStableCeiling)
ZoneNum = Surface(SurfNum)%Zone
ZoneNode = Zone(ZoneNum)%SystemZoneNodeNumber
IF (ZoneNode > 0) THEN
ZoneMult = Zone(ZoneNum)%Multiplier * Zone(ZoneNum)%ListMultiplier
AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress,Node(ZoneNode)%Temp,PsyWFnTdpPb(Node(ZoneNode)%Temp,OutBaroPress))
AirChangeRate = (Node(ZoneNode)%MassFlowRate * SecInHour)/ (AirDensity * Zone(ZoneNum)%Volume * ZoneMult)
SumMdotTemp = 0.d0
SumMdot = 0.d0
DO EquipNum = 1, ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%NumOfEquipTypes
IF (ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%EquipData(EquipNum)%NumOutlets > 0) THEN
thisZoneInletNode = ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%EquipData(EquipNum)%OutletNodeNums(1)
IF ((thisZoneInletNode > 0) .AND. (Node(thisZoneInletNode)%MassFlowRate > 0.d0)) THEN
SumMdotTemp = SumMdotTemp + Node(thisZoneInletNode)%MassFlowRate * Node(thisZoneInletNode)%Temp
SumMdot = SumMdot + Node(thisZoneInletNode)%MassFlowRate
ENDIF
ENDIF
ENDDO
IF (SumMdot > 0.d0) THEN
SupplyAirTemp = SumMdotTemp / SumMdot ! mass flow weighted inlet temperature
ELSE
IF (thisZoneInletNode > 0) THEN
SupplyAirTemp = Node(thisZoneInletNode)%Temp
ELSE
SupplyAirTemp = Node(ZoneNode)%Temp
ENDIF
ENDIF
ELSE
AirChangeRate = 0.d0
SupplyAirTemp = Node(ZoneNode)%Temp
ENDIF
tmpHc = CalcBeausoleilMorrisonMixedStableCeiling((TH(SurfNum,1,2) - MAT(ZoneNum)), &
Surface(SurfNum)%IntConvZoneHorizHydrDiam, &
TH(SurfNum,1,2), &
SupplyAirTemp, &
AirChangeRate, ZoneNum)
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_BeausoleilMorrisonMixedUnstableCeiling)
ZoneNum = Surface(SurfNum)%Zone
ZoneNode = Zone(ZoneNum)%SystemZoneNodeNumber
IF (ZoneNode > 0) THEN
ZoneMult = Zone(ZoneNum)%Multiplier * Zone(ZoneNum)%ListMultiplier
AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress,Node(ZoneNode)%Temp,PsyWFnTdpPb(Node(ZoneNode)%Temp,OutBaroPress))
AirChangeRate = (Node(ZoneNode)%MassFlowRate * SecInHour)/ (AirDensity * Zone(ZoneNum)%Volume * ZoneMult)
SumMdotTemp = 0.d0
SumMdot = 0.d0
DO EquipNum = 1, ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%NumOfEquipTypes
IF (ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%EquipData(EquipNum)%NumOutlets > 0) THEN
thisZoneInletNode = ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%EquipData(EquipNum)%OutletNodeNums(1)
IF ((thisZoneInletNode > 0) .AND. (Node(thisZoneInletNode)%MassFlowRate > 0.d0)) THEN
SumMdotTemp = SumMdotTemp + Node(thisZoneInletNode)%MassFlowRate * Node(thisZoneInletNode)%Temp
SumMdot = SumMdot + Node(thisZoneInletNode)%MassFlowRate
ENDIF
ENDIF
ENDDO
IF (SumMdot > 0.d0) THEN
SupplyAirTemp = SumMdotTemp / SumMdot ! mass flow weighted inlet temperature
ELSE
IF (thisZoneInletNode > 0) THEN
SupplyAirTemp = Node(thisZoneInletNode)%Temp
ELSE
SupplyAirTemp = Node(ZoneNode)%Temp
ENDIF
ENDIF
ELSE
AirChangeRate = 0.d0
SupplyAirTemp = Node(ZoneNode)%Temp
ENDIF
tmpHc = CalcBeausoleilMorrisonMixedUnstableCeiling((TH(SurfNum,1,2) - MAT(ZoneNum)), &
Surface(SurfNum)%IntConvZoneHorizHydrDiam, &
TH(SurfNum,1,2), &
SupplyAirTemp, &
AirChangeRate, ZoneNum)
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_BeausoleilMorrisonMixedStableFloor)
ZoneNum = Surface(SurfNum)%Zone
ZoneNode = Zone(ZoneNum)%SystemZoneNodeNumber
IF (ZoneNode > 0) THEN
ZoneMult = Zone(ZoneNum)%Multiplier * Zone(ZoneNum)%ListMultiplier
AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress,Node(ZoneNode)%Temp,PsyWFnTdpPb(Node(ZoneNode)%Temp,OutBaroPress))
AirChangeRate = (Node(ZoneNode)%MassFlowRate * SecInHour)/ (AirDensity * Zone(ZoneNum)%Volume * ZoneMult)
SumMdotTemp = 0.d0
SumMdot = 0.d0
DO EquipNum = 1, ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%NumOfEquipTypes
IF (ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%EquipData(EquipNum)%NumOutlets > 0) THEN
thisZoneInletNode = ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%EquipData(EquipNum)%OutletNodeNums(1)
IF ((thisZoneInletNode > 0) .AND. (Node(thisZoneInletNode)%MassFlowRate > 0.d0)) THEN
SumMdotTemp = SumMdotTemp + Node(thisZoneInletNode)%MassFlowRate * Node(thisZoneInletNode)%Temp
SumMdot = SumMdot + Node(thisZoneInletNode)%MassFlowRate
ENDIF
ENDIF
ENDDO
IF (SumMdot > 0.d0) THEN
SupplyAirTemp = SumMdotTemp / SumMdot ! mass flow weighted inlet temperature
ELSE
IF (thisZoneInletNode > 0) THEN
SupplyAirTemp = Node(thisZoneInletNode)%Temp
ELSE
SupplyAirTemp = Node(ZoneNode)%Temp
ENDIF
ENDIF
ELSE
AirChangeRate = 0.d0
SupplyAirTemp = Node(ZoneNode)%Temp
ENDIF
tmpHc = CalcBeausoleilMorrisonMixedStableFloor((TH(SurfNum,1,2) - MAT(ZoneNum)), &
Surface(SurfNum)%IntConvZoneHorizHydrDiam, &
TH(SurfNum,1,2), &
SupplyAirTemp, &
AirChangeRate, ZoneNum)
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_BeausoleilMorrisonMixedUnstableFloor)
ZoneNum = Surface(SurfNum)%Zone
ZoneNode = Zone(ZoneNum)%SystemZoneNodeNumber
IF (ZoneNode > 0.d0) THEN
ZoneMult = Zone(ZoneNum)%Multiplier * Zone(ZoneNum)%ListMultiplier
AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress,Node(ZoneNode)%Temp,PsyWFnTdpPb(Node(ZoneNode)%Temp,OutBaroPress))
AirChangeRate = (Node(ZoneNode)%MassFlowRate * SecInHour)/ (AirDensity * Zone(ZoneNum)%Volume * ZoneMult)
SumMdotTemp = 0.d0
SumMdot = 0.d0
DO EquipNum = 1, ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%NumOfEquipTypes
IF (ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%EquipData(EquipNum)%NumOutlets > 0) THEN
thisZoneInletNode = ZoneEquipList(ZoneEquipConfig(ZoneNum)%EquipListIndex)%EquipData(EquipNum)%OutletNodeNums(1)
IF ((thisZoneInletNode > 0) .AND. (Node(thisZoneInletNode)%MassFlowRate > 0.d0)) THEN
SumMdotTemp = SumMdotTemp + Node(thisZoneInletNode)%MassFlowRate * Node(thisZoneInletNode)%Temp
SumMdot = SumMdot + Node(thisZoneInletNode)%MassFlowRate
ENDIF
ENDIF
ENDDO
IF (SumMdot > 0.d0) THEN
SupplyAirTemp = SumMdotTemp / SumMdot ! mass flow weighted inlet temperature
ELSE
IF (thisZoneInletNode > 0) THEN
SupplyAirTemp = Node(thisZoneInletNode)%Temp
ELSE
SupplyAirTemp = Node(ZoneNode)%Temp
ENDIF
ENDIF
ELSE
AirChangeRate = 0.d0
SupplyAirTemp = Node(ZoneNode)%Temp
ENDIF
tmpHc = CalcBeausoleilMorrisonMixedUnstableFloor((TH(SurfNum,1,2) - MAT(ZoneNum)), &
Surface(SurfNum)%IntConvZoneHorizHydrDiam, &
TH(SurfNum,1,2), &
SupplyAirTemp, &
AirChangeRate, ZoneNum)
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_FohannoPolidoriVerticalWall)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcFohannoPolidoriVerticalWall((TH(SurfNum,1,2) - MAT(ZoneNum)), &
Surface(SurfNum)%IntConvZoneWallHeight, &
TH(SurfNum,1,2), &
- QdotConvInRepPerArea(SurfNum), SurfNum)
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_KaradagChilledCeiling)
ZoneNum = Surface(SurfNum)%Zone
tmpHc = CalcKaradagChilledCeiling((TH(SurfNum,1,2) - MAT(ZoneNum)))
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_ISO15099Windows)
ZoneNum = Surface(SurfNum)%Zone
CALL CalcISO15099WindowIntConvCoeff(SurfNum,TH(SurfNum,1,2),MAT(ZoneNum))
tmpHc = HconvIn(SurfNum)
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
CASE(HcInt_GoldsteinNovoselacCeilingDiffuserWindow)
ZoneNum = Surface(SurfNum)%Zone
ZoneNode = Zone(ZoneNum)%SystemZoneNodeNumber
IF (ZoneNode > 0) THEN
ZoneMult = Zone(ZoneNum)%Multiplier * Zone(ZoneNum)%ListMultiplier
AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress,Node(ZoneNode)%Temp,PsyWFnTdpPb(Node(ZoneNode)%Temp,OutBaroPress))
AirSystemVolFlowRate = Node(ZoneNode)%MassFlowRate /(AirDensity * ZoneMult)
Surface(SurfNum)%TAirRef = ZoneSupplyAirTemp
ELSE
AirSystemVolFlowRate = 0.d0
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
ENDIF
tmpHc = CalcGoldsteinNovoselacCeilingDiffuserWindow(AirSystemVolFlowRate, &
Surface(SurfNum)%IntConvZonePerimLength, &
Surface(SurfNum)%IntConvWindowWallRatio, &
Surface(SurfNum)%IntConvWindowLocation, ZoneNum)
CASE(HcInt_GoldsteinNovoselacCeilingDiffuserWalls)
ZoneNum = Surface(SurfNum)%Zone
ZoneNode = Zone(ZoneNum)%SystemZoneNodeNumber
IF (ZoneNode > 0) THEN
ZoneMult = Zone(ZoneNum)%Multiplier * Zone(ZoneNum)%ListMultiplier
AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress,Node(ZoneNode)%Temp,PsyWFnTdpPb(Node(ZoneNode)%Temp,OutBaroPress))
AirSystemVolFlowRate = Node(ZoneNode)%MassFlowRate /(AirDensity * ZoneMult)
Surface(SurfNum)%TAirRef = ZoneSupplyAirTemp
ELSE
AirSystemVolFlowRate = 0.d0
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
ENDIF
tmpHc = CalcGoldsteinNovoselacCeilingDiffuserWall(AirSystemVolFlowRate, &
Surface(SurfNum)%IntConvZonePerimLength, &
Surface(SurfNum)%IntConvWindowLocation, ZoneNum )
CASE(HcInt_GoldsteinNovoselacCeilingDiffuserFloor)
ZoneNum = Surface(SurfNum)%Zone
ZoneNode = Zone(ZoneNum)%SystemZoneNodeNumber
IF (ZoneNode > 0) THEN
ZoneMult = Zone(ZoneNum)%Multiplier * Zone(ZoneNum)%ListMultiplier
AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress,Node(ZoneNode)%Temp,PsyWFnTdpPb(Node(ZoneNode)%Temp,OutBaroPress))
AirSystemVolFlowRate = Node(ZoneNode)%MassFlowRate / (AirDensity * ZoneMult)
Surface(SurfNum)%TAirRef = ZoneSupplyAirTemp
ELSE
AirSystemVolFlowRate = 0.d0
Surface(SurfNum)%TAirRef = ZoneMeanAirTemp
ENDIF
tmpHc = CalcGoldsteinNovoselacCeilingDiffuserFloor(AirSystemVolFlowRate, &
Surface(SurfNum)%IntConvZonePerimLength, ZoneNum )
END SELECT
IF (tmpHc < AdaptiveHcInsideLowLimit) tmpHc = AdaptiveHcInsideLowLimit
Hc = tmpHc
RETURN
END SUBROUTINE EvaluateIntHcModels