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.
SUBROUTINE ReportAirflowNetwork
! SUBROUTINE INFORMATION:
! AUTHOR Lixing Gu
! DATE WRITTEN 2/1/04
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine reports outputs of air distribution systems
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE DataHeatBalance, ONLY: MRT, ZonePreDefRep
Use DataHVACGlobals, ONLY: TimeStepSys, TurnFansOn, TurnFansOff
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: Lam = 2.5d6 ! Heat of vaporization (J/kg)
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
Integer I, N, M, ZN1, ZN2
REAL(r64) AirDensity, CpAir, Tamb
REAL(r64) :: ReportingConstant
REAL(r64) :: ReportingFraction
if (SimulateAirflowNetwork .lt. AirflowNetworkControlMultizone) return
ReportingConstant=TimeStepSys*SecInHour
AirflowNetworkReportData%MultiZoneInfiSenGainW = 0.0d0
AirflowNetworkReportData%MultiZoneInfiSenGainJ = 0.0d0
AirflowNetworkReportData%MultiZoneInfiSenLossW = 0.0d0
AirflowNetworkReportData%MultiZoneInfiSenLossJ = 0.0d0
AirflowNetworkReportData%MultiZoneInfiLatGainW = 0.0d0
AirflowNetworkReportData%MultiZoneInfiLatGainJ = 0.0d0
AirflowNetworkReportData%MultiZoneInfiLatLossW = 0.0d0
AirflowNetworkReportData%MultiZoneInfiLatLossJ = 0.0d0
AirflowNetworkReportData%MultiZoneMixSenGainW = 0.0d0
AirflowNetworkReportData%MultiZoneMixSenGainJ = 0.0d0
AirflowNetworkReportData%MultiZoneMixSenLossW = 0.0d0
AirflowNetworkReportData%MultiZoneMixSenLossJ = 0.0d0
AirflowNetworkReportData%MultiZoneMixLatGainW = 0.0d0
AirflowNetworkReportData%MultiZoneMixLatGainJ = 0.0d0
AirflowNetworkReportData%MultiZoneMixLatLossW = 0.0d0
AirflowNetworkReportData%MultiZoneMixLatLossJ = 0.0d0
AirflowNetworkReportData%LeakSenGainW = 0.0d0
AirflowNetworkReportData%LeakSenGainJ = 0.0d0
AirflowNetworkReportData%LeakSenLossW = 0.0d0
AirflowNetworkReportData%LeakSenLossJ = 0.0d0
AirflowNetworkReportData%LeakLatGainW = 0.0d0
AirflowNetworkReportData%LeakLatGainJ = 0.0d0
AirflowNetworkReportData%LeakLatLossW = 0.0d0
AirflowNetworkReportData%LeakLatLossJ = 0.0d0
AirflowNetworkReportData%CondSenGainW = 0.0d0
AirflowNetworkReportData%CondSenGainJ = 0.0d0
AirflowNetworkReportData%CondSenLossW = 0.0d0
AirflowNetworkReportData%CondSenLossJ = 0.0d0
AirflowNetworkReportData%DiffLatGainW = 0.0d0
AirflowNetworkReportData%DiffLatGainJ = 0.0d0
AirflowNetworkReportData%DiffLatLossW = 0.0d0
AirflowNetworkReportData%DiffLatLossJ = 0.0d0
AirflowNetworkReportData%TotalSenGainW = 0.0d0
AirflowNetworkReportData%TotalSenGainJ = 0.0d0
AirflowNetworkReportData%TotalSenLossW = 0.0d0
AirflowNetworkReportData%TotalSenLossJ = 0.0d0
AirflowNetworkReportData%TotalLatGainW = 0.0d0
AirflowNetworkReportData%TotalLatGainJ = 0.0d0
AirflowNetworkReportData%TotalLatLossW = 0.0d0
AirflowNetworkReportData%TotalLatLossJ = 0.0d0
! Calculate sensible and latent loads in each zone from multizone airflows
If (SimulateAirflowNetwork == AirflowNetworkControlMultizone .OR. SimulateAirflowNetwork == AirflowNetworkControlMultiADS .OR. &
(SimulateAirflowNetwork == AirflowNetworkControlSimpleADS .AND. AirflowNetworkFanActivated)) then
Do i=1, AirflowNetworkNumOfSurfaces ! Multizone airflow energy
N = AirflowNetworkLinkageData(i)%NodeNums(1)
M = AirflowNetworkLinkageData(i)%NodeNums(2)
ZN1 = AirflowNetworkNodeData(N)%EPlusZoneNum
ZN2 = AirflowNetworkNodeData(M)%EPlusZoneNum
! Find a linkage from a zone to outdoors
If (ZN1 > 0 .and. ZN2 == 0) then
Tamb = Zone(ZN1)%OutDryBulbTemp
CpAir = PsyCpAirFnWTdb(OutHumRat, Tamb)
If (Tamb > MAT(ZN1)) then
AirflowNetworkReportData(ZN1)%MultiZoneInfiSenGainW = AirflowNetworkReportData(ZN1)%MultiZoneInfiSenGainW + &
(AirflowNetworkLinkSimu(i)%FLOW2*CpAir*(Tamb-MAT(ZN1)))
AirflowNetworkReportData(ZN1)%MultiZoneInfiSenGainJ = AirflowNetworkReportData(ZN1)%MultiZoneInfiSenGainJ + &
(AirflowNetworkLinkSimu(i)%FLOW2*CpAir*(Tamb-MAT(ZN1)))*ReportingConstant
else
AirflowNetworkReportData(ZN1)%MultiZoneInfiSenLossW = AirflowNetworkReportData(ZN1)%MultiZoneInfiSenLossW + &
(AirflowNetworkLinkSimu(i)%FLOW2*CpAir*(MAT(ZN1)-Tamb))
AirflowNetworkReportData(ZN1)%MultiZoneInfiSenLossJ = AirflowNetworkReportData(ZN1)%MultiZoneInfiSenLossJ + &
(AirflowNetworkLinkSimu(i)%FLOW2*CpAir*(MAT(ZN1)-Tamb))*ReportingConstant
end if
If (OutHumRat > ZoneAirHumRat(ZN1)) then
AirflowNetworkReportData(ZN1)%MultiZoneInfiLatGainW = AirflowNetworkReportData(ZN1)%MultiZoneInfiLatGainW + &
(AirflowNetworkLinkSimu(i)%FLOW2*(OutHumRat-ZoneAirHumRat(ZN1)))
AirflowNetworkReportData(ZN1)%MultiZoneInfiLatGainJ = AirflowNetworkReportData(ZN1)%MultiZoneInfiLatGainJ + &
(AirflowNetworkLinkSimu(i)%FLOW2*(OutHumRat-ZoneAirHumRat(ZN1)))*ReportingConstant
else
AirflowNetworkReportData(ZN1)%MultiZoneInfiLatLossW = AirflowNetworkReportData(ZN1)%MultiZoneInfiLatLossW + &
(AirflowNetworkLinkSimu(i)%FLOW2*(ZoneAirHumRat(ZN1)-OutHumRat))
AirflowNetworkReportData(ZN1)%MultiZoneInfiLatLossJ = AirflowNetworkReportData(ZN1)%MultiZoneInfiLatLossJ + &
(AirflowNetworkLinkSimu(i)%FLOW2*(ZoneAirHumRat(ZN1)-OutHumRat))*ReportingConstant
end if
end if
If (ZN1 == 0 .and. ZN2 > 0) then
Tamb = Zone(ZN2)%OutDryBulbTemp
CpAir = PsyCpAirFnWTdb(OutHumRat, Tamb)
If (Tamb > MAT(ZN2)) then
AirflowNetworkReportData(ZN2)%MultiZoneInfiSenGainW = AirflowNetworkReportData(ZN2)%MultiZoneInfiSenGainW + &
(AirflowNetworkLinkSimu(i)%FLOW*CpAir*(Tamb-MAT(ZN2)))
AirflowNetworkReportData(ZN2)%MultiZoneInfiSenGainJ = AirflowNetworkReportData(ZN2)%MultiZoneInfiSenGainJ + &
(AirflowNetworkLinkSimu(i)%FLOW*CpAir*(Tamb-MAT(ZN2)))*ReportingConstant
else
AirflowNetworkReportData(ZN2)%MultiZoneInfiSenLossW = AirflowNetworkReportData(ZN2)%MultiZoneInfiSenLossW + &
(AirflowNetworkLinkSimu(i)%FLOW*CpAir*(MAT(ZN2)-Tamb))
AirflowNetworkReportData(ZN2)%MultiZoneInfiSenLossJ = AirflowNetworkReportData(ZN2)%MultiZoneInfiSenLossJ + &
(AirflowNetworkLinkSimu(i)%FLOW*CpAir*(MAT(ZN2)-Tamb))*ReportingConstant
end if
If (OutHumRat > ZoneAirHumRat(ZN2)) then
AirflowNetworkReportData(ZN2)%MultiZoneInfiLatGainW = AirflowNetworkReportData(ZN2)%MultiZoneInfiLatGainW + &
(AirflowNetworkLinkSimu(i)%FLOW*(OutHumRat-ZoneAirHumRat(ZN2)))
AirflowNetworkReportData(ZN2)%MultiZoneInfiLatGainJ = AirflowNetworkReportData(ZN2)%MultiZoneInfiLatGainJ + &
(AirflowNetworkLinkSimu(i)%FLOW*(OutHumRat-ZoneAirHumRat(ZN2)))*ReportingConstant
else
AirflowNetworkReportData(ZN2)%MultiZoneInfiLatLossW = AirflowNetworkReportData(ZN2)%MultiZoneInfiLatLossW + &
(AirflowNetworkLinkSimu(i)%FLOW*(ZoneAirHumRat(ZN2)-OutHumRat))
AirflowNetworkReportData(ZN2)%MultiZoneInfiLatLossJ = AirflowNetworkReportData(ZN2)%MultiZoneInfiLatLossJ + &
(AirflowNetworkLinkSimu(i)%FLOW*(ZoneAirHumRat(ZN2)-OutHumRat))*ReportingConstant
end if
end if
If (ZN1 > 0 .and. ZN2 > 0) then
CpAir = PsyCpAirFnWTdb(ZoneAirHumRat(ZN1), MAT(ZN1))
If (MAT(ZN1) > MAT(ZN2)) then
AirflowNetworkReportData(ZN2)%MultiZoneMixSenGainW = AirflowNetworkReportData(ZN2)%MultiZoneMixSenGainW + &
(AirflowNetworkLinkSimu(i)%FLOW*CpAir*(MAT(ZN1)-MAT(ZN2)))
AirflowNetworkReportData(ZN2)%MultiZoneMixSenGainJ = AirflowNetworkReportData(ZN2)%MultiZoneMixSenGainJ + &
(AirflowNetworkLinkSimu(i)%FLOW*CpAir*(MAT(ZN1)-MAT(ZN2)))*ReportingConstant
else
AirflowNetworkReportData(ZN2)%MultiZoneMixSenLossW = AirflowNetworkReportData(ZN2)%MultiZoneMixSenLossW + &
(AirflowNetworkLinkSimu(i)%FLOW*CpAir*(MAT(ZN2)-MAT(ZN1)))
AirflowNetworkReportData(ZN2)%MultiZoneMixSenLossJ = AirflowNetworkReportData(ZN2)%MultiZoneMixSenLossJ + &
(AirflowNetworkLinkSimu(i)%FLOW*CpAir*(MAT(ZN2)-MAT(ZN1)))*ReportingConstant
end if
If (ZoneAirHumRat(ZN1) > ZoneAirHumRat(ZN2)) then
AirflowNetworkReportData(ZN2)%MultiZoneMixLatGainW = AirflowNetworkReportData(ZN2)%MultiZoneMixLatGainW + &
(AirflowNetworkLinkSimu(i)%FLOW*(ZoneAirHumRat(ZN1)-ZoneAirHumRat(ZN2)))
AirflowNetworkReportData(ZN2)%MultiZoneMixLatGainJ = AirflowNetworkReportData(ZN2)%MultiZoneMixLatGainJ + &
(AirflowNetworkLinkSimu(i)%FLOW*(ZoneAirHumRat(ZN1)-ZoneAirHumRat(ZN2)))*ReportingConstant
else
AirflowNetworkReportData(ZN2)%MultiZoneMixLatLossW = AirflowNetworkReportData(ZN2)%MultiZoneMixLatLossW + &
(AirflowNetworkLinkSimu(i)%FLOW*(ZoneAirHumRat(ZN2)-ZoneAirHumRat(ZN1)))
AirflowNetworkReportData(ZN2)%MultiZoneMixLatLossJ = AirflowNetworkReportData(ZN2)%MultiZoneMixLatLossJ + &
(AirflowNetworkLinkSimu(i)%FLOW*(ZoneAirHumRat(ZN2)-ZoneAirHumRat(ZN1)))*ReportingConstant
end if
CpAir = PsyCpAirFnWTdb(ZoneAirHumRat(ZN2), MAT(ZN2))
If (MAT(ZN2) > MAT(ZN1)) then
AirflowNetworkReportData(ZN1)%MultiZoneMixSenGainW = AirflowNetworkReportData(ZN1)%MultiZoneMixSenGainW + &
(AirflowNetworkLinkSimu(i)%FLOW2*CpAir*(MAT(ZN2)-MAT(ZN1)))
AirflowNetworkReportData(ZN1)%MultiZoneMixSenGainJ = AirflowNetworkReportData(ZN1)%MultiZoneMixSenGainJ + &
(AirflowNetworkLinkSimu(i)%FLOW2*CpAir*(MAT(ZN2)-MAT(ZN1)))*ReportingConstant
else
AirflowNetworkReportData(ZN1)%MultiZoneMixSenLossW = AirflowNetworkReportData(ZN1)%MultiZoneMixSenLossW + &
(AirflowNetworkLinkSimu(i)%FLOW2*CpAir*(MAT(ZN1)-MAT(ZN2)))
AirflowNetworkReportData(ZN1)%MultiZoneMixSenLossJ = AirflowNetworkReportData(ZN1)%MultiZoneMixSenLossJ + &
(AirflowNetworkLinkSimu(i)%FLOW2*CpAir*(MAT(ZN1)-MAT(ZN2)))*ReportingConstant
end if
If (ZoneAirHumRat(ZN2) > ZoneAirHumRat(ZN1)) then
AirflowNetworkReportData(ZN1)%MultiZoneMixLatGainW = AirflowNetworkReportData(ZN1)%MultiZoneMixLatGainW + &
(AirflowNetworkLinkSimu(i)%FLOW2*(ZoneAirHumRat(ZN2)-ZoneAirHumRat(ZN1)))
AirflowNetworkReportData(ZN1)%MultiZoneMixLatGainJ = AirflowNetworkReportData(ZN1)%MultiZoneMixLatGainJ + &
(AirflowNetworkLinkSimu(i)%FLOW2*(ZoneAirHumRat(ZN2)-ZoneAirHumRat(ZN1)))*ReportingConstant
else
AirflowNetworkReportData(ZN1)%MultiZoneMixLatLossW = AirflowNetworkReportData(ZN1)%MultiZoneMixLatLossW + &
ABS(AirflowNetworkLinkSimu(i)%FLOW2*(ZoneAirHumRat(ZN1)-ZoneAirHumRat(ZN2)))
AirflowNetworkReportData(ZN1)%MultiZoneMixLatLossJ = AirflowNetworkReportData(ZN1)%MultiZoneMixLatLossJ + &
(AirflowNetworkLinkSimu(i)%FLOW2*(ZoneAirHumRat(ZN1)-ZoneAirHumRat(ZN2)))*ReportingConstant
end if
end if
End Do
End If
! Assign data for report
If (SimulateAirflowNetwork > AirflowNetworkControlMultizone) then
Do I=1,NumOfZones
if (AirflowNetworkExchangeData(I)%LeakSen > 0.0d0) then
AirflowNetworkReportData(I)%LeakSenGainW = AirflowNetworkExchangeData(I)%LeakSen
AirflowNetworkReportData(I)%LeakSenGainJ = AirflowNetworkExchangeData(I)%LeakSen*ReportingConstant
else
AirflowNetworkReportData(I)%LeakSenLossW = -AirflowNetworkExchangeData(I)%LeakSen
AirflowNetworkReportData(I)%LeakSenLossJ = -AirflowNetworkExchangeData(I)%LeakSen*ReportingConstant
end if
if (AirflowNetworkExchangeData(I)%LeakLat > 0.0d0) then
AirflowNetworkReportData(I)%LeakLatGainW = AirflowNetworkExchangeData(I)%LeakLat*Lam
AirflowNetworkReportData(I)%LeakLatGainJ = AirflowNetworkExchangeData(I)%LeakLat*Lam*ReportingConstant
else
AirflowNetworkReportData(I)%LeakLatLossW = -AirflowNetworkExchangeData(I)%LeakLat*Lam
AirflowNetworkReportData(I)%LeakLatLossJ = -AirflowNetworkExchangeData(I)%LeakLat*Lam*ReportingConstant
end if
if (AirflowNetworkExchangeData(I)%CondSen > 0.0d0) then
AirflowNetworkReportData(I)%CondSenGainW = AirflowNetworkExchangeData(I)%CondSen
AirflowNetworkReportData(I)%CondSenGainJ = AirflowNetworkExchangeData(I)%CondSen*ReportingConstant
else
AirflowNEtworkReportData(I)%CondSenLossW = -AirflowNetworkExchangeData(I)%CondSen
AirflowNEtworkReportData(I)%CondSenLossJ = -AirflowNetworkExchangeData(I)%CondSen*ReportingConstant
end if
if (AirflowNetworkExchangeData(I)%DiffLat > 0.0d0) then
AirflowNEtworkReportData(I)%DiffLatGainW = AirflowNetworkExchangeData(I)%DiffLat*Lam
AirflowNEtworkReportData(I)%DiffLatGainJ = AirflowNetworkExchangeData(I)%DiffLat*Lam*ReportingConstant
else
AirflowNEtworkReportData(I)%DiffLatLossW = -AirflowNetworkExchangeData(I)%DiffLat*Lam
AirflowNEtworkReportData(I)%DiffLatLossJ = -AirflowNetworkExchangeData(I)%DiffLat*Lam*ReportingConstant
end if
if (AirflowNetworkExchangeData(I)%TotalSen > 0.0d0) then
AirflowNEtworkReportData(I)%TotalSenGainW = AirflowNetworkExchangeData(I)%TotalSen
AirflowNEtworkReportData(I)%TotalSenGainJ = AirflowNetworkExchangeData(I)%TotalSen*ReportingConstant
else
AirflowNEtworkReportData(I)%TotalSenLossW = -AirflowNetworkExchangeData(I)%TotalSen
AirflowNEtworkReportData(I)%TotalSenLossJ = -AirflowNetworkExchangeData(I)%TotalSen*ReportingConstant
end if
if (AirflowNetworkExchangeData(I)%TotalLat > 0.0d0) then
AirflowNEtworkReportData(I)%TotalLatGainW = AirflowNetworkExchangeData(I)%TotalLat*Lam
AirflowNEtworkReportData(I)%TotalLatGainJ = AirflowNetworkExchangeData(I)%TotalLat*Lam*ReportingConstant
else
AirflowNEtworkReportData(I)%TotalLatLossW = -AirflowNetworkExchangeData(I)%TotalLat*Lam
AirflowNEtworkReportData(I)%TotalLatLossJ = -AirflowNetworkExchangeData(I)%TotalLat*Lam*ReportingConstant
end if
End Do
End If
! Zone report
AirflowNetworkZnRpt%MeanAirTemp = 0.0d0
AirflowNetworkZnRpt%OperativeTemp = 0.0d0
AirflowNetworkZnRpt%InfilHeatGain=0.0d0
AirflowNetworkZnRpt%InfilHeatLoss=0.0d0
AirflowNetworkZnRpt%InfilVolume=0.0d0
AirflowNetworkZnRpt%InfilMass=0.0d0
AirflowNetworkZnRpt%InfilAirChangeRate =0.0d0
AirflowNetworkZnRpt%MixVolume =0.0d0
AirflowNetworkZnRpt%MixMass =0.0d0
If (SupplyFanType .EQ. FanType_SimpleOnOff .AND. OnOffFanRunTimeFraction < 1.0d0 .AND. OnOffFanRunTimeFraction > 0.0d0) then
! ON Cycle calculation
DO I=1, NumOfZones
AirflowNetworkReportData(I)%MultiZoneInfiSenGainW=AirflowNetworkReportData(I)%MultiZoneInfiSenGainW*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneInfiSenGainJ=AirflowNetworkReportData(I)%MultiZoneInfiSenGainJ*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneInfiSenLossW=AirflowNetworkReportData(I)%MultiZoneInfiSenLossW*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneInfiSenLossJ=AirflowNetworkReportData(I)%MultiZoneInfiSenLossJ*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneInfiLatGainW=AirflowNetworkReportData(I)%MultiZoneInfiLatGainW*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneInfiLatGainJ=AirflowNetworkReportData(I)%MultiZoneInfiLatGainJ*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneInfiLatLossW=AirflowNetworkReportData(I)%MultiZoneInfiLatLossW*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneInfiLatLossJ=AirflowNetworkReportData(I)%MultiZoneInfiLatLossJ*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneMixSenGainW=AirflowNetworkReportData(I)%MultiZoneMixSenGainW*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneMixSenGainJ=AirflowNetworkReportData(I)%MultiZoneMixSenGainJ*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneMixSenLossW=AirflowNetworkReportData(I)%MultiZoneMixSenLossW*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneMixSenLossJ=AirflowNetworkReportData(I)%MultiZoneMixSenLossJ*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneMixLatGainW=AirflowNetworkReportData(I)%MultiZoneMixLatGainW*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneMixLatGainJ=AirflowNetworkReportData(I)%MultiZoneMixLatGainJ*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneMixLatLossW=AirflowNetworkReportData(I)%MultiZoneMixLatLossW*OnOffFanRunTimeFraction
AirflowNetworkReportData(I)%MultiZoneMixLatLossJ=AirflowNetworkReportData(I)%MultiZoneMixLatLossJ*OnOffFanRunTimeFraction
End Do
! Off Cycle addon
Do i=1, AirflowNetworkNumOfSurfaces ! Multizone airflow energy
N = AirflowNetworkLinkageData(i)%NodeNums(1)
M = AirflowNetworkLinkageData(i)%NodeNums(2)
ZN1 = AirflowNetworkNodeData(N)%EPlusZoneNum
ZN2 = AirflowNetworkNodeData(M)%EPlusZoneNum
ReportingFraction=(1.0d0-OnOffFanRunTimeFraction)
! Find a linkage from a zone to outdoors
If (ZN1 > 0 .and. ZN2 == 0) then
Tamb = Zone(ZN1)%OutDryBulbTemp
CpAir = PsyCpAirFnWTdb(OutHumRat, Tamb)
If (Tamb > MAT(ZN1)) then
AirflowNetworkReportData(ZN1)%MultiZoneInfiSenGainW = AirflowNetworkReportData(ZN1)%MultiZoneInfiSenGainW + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*CpAir*(Tamb-MAT(ZN1)))*(1.0d0-OnOffFanRunTimeFraction)
AirflowNetworkReportData(ZN1)%MultiZoneInfiSenGainJ = AirflowNetworkReportData(ZN1)%MultiZoneInfiSenGainJ + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*CpAir*(Tamb-MAT(ZN1)))*ReportingConstant*ReportingFraction
else
AirflowNetworkReportData(ZN1)%MultiZoneInfiSenLossW = AirflowNetworkReportData(ZN1)%MultiZoneInfiSenLossW + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*CpAir*(MAT(ZN1)-Tamb))*(1.0-OnOffFanRunTimeFraction)
AirflowNetworkReportData(ZN1)%MultiZoneInfiSenLossJ = AirflowNetworkReportData(ZN1)%MultiZoneInfiSenLossJ + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*CpAir*(MAT(ZN1)-Tamb))*ReportingConstant*ReportingFraction
end if
If (OutHumRat > ZoneAirHumRat(ZN1)) then
AirflowNetworkReportData(ZN1)%MultiZoneInfiLatGainW = AirflowNetworkReportData(ZN1)%MultiZoneInfiLatGainW + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*(OutHumRat-ZoneAirHumRat(ZN1)))*ReportingFraction
AirflowNetworkReportData(ZN1)%MultiZoneInfiLatGainJ = AirflowNetworkReportData(ZN1)%MultiZoneInfiLatGainJ + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*(OutHumRat-ZoneAirHumRat(ZN1)))*ReportingConstant*ReportingFraction
else
AirflowNetworkReportData(ZN1)%MultiZoneInfiLatLossW = AirflowNetworkReportData(ZN1)%MultiZoneInfiLatLossW + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*(ZoneAirHumRat(ZN1)-OutHumRat))*ReportingFraction
AirflowNetworkReportData(ZN1)%MultiZoneInfiLatLossJ = AirflowNetworkReportData(ZN1)%MultiZoneInfiLatLossJ + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*(ZoneAirHumRat(ZN1)-OutHumRat))*ReportingConstant*ReportingFraction
end if
end if
If (ZN1 == 0 .and. ZN2 > 0) then
Tamb = Zone(ZN2)%OutDryBulbTemp
CpAir = PsyCpAirFnWTdb(OutHumRat, Tamb)
If (Tamb > MAT(ZN2)) then
AirflowNetworkReportData(ZN2)%MultiZoneInfiSenGainW = AirflowNetworkReportData(ZN2)%MultiZoneInfiSenGainW + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*CpAir*(Tamb-MAT(ZN2)))*ReportingFraction
AirflowNetworkReportData(ZN2)%MultiZoneInfiSenGainJ = AirflowNetworkReportData(ZN2)%MultiZoneInfiSenGainJ + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*CpAir*(Tamb-MAT(ZN2)))*ReportingConstant*ReportingFraction
else
AirflowNetworkReportData(ZN2)%MultiZoneInfiSenLossW = AirflowNetworkReportData(ZN2)%MultiZoneInfiSenLossW + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*CpAir*(MAT(ZN2)-Tamb))*ReportingFraction
AirflowNetworkReportData(ZN2)%MultiZoneInfiSenLossJ = AirflowNetworkReportData(ZN2)%MultiZoneInfiSenLossJ + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*CpAir*(MAT(ZN2)-Tamb))*ReportingConstant*ReportingFraction
end if
If (OutHumRat > ZoneAirHumRat(ZN2)) then
AirflowNetworkReportData(ZN2)%MultiZoneInfiLatGainW = AirflowNetworkReportData(ZN2)%MultiZoneInfiLatGainW + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*(OutHumRat-ZoneAirHumRat(ZN2)))*ReportingFraction
AirflowNetworkReportData(ZN2)%MultiZoneInfiLatGainJ = AirflowNetworkReportData(ZN2)%MultiZoneInfiLatGainJ + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*(OutHumRat-ZoneAirHumRat(ZN2)))*ReportingConstant*ReportingFraction
else
AirflowNetworkReportData(ZN2)%MultiZoneInfiLatLossW = AirflowNetworkReportData(ZN2)%MultiZoneInfiLatLossW + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*(ZoneAirHumRat(ZN2)-OutHumRat))*ReportingFraction
AirflowNetworkReportData(ZN2)%MultiZoneInfiLatLossJ = AirflowNetworkReportData(ZN2)%MultiZoneInfiLatLossJ + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*(ZoneAirHumRat(ZN2)-OutHumRat))*ReportingConstant*ReportingFraction
end if
end if
If (ZN1 > 0 .and. ZN2 > 0) then
CpAir = PsyCpAirFnWTdb(ZoneAirHumRat(ZN1), MAT(ZN1))
If (MAT(ZN1) > MAT(ZN2)) then
AirflowNetworkReportData(ZN2)%MultiZoneMixSenGainW = AirflowNetworkReportData(ZN2)%MultiZoneMixSenGainW + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*CpAir*(MAT(ZN1)-MAT(ZN2)))*ReportingFraction
AirflowNetworkReportData(ZN2)%MultiZoneMixSenGainJ = AirflowNetworkReportData(ZN2)%MultiZoneMixSenGainJ + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*CpAir*(MAT(ZN1)-MAT(ZN2)))*ReportingConstant*ReportingFraction
else
AirflowNetworkReportData(ZN2)%MultiZoneMixSenLossW = AirflowNetworkReportData(ZN2)%MultiZoneMixSenLossW + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*CpAir*(MAT(ZN2)-MAT(ZN1)))*ReportingFraction
AirflowNetworkReportData(ZN2)%MultiZoneMixSenLossJ = AirflowNetworkReportData(ZN2)%MultiZoneMixSenLossJ + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*CpAir*(MAT(ZN2)-MAT(ZN1)))*ReportingConstant*ReportingFraction
end if
If (ZoneAirHumRat(ZN1) > ZoneAirHumRat(ZN2)) then
AirflowNetworkReportData(ZN2)%MultiZoneMixLatGainW = AirflowNetworkReportData(ZN2)%MultiZoneMixLatGainW + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*(ZoneAirHumRat(ZN1)-ZoneAirHumRat(ZN2)))*ReportingFraction
AirflowNetworkReportData(ZN2)%MultiZoneMixLatGainJ = AirflowNetworkReportData(ZN2)%MultiZoneMixLatGainJ + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*(ZoneAirHumRat(ZN1)-ZoneAirHumRat(ZN2)))*ReportingConstant*ReportingFraction
else
AirflowNetworkReportData(ZN2)%MultiZoneMixLatLossW = AirflowNetworkReportData(ZN2)%MultiZoneMixLatLossW + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*(ZoneAirHumRat(ZN2)-ZoneAirHumRat(ZN1)))*ReportingFraction
AirflowNetworkReportData(ZN2)%MultiZoneMixLatLossJ = AirflowNetworkReportData(ZN2)%MultiZoneMixLatLossJ + &
(AirflowNetworkLinkReport1(i)%FLOWOFF*(ZoneAirHumRat(ZN2)-ZoneAirHumRat(ZN1)))*ReportingConstant*ReportingFraction
end if
CpAir = PsyCpAirFnWTdb(ZoneAirHumRat(ZN2), MAT(ZN2))
If (MAT(ZN2) > MAT(ZN1)) then
AirflowNetworkReportData(ZN1)%MultiZoneMixSenGainW = AirflowNetworkReportData(ZN1)%MultiZoneMixSenGainW + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*CpAir*(MAT(ZN2)-MAT(ZN1)))*ReportingFraction
AirflowNetworkReportData(ZN1)%MultiZoneMixSenGainJ = AirflowNetworkReportData(ZN1)%MultiZoneMixSenGainJ + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*CpAir*(MAT(ZN2)-MAT(ZN1)))*ReportingConstant*ReportingFraction
else
AirflowNetworkReportData(ZN1)%MultiZoneMixSenLossW = AirflowNetworkReportData(ZN1)%MultiZoneMixSenLossW + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*CpAir*(MAT(ZN1)-MAT(ZN2)))*ReportingFraction
AirflowNetworkReportData(ZN1)%MultiZoneMixSenLossJ = AirflowNetworkReportData(ZN1)%MultiZoneMixSenLossJ + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*CpAir*(MAT(ZN1)-MAT(ZN2)))*ReportingConstant*ReportingFraction
end if
If (ZoneAirHumRat(ZN2) > ZoneAirHumRat(ZN1)) then
AirflowNetworkReportData(ZN1)%MultiZoneMixLatGainW = AirflowNetworkReportData(ZN1)%MultiZoneMixLatGainW + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*(ZoneAirHumRat(ZN2)-ZoneAirHumRat(ZN1)))*ReportingFraction
AirflowNetworkReportData(ZN1)%MultiZoneMixLatGainJ = AirflowNetworkReportData(ZN1)%MultiZoneMixLatGainJ + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*(ZoneAirHumRat(ZN2)-ZoneAirHumRat(ZN1)))*ReportingConstant*ReportingFraction
else
AirflowNetworkReportData(ZN1)%MultiZoneMixLatLossW = AirflowNetworkReportData(ZN1)%MultiZoneMixLatLossW + &
ABS(AirflowNetworkLinkReport1(i)%FLOW2OFF*(ZoneAirHumRat(ZN1)-ZoneAirHumRat(ZN2)))*ReportingFraction
AirflowNetworkReportData(ZN1)%MultiZoneMixLatLossJ = AirflowNetworkReportData(ZN1)%MultiZoneMixLatLossJ + &
(AirflowNetworkLinkReport1(i)%FLOW2OFF*(ZoneAirHumRat(ZN1)-ZoneAirHumRat(ZN2)))*ReportingConstant*ReportingFraction
end if
end if
End Do
End If
If (.NOT. (SimulateAirflowNetwork == AirflowNetworkControlMultizone .OR. &
SimulateAirflowNetwork == AirflowNetworkControlMultiADS)) Return
DO i = 1, NumOfZones
AirflowNetworkZnRpt(i)%MeanAirTemp = MAT(i)
AirflowNetworkZnRpt(i)%OperativeTemp = 0.5d0*(MAT(i)+MRT(i))
END DO
DO i = 1, NumOfZones ! Start of zone loads report variable update loop ...
Tamb = Zone(i)%OutDryBulbTemp
CpAir = PsyCpAirFnWTdb(ZoneAirHumRatAvg(i),MAT(i))
AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress,MAT(i),ZoneAirHumRatAvg(i))
IF (MAT(i) > Tamb) THEN
AirflowNetworkZnRpt(i)%InfilHeatLoss = AirflowNetworkExchangeData(i)%SumMCp*(MAT(i)-Tamb)*ReportingConstant
AirflowNetworkZnRpt(i)%InfilHeatGain=0.0d0
ELSE IF (MAT(i) <= Tamb) THEN
AirflowNetworkZnRpt(i)%InfilHeatGain = AirflowNetworkExchangeData(i)%SumMCp*(Tamb-MAT(i))*ReportingConstant
AirflowNetworkZnRpt(i)%InfilHeatLoss =0.0d0
END IF
AirflowNetworkZnRpt(i)%InfilVolume = (AirflowNetworkExchangeData(i)%SumMCp/CpAir/AirDensity)*ReportingConstant
AirflowNetworkZnRpt(i)%InfilAirChangeRate = AirflowNetworkZnRpt(i)%InfilVolume/(TimeStepSys*Zone(i)%Volume)
AirflowNetworkZnRpt(i)%InfilMass = (AirflowNetworkExchangeData(i)%SumMCp/CpAir)*ReportingConstant
AirflowNetworkZnRpt(i)%MixVolume = (AirflowNetworkExchangeData(i)%SumMMCp/CpAir/AirDensity)*ReportingConstant
AirflowNetworkZnRpt(i)%MixMass = (AirflowNetworkExchangeData(i)%SumMMCp/CPAir)*ReportingConstant
!save values for predefined report
IF (ZonePreDefRep(i)%isOccupied) THEN
ZonePreDefRep(i)%AFNInfilVolTotal = ZonePreDefRep(i)%AFNInfilVolTotal + &
AirflowNetworkZnRpt(i)%InfilVolume
IF (AirflowNetworkZnRpt(i)%InfilVolume .LT. ZonePreDefRep(i)%AFNInfilVolMin) THEN
ZonePreDefRep(i)%AFNInfilVolMin = AirflowNetworkZnRpt(i)%InfilVolume
END IF
END IF
END DO ! ... end of zone loads report variable update loop.
! Rewrite AirflowNetwork airflow rate
do i=1,NumOfLinksMultiZone
Tamb = OutDryBulbTempAt(AirflowNetworkLinkageData(i)%NodeHeights(1))
AirDensity = PsyRhoAirFnPbTdbW(OutBaroPress,Tamb,OutHumRat)
If (SupplyFanType .EQ. FanType_SimpleOnOff .AND. OnOffFanRunTimeFraction < 1.0d0 .AND. OnOffFanRunTimeFraction > 0.0d0) then
AirflowNetworkLinkReport(i)%VolFlow = AirflowNetworkLinkReport1(i)%Flow/AirDensity
AirflowNetworkLinkReport(i)%VolFlow2 = AirflowNetworkLinkReport1(i)%Flow2/AirDensity
Else
AirflowNetworkLinkReport(i)%VolFlow = AirflowNetworkLinkReport(i)%Flow/AirDensity
AirflowNetworkLinkReport(i)%VolFlow2 = AirflowNetworkLinkReport(i)%Flow2/AirDensity
End If
end do
If (AirflowNetworkNumOfLinks .gt. NumOfLinksMultiZone) Then
DO i = NumOfLinksMultiZone+1, AirflowNetworkNumOfLinks
N = AirflowNetworkLinkageData(i)%NodeNums(1)
M = AirflowNetworkLinkageData(i)%NodeNums(2)
AirDensity = PsyRhoAirFnPbTdbW((AirflowNetworkNodeSimu(N)%PZ+AirflowNetworkNodeSimu(M)%PZ)/2.d0+OutBaroPress, &
(AirflowNetworkNodeSimu(N)%TZ+AirflowNetworkNodeSimu(M)%TZ)/2.d0, &
(AirflowNetworkNodeSimu(N)%WZ+AirflowNetworkNodeSimu(M)%WZ)/2.d0)
If (SupplyFanType .EQ. FanType_SimpleOnOff .AND. OnOffFanRunTimeFraction < 1.0d0 .AND. OnOffFanRunTimeFraction > 0.0d0) then
AirflowNetworkLinkReport(i)%VolFlow = AirflowNetworkLinkReport(i)%Flow/AirDensity*(1.0d0-OnOffFanRunTimeFraction)
AirflowNetworkLinkReport(i)%VolFlow2 = AirflowNetworkLinkReport(i)%Flow2/AirDensity*(1.0d0-OnOffFanRunTimeFraction)
Else
AirflowNetworkLinkReport(i)%VolFlow = AirflowNetworkLinkReport(i)%Flow/AirDensity
AirflowNetworkLinkReport(i)%VolFlow2 = AirflowNetworkLinkReport(i)%Flow2/AirDensity
End If
End Do
End If
RETURN
END SUBROUTINE ReportAirflowNetwork