-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate Infiltration from Natural Ventilation Flows for AirflowNetwork #8689
Separate Infiltration from Natural Ventilation Flows for AirflowNetwork #8689
Conversation
\item | ||
HVAC,Sum,AFN Zone Ventilation Mass {[}kg{]} | ||
\item | ||
HVAC,Average,AFN Zone Ventilation Air Change Rate {[}ach{]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add 3 new output variables for natural ventilation flows
@@ -1493,6 +1493,8 @@ namespace AirflowNetwork { | |||
Real64 TotalLat; | |||
Real64 SumMCp; | |||
Real64 SumMCpT; | |||
Real64 SumMVCp; | |||
Real64 SumMVCpT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add 2 more variables to store ventilation values.
state.dataAirflowNetworkBalanceManager->AirflowNetworkZnRpt(i).VentilAirChangeRate, | ||
"System", | ||
"Average", | ||
Zone(i).Name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add output variables for report.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added AFN Zone Ventilation output variables to pertinent files (ones with AFN Zone Infiltration variables that also have openings).
@@ -9464,6 +9485,9 @@ namespace AirflowNetworkBalanceManager { | |||
e.InfilVolume = 0.0; | |||
e.InfilMass = 0.0; | |||
e.InfilAirChangeRate = 0.0; | |||
e.VentilVolume = 0.0; | |||
e.VentilMass = 0.0; | |||
e.VentilAirChangeRate = 0.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initialization.
state.dataAirflowNetworkBalanceManager->AirflowNetworkZnRpt(i).VentilAirChangeRate = | ||
state.dataAirflowNetworkBalanceManager->AirflowNetworkZnRpt(i).VentilVolume / (TimeStepSys * Zone(i).Volume); | ||
state.dataAirflowNetworkBalanceManager->AirflowNetworkZnRpt(i).VentilMass = | ||
(state.dataAirflowNetworkBalanceManager->exchangeData(i).SumMVCp / CpAir) * ReportingConstant; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calculate outputs for natural ventilation.
state.dataAirflowNetwork->AirflowNetworkLinkSimu(i).FLOW2 * CpAir; | ||
state.dataAirflowNetworkBalanceManager->exchangeData(ZN1).SumMVCpT += | ||
state.dataAirflowNetwork->AirflowNetworkLinkSimu(i).FLOW2 * CpAir * Tamb; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate infiltration and natural ventilation.
state.dataAirflowNetworkBalanceManager->exchangeData(ZoneNum).SumMMCp; | ||
MCpT_Total = state.dataAirflowNetworkBalanceManager->exchangeData(ZoneNum).SumMCpT + | ||
state.dataAirflowNetworkBalanceManager->exchangeData(ZoneNum).SumMVCpT + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add infiltration and ventilation impact together. A single variables was used previously.
state.dataAirflowNetworkBalanceManager->exchangeData(ZoneNum).SumMVCpT - | ||
(state.dataAirflowNetworkBalanceManager->exchangeData(ZoneNum).SumMCp + | ||
state.dataAirflowNetworkBalanceManager->exchangeData(ZoneNum).SumMVCp) * | ||
state.dataHeatBalFanSys->MAT(ZoneNum); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include infiltration and ventilation together.
…ate-AFN-infiltration-from-natural-ventilation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lgu1234 A few comments below. I also added some change to feed into the OA Details report. But something is off in that report that I still need to fix here.
@@ -12745,8 +12809,10 @@ namespace AirflowNetworkBalanceManager { | |||
CpAir = PsyCpAirFnW(state.dataHeatBalFanSys->ZoneAirHumRat(ZoneNum)); | |||
RhoAir = PsyRhoAirFnPbTdbW( | |||
state, state.dataEnvrn->OutBaroPress, state.dataHeatBalFanSys->MAT(ZoneNum), state.dataHeatBalFanSys->ZoneAirHumRat(ZoneNum)); | |||
InfilVolume = | |||
(state.dataAirflowNetworkBalanceManager->exchangeData(ZoneNum).SumMCp / CpAir / RhoAir) * TimeStepSys * DataGlobalConstants::SecInHour; | |||
InfilVolume = ((state.dataAirflowNetworkBalanceManager->exchangeData(ZoneNum).SumMCp + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid confusion down the road, I would rename this function from GetZoneInfilAirChangeRate
to something like GetZoneOutdoorAirChangeRate
or at least add comments here to explain why both infiltration and ventilation flows are summed here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Change the function name.
@@ -78,6 +78,7 @@ namespace AirflowNetworkBalanceManager { | |||
Real64 VentilHeatGain; // Heat Loss {W} due to ventilation | |||
Real64 VentilVolume; // Volume of Air {m3} due to ventilation | |||
Real64 VentilMass; // Mass of Air {kg} due to ventilation | |||
Real64 VentilAirChangeRate; // Infiltration air change rate {ach} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the comment: Infiltration --> Ventilation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…ate-AFN-infiltration-from-natural-ventilation
…' of https://github.com/NREL/EnergyPlus into 8475-Separate-AFN-infiltration-from-natural-ventilation
@lgu1234 I made a few more tweaks to this. For an opening, when it is closed, where does that airflow get recorded? Is that infiltration or ventilation? |
@mjwitte I assume airflow gets recorded in ventilation, when openings are closed. |
…ate-AFN-infiltration-from-natural-ventilation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lgu1234 After CI completes another round, I think this will be ready to merge. Feel free to review my changes if you want.
PreDefTableEntry(state, | ||
state.dataOutRptPredefined->pdchOaTaBzInfil, | ||
Zone(iZone).Name, | ||
ZonePreDefRep(iZone).InfilVolTotalStdDen + ZonePreDefRep(iZone).AFNInfilVolTotalStdDen); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is the source of many table diffs in the AFN files. Previously AFN infiltration was omitted from the Infiltration columns in the Outdoor Air Details report. I should probably post an issue about that.
state.dataAirflowNetworkBalanceManager->AirflowNetworkZnRpt(i).VentilAirChangeRate, | ||
"System", | ||
"Average", | ||
Zone(i).Name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added AFN Zone Ventilation output variables to pertinent files (ones with AFN Zone Infiltration variables that also have openings).
@mjwitte I reviewed your changes. They are OK with me. Thanks. |
…ate-AFN-infiltration-from-natural-ventilation
…ate-AFN-infiltration-from-natural-ventilation
Pull request overview
Fixes #8475
Separate the following output variables from infiltration to both Infiltration and Ventilation:
AFN Zone Infiltration Volume AirflowNetworkZnRpt(i).InfilVolume
AFN Zone Infiltration Mass AirflowNetworkZnRpt(i).InfilMass
AFN Zone Infiltration Air Change Rate AirflowNetworkZnRpt(i).InfilAirChangeRate
Add 3 new output variables:
AFN Zone Ventilation Volume AirflowNetworkZnRpt(i).VentilVolume
AFN Zone Ventilation Mass AirflowNetworkZnRpt(i).VentilMass
AFN Zone Ventilation Air Change Rate AirflowNetworkZnRpt(i).VentilAirChangeRate
Fixes #8716 Corrects AFN infiltration in the Outdoor Air Details Report.
Add AFN Zone Ventilation output variables to testfiles as appropriate (has openings and ahs AFN Zone Infiltration outputs already).
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.