Skip to content

Commit

Permalink
OA Report - populate airloop subtables
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Feb 16, 2021
1 parent 415f7bd commit 584533e
Show file tree
Hide file tree
Showing 5 changed files with 218 additions and 24 deletions.
5 changes: 3 additions & 2 deletions src/EnergyPlus/DataHeatBalance.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1859,7 +1859,8 @@ namespace DataHeatBalance {
Real64 TotTimeOcc; // time occupied (and the mechanical ventilation volume is accumulating)
// - system time step [hrs]

// OA Reports
// OA Reports - accumulated values
// All Vol variables are in m3
Real64 MechVentVolTotalOcc; // volume for mechanical ventilation of outside air for entire simulation during occupied at current
Real64 MechVentVolMin; // a large number since finding minimum volume at current zone air density
Real64 InfilVolTotalOcc; // volume for infiltration of outside air for entire simulation during occupied at current density
Expand All @@ -1879,7 +1880,7 @@ namespace DataHeatBalance {
Real64 SimpVentVolTotalStdDen; // volume for simple 'ZoneVentilation' of outside air for entire simulation at std density
Real64 SimpVentVolTotalOccStdDen; // volume for simple 'ZoneVentilation' of outside air for entire simulation during occupied std
Real64 VozMin; // minimum outdoor zone ventilation
Real64 VozTargetTotal; // volume for target Voz-dyn for entire simulation
Real64 VozTargetTotal; // volume for target Voz-dyn for entire simulation at std density
Real64 VozTargetTotalOcc; // volume for target Voz-dyn for entire simulation during occupied
Real64 VozTargetTimeBelow; // time [hrs] that mechanical+natural ventilation is < VozTarget - 1%
Real64 VozTargetTimeAt; // time [hrs] that mechanical+natural ventilation is = VozTarget within 1% and > zero
Expand Down
6 changes: 3 additions & 3 deletions src/EnergyPlus/OutputReportPredefined.cc
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ namespace OutputReportPredefined {
s->pdchOaOccBzTmAt = newPreDefColumn(state, s->pdstOAavgOccByZone, "Time At Voz-dyn [hr]");
s->pdchOaOccBzTmAbove = newPreDefColumn(state, s->pdstOAavgOccByZone, "Time Above Voz-dyn [hr]");

s->pdstOAtotAirByLoop = newPreDefSubTable(state, s->pdrOutsideAirDetails, "Total Outdoor Air by Airloop");
s->pdstOAtotAirByLoop = newPreDefSubTable(state, s->pdrOutsideAirDetails, "Total Outdoor Air by AirLoop");
s->pdchOaTaAlMechVent = newPreDefColumn(state, s->pdstOAtotAirByLoop, "Mechanical Ventilation [m3]"); //todo
s->pdchOaTaAlNatVent = newPreDefColumn(state, s->pdstOAtotAirByLoop, "Natural Ventilation [m3/s]");
s->pdchOaTaAlTotVent = newPreDefColumn(state, s->pdstOAtotAirByLoop, "Total Ventilation [m3/s]");
Expand All @@ -716,11 +716,11 @@ namespace OutputReportPredefined {
s->pdchOaTaAlTmAbove = newPreDefColumn(state, s->pdstOAtotAirByLoop, "Time Above Voz-sum-dyn [hr]"); //todo
s->pdchOaTaAlTmAboveUnocc = newPreDefColumn(state, s->pdstOAtotAirByLoop, "Time Above Zero When Unoccupied [hr]"); //todo

s->pdstOAavgOccByLoop = newPreDefSubTable(state, s->pdrOutsideAirDetails, "Average Outdoor Air During Occupancy by Airloop");
s->pdstOAavgOccByLoop = newPreDefSubTable(state, s->pdrOutsideAirDetails, "Average Outdoor Air During Occupancy by AirLoop");
s->pdchOaOccAlMechVent = newPreDefColumn(state, s->pdstOAavgOccByLoop, "Mechanical Ventilation [m3/s]"); //todo
s->pdchOaOccAlNatVent = newPreDefColumn(state, s->pdstOAavgOccByLoop, "Natural Ventilation [m3/s]");
s->pdchOaOccAlTotVent = newPreDefColumn(state, s->pdstOAavgOccByLoop, "Total Ventilation [m3/s]");
s->pdchOaOccAlSumDynTrgVent = newPreDefColumn(state, s->pdstOAavgOccByLoop, "Sum Zone Dynamic Zone Outdoor Airflow - Voz-sum-dyn [m3/s]"); //todo
s->pdchOaOccAlSumDynTrgVent = newPreDefColumn(state, s->pdstOAavgOccByLoop, "Sum Zone Dynamic Target Ventilation - Voz-sum-dyn [m3/s]"); //todo
s->pdchOaOccAlTmBelow = newPreDefColumn(state, s->pdstOAavgOccByLoop, "Time Below Voz-sum-dyn [hr]"); //todo
s->pdchOaOccAlTmAt = newPreDefColumn(state, s->pdstOAavgOccByLoop, "Time At Voz-sum-dyn [hr]"); //todo
s->pdchOaOccAlTmAbove = newPreDefColumn(state, s->pdstOAavgOccByLoop, "Time Above Voz-sum-dyn [hr]"); //todo
Expand Down
138 changes: 130 additions & 8 deletions src/EnergyPlus/OutputReportTabular.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5959,14 +5959,8 @@ 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;

// Outdoor Air Summary and Outdoor Air Details
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 Expand Up @@ -6143,6 +6137,108 @@ namespace EnergyPlus::OutputReportTabular {
}
}

//Real64 totalAirLoopsMechVentVol = 0.0;
//Real64 totalAirLoopsNatVentVol = 0.0;
//Real64 totalAirLoopsVozDyn = 0.0;
//Real64 totalAirLoopsMechVentRateOcc = 0.0;
//Real64 totalAirLoopsNatVentRateOcc = 0.0;
//Real64 totalAirLoopsVozDynOcc = 0.0;

for (int iSys = 1; iSys <= DataHVACGlobals::NumPrimaryAirSys; ++iSys) {
// Total Outdoor Air by Airloop
PreDefTableEntry(state,
state.dataOutRptPredefined->pdchOaTaAlMechVent,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
state.dataSysRpts->SysPreDefRep(iSys).SysMechVentTotal,
0);
//totalAirLoopsMechVentVol += state.dataSysRpts->SysPreDefRep(iSys).SysMechVentTotal;
PreDefTableEntry(state,
state.dataOutRptPredefined->pdchOaTaAlNatVent,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
state.dataSysRpts->SysPreDefRep(iSys).SysNatVentTotal,
0);
//totalAirLoopsNatVentVol += state.dataSysRpts->SysPreDefRep(iSys).SysNatVentTotal;
PreDefTableEntry(state,
state.dataOutRptPredefined->pdchOaTaAlTotVent,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
state.dataSysRpts->SysPreDefRep(iSys).SysMechVentTotal + state.dataSysRpts->SysPreDefRep(iSys).SysNatVentTotal,
0);
PreDefTableEntry(state,
state.dataOutRptPredefined->pdchOaTaAlSumDynTrgVent,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
state.dataSysRpts->SysPreDefRep(iSys).SysTargetVentTotalVoz,
0);
//totalAirLoopsVozDyn += state.dataSysRpts->SysPreDefRep(iSys).SysTargetVentTotalVoz;
PreDefTableEntry(state,
state.dataOutRptPredefined->pdchOaTaAlTmBelow,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
state.dataSysRpts->SysPreDefRep(iSys).SysTimeBelowVozDynTotal,
0);
PreDefTableEntry(state,
state.dataOutRptPredefined->pdchOaTaAlTmAt,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
state.dataSysRpts->SysPreDefRep(iSys).SysTimeAtVozDynTotal,
0);
PreDefTableEntry(state,
state.dataOutRptPredefined->pdchOaTaAlTmAbove,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
state.dataSysRpts->SysPreDefRep(iSys).SysTimeAboveVozDynTotal,
0);
PreDefTableEntry(state,
state.dataOutRptPredefined->pdchOaTaAlTmAboveUnocc,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
state.dataSysRpts->SysPreDefRep(iSys).SysTimeVentUnoccTotal,
0);
// Average Outdoor Air During Occupancy by Airloop
if (state.dataSysRpts->SysPreDefRep(iSys).SysTimeOccupiedTotal > 0.0) {
PreDefTableEntry(state,
state.dataOutRptPredefined->pdchOaOccAlMechVent,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
state.dataSysRpts->SysPreDefRep(iSys).SysMechVentTotalOcc /
state.dataSysRpts->SysPreDefRep(iSys).SysTimeOccupiedTotal,
4);
//totalAirLoopsMechVentRateOcc += state.dataSysRpts->SysPreDefRep(iSys).SysMechVentTotalOcc /
state.dataSysRpts->SysPreDefRep(iSys).SysTimeOccupiedTotal;
PreDefTableEntry(state,
state.dataOutRptPredefined->pdchOaOccAlNatVent,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
state.dataSysRpts->SysPreDefRep(iSys).SysNatVentTotalOcc /
state.dataSysRpts->SysPreDefRep(iSys).SysTimeOccupiedTotal,
4);
//totalAirLoopsNatVentRateOcc += state.dataSysRpts->SysPreDefRep(iSys).SysNatVentTotalOcc /
state.dataSysRpts->SysPreDefRep(iSys).SysTimeOccupiedTotal;
PreDefTableEntry(
state,
state.dataOutRptPredefined->pdchOaOccAlTotVent,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
(state.dataSysRpts->SysPreDefRep(iSys).SysMechVentTotalOcc + state.dataSysRpts->SysPreDefRep(iSys).SysNatVentTotalOcc) /
state.dataSysRpts->SysPreDefRep(iSys).SysTimeOccupiedTotal,
4);
PreDefTableEntry(state,
state.dataOutRptPredefined->pdchOaOccAlSumDynTrgVent,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
state.dataSysRpts->SysPreDefRep(iSys).SysTargetVentTotalVozOcc /
state.dataSysRpts->SysPreDefRep(iSys).SysTimeOccupiedTotal,
4);
//totalAirLoopsVozDynOcc += state.dataSysRpts->SysPreDefRep(iSys).SysTargetVentTotalVozOcc /
state.dataSysRpts->SysPreDefRep(iSys).SysTimeOccupiedTotal;
PreDefTableEntry(state,
state.dataOutRptPredefined->pdchOaOccAlTmBelow,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
state.dataSysRpts->SysPreDefRep(iSys).SysTimeBelowVozDynTotalOcc,
0);
PreDefTableEntry(state,
state.dataOutRptPredefined->pdchOaOccAlTmAt,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
state.dataSysRpts->SysPreDefRep(iSys).SysTimeAtVozDynTotalOcc,
0);
PreDefTableEntry(state,
state.dataOutRptPredefined->pdchOaOccAlTmAbove,
state.dataAirSystemsData->PrimaryAirSystems(iSys).Name,
state.dataSysRpts->SysPreDefRep(iSys).SysTimeAboveVozDynTotalOcc,
0);
}
}
// add total rows for outdoor air details
OutputReportPredefined::PreDefTableEntry(
state, state.dataOutRptPredefined->pdchOaMvDesZnOa, "Total Facility", state.dataOutRptPredefined->TotalVozMax, 4);
Expand Down Expand Up @@ -6187,6 +6283,32 @@ namespace EnergyPlus::OutputReportTabular {
state, state.dataOutRptPredefined->pdchOaOccBzTmAbove, "Total Facility", state.dataOutRptPredefined->TotalAnyZoneAboveVozDynOccForOA, 0);


//// Total Outdoor Air by Airloop
//PreDefTableEntry(state, state.dataOutRptPredefined->pdchOaTaAlMechVent, "All AirLoops", totalAirLoopsMechVentVol, 0);
//PreDefTableEntry(state, state.dataOutRptPredefined->pdchOaTaAlNatVent, "All AirLoops", totalAirLoopsNatVentVol, 0);
//PreDefTableEntry(state, state.dataOutRptPredefined->pdchOaTaAlTotVent, "All AirLoops", totalAirLoopsMechVentVol + totalAirLoopsNatVentVol, 0);
//PreDefTableEntry(state, state.dataOutRptPredefined->pdchOaTaAlSumDynTrgVent, "All AirLoops", totalAirLoopsVozDyn, 0);
//PreDefTableEntry(
// state, state.dataOutRptPredefined->pdchOaTaAlTmBelow, "All AirLoops", state.dataOutRptPredefined->TotalAnyZoneBelowVozDynForOA, 0);
//PreDefTableEntry(
// state, state.dataOutRptPredefined->pdchOaTaAlTmAt, "All AirLoops", state.dataOutRptPredefined->TotalAllZonesAtVozDynForOA, 0);
//PreDefTableEntry(
// state, state.dataOutRptPredefined->pdchOaTaAlTmAbove, "All AirLoops", state.dataOutRptPredefined->TotalAnyZoneAboveVozDynForOA, 0);
//PreDefTableEntry(
// state, state.dataOutRptPredefined->pdchOaTaAlTmAboveUnocc, "All AirLoops", state.dataOutRptPredefined->TotalAnyZoneVentUnoccForOA, 0);
//// Average Outdoor Air During Occupancy by Airloop
//PreDefTableEntry(state, state.dataOutRptPredefined->pdchOaOccAlMechVent, "All AirLoops", totalAirLoopsMechVentRateOcc, 4);
//PreDefTableEntry(state, state.dataOutRptPredefined->pdchOaOccAlNatVent, "All AirLoops", totalAirLoopsNatVentRateOcc, 4);
//PreDefTableEntry(
// state, state.dataOutRptPredefined->pdchOaOccAlTotVent, "All AirLoops", totalAirLoopsMechVentRateOcc + totalAirLoopsNatVentRateOcc, 4);
//PreDefTableEntry(state, state.dataOutRptPredefined->pdchOaOccAlSumDynTrgVent, "All AirLoops", totalAirLoopsVozDynOcc, 4);
//PreDefTableEntry(
// state, state.dataOutRptPredefined->pdchOaOccAlTmBelow, "All AirLoops", state.dataOutRptPredefined->TotalAnyZoneBelowVozDynOccForOA, 0);
//PreDefTableEntry(
// state, state.dataOutRptPredefined->pdchOaOccAlTmAt, "All AirLoops", state.dataOutRptPredefined->TotalAllZonesAtVozDynOccForOA, 0);
//PreDefTableEntry(
// state, state.dataOutRptPredefined->pdchOaOccAlTmAbove, "All AirLoops", state.dataOutRptPredefined->TotalAnyZoneAboveVozDynOccForOA, 0);

// Add the number of central air distributions system to the count report
PreDefTableEntry(state, state.dataOutRptPredefined->pdchHVACcntVal, "HVAC Air Loops", NumPrimaryAirSys);
// Add the number of conditioned and unconditioned zones to the count report
Expand Down
Loading

5 comments on commit 584533e

@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.

EnhanceOutdoorAirReporting2 (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (3055 of 3056 tests passed, 719 test warnings)

Messages:\n

  • 720 tests had: AUD diffs.
  • 706 tests had: RDD diffs.
  • 1 test had: EIO diffs.
  • 1 test had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 1 test had: Table big diffs.

Failures:\n

regression Test Summary

  • Passed: 736
  • Failed: 1

Build Badge Test Badge

@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.

EnhanceOutdoorAirReporting2 (mjwitte) - x86_64-MacOS-10.15-clang-11.0.0: OK (3016 of 3016 tests passed, 716 test warnings)

Messages:\n

  • 716 tests had: AUD diffs.
  • 702 tests had: RDD diffs.

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

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

Build Badge Test Badge Coverage 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.

EnhanceOutdoorAirReporting2 (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (722 of 722 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.

EnhanceOutdoorAirReporting2 (mjwitte) - Win64-Windows-10-VisualStudio-16: OK (2272 of 2272 tests passed, 0 test warnings)

Build Badge Test Badge

Please sign in to comment.