Skip to content

Commit

Permalink
OA Report - continue airloop tables
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Jan 30, 2021
1 parent 233e9c2 commit 112e7c6
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/EnergyPlus/OutputReportTabular.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5959,14 +5959,14 @@ namespace EnergyPlus::OutputReportTabular {
Real64 totalNatVentRateOcc = 0;
Real64 totalInfilRateOcc = 0;
Real64 totalVozDynOcc = 0;
Real64 totalAirLoopsMechVentVol = 0;
Real64 totalAirLoopsNatVentVol = 0;
Real64 totalAirLoopsInfilVol = 0;
Real64 totalAirLoopsVozDyn = 0;
Real64 totalAirLoopsMechVentRateOcc = 0;
Real64 totalAirLoopsNatVentRateOcc = 0;
Real64 totalAirLoopsInfilRateOcc = 0;
Real64 totalAirLoopsVozDynOcc = 0;
//Real64 totalAirLoopsMechVentVol = 0;
//Real64 totalAirLoopsNatVentVol = 0;
//Real64 totalAirLoopsInfilVol = 0;
//Real64 totalAirLoopsVozDyn = 0;
//Real64 totalAirLoopsMechVentRateOcc = 0;
//Real64 totalAirLoopsNatVentRateOcc = 0;
//Real64 totalAirLoopsInfilRateOcc = 0;
//Real64 totalAirLoopsVozDynOcc = 0;
for (iZone = 1; iZone <= state.dataGlobal->NumOfZones; ++iZone) {
int const zoneMult = Zone(iZone).Multiplier * Zone(iZone).ListMultiplier;
if (Zone(iZone).SystemZoneNodeNumber >= 0) { // conditioned zones only
Expand Down
114 changes: 113 additions & 1 deletion src/EnergyPlus/SystemReports.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#include <EnergyPlus/Data/EnergyPlusData.hh>
#include <EnergyPlus/DataAirLoop.hh>
#include <EnergyPlus/DataAirSystems.hh>
#include <EnergyPlus/DataDefineEquip.hh>
#include <EnergyPlus/DataEnvironment.hh>
#include <EnergyPlus/DataGlobalConstants.hh>
#include <EnergyPlus/DataHVACGlobals.hh>
Expand Down Expand Up @@ -1659,6 +1660,13 @@ namespace EnergyPlus::SystemReports {
state.dataSysRpts->ZoneTimeAboveVozDyn.allocate(state.dataGlobal->NumOfZones);
state.dataSysRpts->ZoneTimeVentUnocc.allocate(state.dataGlobal->NumOfZones);

state.dataSysRpts->SysNatVentFlow.allocate(NumPrimaryAirSys);
state.dataSysRpts->SysTargetVentilationFlowVoz.allocate(NumPrimaryAirSys);
state.dataSysRpts->SysTimeBelowVozDyn.allocate(NumPrimaryAirSys);
state.dataSysRpts->SysTimeAtVozDyn.allocate(NumPrimaryAirSys);
state.dataSysRpts->SysTimeAboveVozDyn.allocate(NumPrimaryAirSys);
state.dataSysRpts->SysTimeVentUnocc.allocate(NumPrimaryAirSys);

state.dataSysRpts->SysTotZoneLoadHTNG.allocate(NumPrimaryAirSys);
state.dataSysRpts->SysTotZoneLoadCLNG.allocate(NumPrimaryAirSys);
state.dataSysRpts->SysOALoadHTNG.allocate(NumPrimaryAirSys);
Expand Down Expand Up @@ -1741,6 +1749,13 @@ namespace EnergyPlus::SystemReports {
state.dataSysRpts->ZoneTimeAboveVozDyn = 0.0;
state.dataSysRpts->ZoneTimeVentUnocc = 0.0;

state.dataSysRpts->SysNatVentFlow = 0.0;
state.dataSysRpts->SysTargetVentilationFlowVoz = 0.0;
state.dataSysRpts->SysTimeBelowVozDyn = 0.0;
state.dataSysRpts->SysTimeAtVozDyn = 0.0;
state.dataSysRpts->SysTimeAboveVozDyn = 0.0;
state.dataSysRpts->SysTimeVentUnocc = 0.0;

// SYSTEM LOADS REPORT
state.dataSysRpts->SysTotZoneLoadHTNG = 0.0;
state.dataSysRpts->SysTotZoneLoadCLNG = 0.0;
Expand Down Expand Up @@ -2016,6 +2031,55 @@ namespace EnergyPlus::SystemReports {
"HVAC",
"Sum",
state.dataAirSystemsData->PrimaryAirSystems(SysIndex).Name);

SetupOutputVariable(state,
"Air System Natural Ventilation Flow Rate",
OutputProcessor::Unit::m3_s,
state.dataSysRpts->SysNatVentFlow(SysIndex),
"HVAC",
"Sum",
state.dataAirSystemsData->PrimaryAirSystems(SysIndex).Name);

SetupOutputVariable(state,
"Air System Target Voz Ventilation Flow Rate",
OutputProcessor::Unit::m3_s,
state.dataSysRpts->SysTargetVentilationFlowVoz(SysIndex),
"HVAC",
"Sum",
state.dataAirSystemsData->PrimaryAirSystems(SysIndex).Name);

SetupOutputVariable(state,
"Air System Ventilation Below Target Voz Time",
OutputProcessor::Unit::hr,
state.dataSysRpts->SysTimeBelowVozDyn(SysIndex),
"HVAC",
"Sum",
state.dataAirSystemsData->PrimaryAirSystems(SysIndex).Name);

SetupOutputVariable(state,
"Air System Ventilation At Target Voz Time",
OutputProcessor::Unit::hr,
state.dataSysRpts->SysTimeAtVozDyn(SysIndex),
"HVAC",
"Sum",
state.dataAirSystemsData->PrimaryAirSystems(SysIndex).Name);

SetupOutputVariable(state,
"Air System Ventilation Above Target Voz Time",
OutputProcessor::Unit::hr,
state.dataSysRpts->SysTimeAboveVozDyn(SysIndex),
"HVAC",
"Sum",
state.dataAirSystemsData->PrimaryAirSystems(SysIndex).Name);

SetupOutputVariable(state,
"Air System Ventilation When Unoccupied Time",
OutputProcessor::Unit::hr,
state.dataSysRpts->SysTimeVentUnocc(SysIndex),
"HVAC",
"Sum",
state.dataAirSystemsData->PrimaryAirSystems(SysIndex).Name);

}
}
for (int ZoneIndex = 1; ZoneIndex <= state.dataGlobal->NumOfZones; ++ZoneIndex) {
Expand Down Expand Up @@ -4221,6 +4285,20 @@ namespace EnergyPlus::SystemReports {
state.dataSysRpts->MaxNoLoadHeatingByVent = 0.0;
state.dataSysRpts->MaxNoLoadCoolingByVent = 0.0;

state.dataSysRpts->SysNatVentFlow = 0.0;
state.dataSysRpts->SysTargetVentilationFlowVoz = 0.0;
state.dataSysRpts->SysTimeBelowVozDyn = 0.0;
state.dataSysRpts->SysTimeAtVozDyn = 0.0;
state.dataSysRpts->SysTimeAboveVozDyn = 0.0;
state.dataSysRpts->SysTimeVentUnocc = 0.0;
state.dataSysRpts->AnySysTimeBelowVozDyn = 0.0;
state.dataSysRpts->AllSyssTimeAtVozDyn = 0.0;
state.dataSysRpts->AnySysTimeAboveVozDyn = 0.0;
state.dataSysRpts->AnySysTimeVentUnocc = 0.0;
state.dataSysRpts->AnySysTimeBelowVozDynOcc = 0.0;
state.dataSysRpts->AllSyssTimeAtVozDynOcc = 0.0;
state.dataSysRpts->AnySysTimeAboveVozDynOcc = 0.0;

for (CtrlZoneNum = 1; CtrlZoneNum <= state.dataGlobal->NumOfZones; ++CtrlZoneNum) {
if (!state.dataZoneEquip->ZoneEquipConfig(CtrlZoneNum).IsControlled) continue;
Real64 ZAirSysZoneVentLoad = 0.0; // ventilation load attributed to a particular zone from all primary air systems serving the zone [J]
Expand Down Expand Up @@ -4509,6 +4587,17 @@ namespace EnergyPlus::SystemReports {
// Find the mixed air node and return air node of the system that supplies the zone
MixedAirNode = state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).OASysOutletNodeNum;
ReturnAirNode = state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).OASysInletNodeNum;

// Collect air loop Voz-dyn and natural ventilation
int ADUNum = state.dataZoneEquip->ZoneEquipConfig(CtrlZoneNum).InletNodeADUNum(ZoneInNum);
int termUnitSizingNum = state.dataDefineEquipment->AirDistUnit(ADUNum).TermUnitSizingNum;
Real64 termUnitOAFrac = DataSizing::TermUnitSizing(termUnitSizingNum).SpecMinOAFrac;
state.dataSysRpts->SysTargetVentilationFlowVoz(AirLoopNum) +=
termUnitOAFrac * state.dataSysRpts->ZoneTargetVentilationFlowVoz(CtrlZoneNum);
Real64 naturalVentVol = +ZnAirRpt(ActualZoneNum).VentilVolumeStdDensity +
ZonePreDefRep(ActualZoneNum).AFNVentVolFlow * TimeStepSys * DataGlobalConstants::SecInHour;
state.dataSysRpts->SysNatVentFlow(AirLoopNum) += termUnitOAFrac * naturalVentVol;

}

if (MixedAirNode == 0 || ReturnAirNode == 0) {
Expand Down Expand Up @@ -4559,6 +4648,7 @@ namespace EnergyPlus::SystemReports {
Real64 totMechNatVentVolStdRho = state.dataSysRpts->ZoneOAVolStdRho(CtrlZoneNum) + ZnAirRpt(ActualZoneNum).VentilVolumeStdDensity +
afnVentVol;
Real64 targetVoz = state.dataSysRpts->ZoneTargetVentilationFlowVoz(CtrlZoneNum) * TimeStepSys * DataGlobalConstants::SecInHour;
// Allow 1% tolerance
if (totMechNatVentVolStdRho < (0.99 * targetVoz)) {
state.dataSysRpts->ZoneTimeBelowVozDyn(CtrlZoneNum) = TimeStepSys;
state.dataSysRpts->AnyZoneTimeBelowVozDyn = TimeStepSys;
Expand Down Expand Up @@ -4666,7 +4756,29 @@ namespace EnergyPlus::SystemReports {
}
} // loop over controlled zones

// Accumulate facility totals
// loop over air loops
for (int sysNum = 1; sysNum <= NumPrimaryAirSys; ++sysNum){
// set time mechanical+natural ventilation is below, at, or above target Voz-dyn
// MJWToDo - InfilVolume should be NatVentVolume or similar after this is split in AFN
Real64 totMechNatVentVolFlowStdRho =
state.dataAirLoop->AirLoopFlow(sysNum).OAFlow * state.dataEnvrn->StdRhoAir + state.dataSysRpts->SysNatVentFlow(sysNum);
Real64 targetFlowVoz = state.dataSysRpts->SysTargetVentilationFlowVoz(sysNum);
// Allow 1% tolerance
if (totMechNatVentVolFlowStdRho < (0.99 * targetFlowVoz)) {
state.dataSysRpts->SysTimeBelowVozDyn(sysNum) = TimeStepSys;
state.dataSysRpts->AnySysTimeBelowVozDyn = TimeStepSys;
}
else if (totMechNatVentVolFlowStdRho > (1.01 * targetFlowVoz)) {
state.dataSysRpts->SysTimeAboveVozDyn(sysNum) = TimeStepSys;
state.dataSysRpts->AnySysTimeAboveVozDyn = TimeStepSys;
}
else if (totMechNatVentVolFlowStdRho > SmallAirVolFlow) {
state.dataSysRpts->SysTimeAtVozDyn(sysNum) = TimeStepSys;
state.dataSysRpts->AllSyssTimeAtVozDyn = TimeStepSys;
}

}
// Accumulate facility totals
state.dataOutRptPredefined->TotalAnyZoneBelowVozDynForOA += state.dataSysRpts->AnyZoneTimeBelowVozDyn;
state.dataOutRptPredefined->TotalAllZonesAtVozDynForOA += state.dataSysRpts->AllZonesTimeAtVozDyn;
state.dataOutRptPredefined->TotalAnyZoneAboveVozDynForOA += state.dataSysRpts->AnyZoneTimeAboveVozDyn;
Expand Down
27 changes: 27 additions & 0 deletions src/EnergyPlus/SystemReports.hh
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,20 @@ struct SystemReportsData : BaseGlobalStruct {
Real64 AllZonesTimeAtVozDynOcc = 0.0; // time [hrs] that all zones mech+nat vent is = VozTarget within 1% and > zero during occupied
Real64 AnyZoneTimeAboveVozDynOcc = 0.0; // time [hrs] that any zone mechanical+natural ventilation is > VozTarget + 1% during occupied

Array1D<Real64> SysNatVentFlow; // air loop natural vent total volume OA at standard density {m3/s}
Array1D<Real64> SysTargetVentilationFlowVoz; // air loop target ventilation ventilation flow based on 62.1 Voz-dyn {m3/s}
Array1D<Real64> SysTimeBelowVozDyn; // time [hrs] that mechanical+natural ventilation is < VozTarget - 1%
Array1D<Real64> SysTimeAtVozDyn; // time [hrs] that mechanical+natural ventilation is = VozTarget within 1% and > zero
Array1D<Real64> SysTimeAboveVozDyn; // time [hrs] that mechanical+natural ventilation is > VozTarget + 1%
Array1D<Real64> SysTimeVentUnocc; // time [hrs] that mechanical+natural ventilation is > zero during UNoccupied
Real64 AnySysTimeBelowVozDyn = 0.0; // time [hrs] that any air loop mechanical+natural ventilation is < VozTarget - 1%
Real64 AllSyssTimeAtVozDyn = 0.0; // time [hrs] that all air loops mechanical+natural ventilation is = VozTarget within 1% and > zero
Real64 AnySysTimeAboveVozDyn = 0.0; // time [hrs] that any air loop mechanical+natural ventilation is > VozTarget + 1%
Real64 AnySysTimeVentUnocc = 0.0; // time [hrs] that any air loop mechanical+natural ventilation is > zero during UNoccupied
Real64 AnySysTimeBelowVozDynOcc = 0.0; // time [hrs] that any air loop mechanical+natural ventilation is < VozTarget - 1% during occupied
Real64 AllSyssTimeAtVozDynOcc = 0.0; // time [hrs] that all air loops mech+nat vent is = VozTarget within 1% and > zero during occupied
Real64 AnySysTimeAboveVozDynOcc = 0.0; // time [hrs] that any air loop mechanical+natural ventilation is > VozTarget + 1% during occupied

bool AirLoopLoadsReportEnabled = true;
bool VentLoadsReportEnabled = true;
bool VentEnergyReportEnabled = false;
Expand Down Expand Up @@ -422,6 +436,19 @@ struct SystemReportsData : BaseGlobalStruct {
this->AnyZoneTimeBelowVozDynOcc = 0.0;
this->AllZonesTimeAtVozDynOcc = 0.0;
this->AnyZoneTimeAboveVozDynOcc = 0.0;
this->SysNatVentFlow = 0.0;
this->SysTargetVentilationFlowVoz.deallocate();
this->SysTimeBelowVozDyn.deallocate();
this->SysTimeAtVozDyn.deallocate();
this->SysTimeAboveVozDyn.deallocate();
this->SysTimeVentUnocc.deallocate();
this->AnySysTimeBelowVozDyn = 0.0;
this->AllSyssTimeAtVozDyn = 0.0;
this->AnySysTimeAboveVozDyn = 0.0;
this->AnySysTimeVentUnocc = 0.0;
this->AnySysTimeBelowVozDynOcc = 0.0;
this->AllSyssTimeAtVozDynOcc = 0.0;
this->AnySysTimeAboveVozDynOcc = 0.0;
this->AirLoopLoadsReportEnabled = true;
this->VentLoadsReportEnabled = true;
this->VentEnergyReportEnabled = false;
Expand Down

5 comments on commit 112e7c6

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EnhanceOutdoorAirReporting (mjwitte) - x86_64-MacOS-10.15-clang-11.0.0: OK (2935 of 2992 tests passed, 660 test warnings)

Messages:\n

  • 714 tests had: AUD diffs.
  • 700 tests had: RDD diffs.
  • 54 tests had: Table big diffs.
  • 1 test had: ESO small diffs.

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1092
  • Failed: 1

integration Test Summary

  • Passed: 717
  • Failed: 2

regression Test Summary

  • Passed: 663
  • Failed: 54

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EnhanceOutdoorAirReporting (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (2975 of 3032 tests passed, 663 test warnings)

Messages:\n

  • 717 tests had: AUD diffs.
  • 704 tests had: RDD diffs.
  • 54 tests had: Table big diffs.
  • 1 test had: ESO small diffs.

Failures:\n

integration Test Summary

  • Passed: 719
  • Failed: 3

regression Test Summary

  • Passed: 683
  • Failed: 54

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EnhanceOutdoorAirReporting (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1556 of 1556 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EnhanceOutdoorAirReporting (mjwitte) - Win64-Windows-10-VisualStudio-16: OK (2246 of 2248 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 717
  • Failed: 2

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EnhanceOutdoorAirReporting (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: Coverage Too Low

Failures:\n

integration Test Summary

  • Passed: 712
  • Failed: 10

Build Badge Test Badge Coverage Badge

Please sign in to comment.