Skip to content

Commit

Permalink
Space - vectorize People reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Aug 21, 2021
1 parent 107541a commit c73e8e6
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 66 deletions.
50 changes: 32 additions & 18 deletions src/EnergyPlus/DataHeatBalance.hh
Original file line number Diff line number Diff line change
Expand Up @@ -642,21 +642,6 @@ namespace DataHeatBalance {
Real64 UserSpecSensFrac; // User specified sensible fraction
bool Show55Warning; // show the warning messages about ASHRAE 55-2004
Real64 CO2RateFactor; // Carbon Dioxide Generation Rate [m3/s-W]
// Report variables
Real64 NumOcc; // Number of occupants at current timestep []
Real64 TemperatureInZone; // Temperature in zone (C)
Real64 RelativeHumidityInZone; // Relative humidity in zone
Real64 RadGainRate; // Radiant heat gain [W]
Real64 ConGainRate; // Convective heat gain [W]
Real64 SenGainRate; // Sensible heat gain [W]
Real64 LatGainRate; // Latent heat gain [W]
Real64 TotGainRate; // Total heat gain [W]
Real64 CO2GainRate; // Carbon Dioxide Gain Rate [m3/s]
Real64 RadGainEnergy; // Radiant heat gain [J]
Real64 ConGainEnergy; // Convective heat gain [J]
Real64 SenGainEnergy; // Sensible heat gain [J]
Real64 LatGainEnergy; // Latent heat gain [J]
Real64 TotGainEnergy; // Total heat gain [J]
// Air velocity check during run time for thermal comfort control
int AirVelErrIndex; // Air velocity error index
// For AdaptiveComfort tabular report
Expand All @@ -673,9 +658,7 @@ namespace DataHeatBalance {
ClothingMethodPtr(-1), ClothingType(-1), AirVelocityPtr(-1), AnkleAirVelocityPtr(-1), Fanger(false), Pierce(false), KSU(false),
AdaptiveASH55(false), AdaptiveCEN15251(false), CoolingEffectASH55(false), AnkleDraftASH55(false),
MRTCalcType(DataHeatBalance::CalcMRT::Unassigned), SurfacePtr(-1), AngleFactorListPtr(-1), UserSpecSensFrac(0.0), Show55Warning(false),
CO2RateFactor(0.0), NumOcc(0.0), TemperatureInZone(0.0), RelativeHumidityInZone(0.0), RadGainRate(0.0), ConGainRate(0.0),
SenGainRate(0.0), LatGainRate(0.0), TotGainRate(0.0), CO2GainRate(0.0), RadGainEnergy(0.0), ConGainEnergy(0.0), SenGainEnergy(0.0),
LatGainEnergy(0.0), TotGainEnergy(0.0), AirVelErrIndex(0), TimeNotMetASH5580(0.0), TimeNotMetASH5590(0.0), TimeNotMetCEN15251CatI(0.0),
CO2RateFactor(0.0), AirVelErrIndex(0), TimeNotMetASH5580(0.0), TimeNotMetASH5590(0.0), TimeNotMetCEN15251CatI(0.0),
TimeNotMetCEN15251CatII(0.0), TimeNotMetCEN15251CatIII(0.0)
{
}
Expand Down Expand Up @@ -2328,6 +2311,22 @@ struct HeatBalanceData : BaseGlobalStruct
bool MundtFirstTimeFlag = true;
EPVector<std::string> spaceTypes;

// People Report variables
EPVector<Real64> PeopleRepNumOcc; // Number of occupants at current timestep []
EPVector<Real64> PeopleRepTemperatureInZone; // Temperature in zone (C)
EPVector<Real64> PeopleRepRelativeHumidityInZone; // Relative humidity in zone
EPVector<Real64> PeopleRepRadGainRate; // Radiant heat gain [W]
EPVector<Real64> PeopleRepConGainRate; // Convective heat gain [W]
EPVector<Real64> PeopleRepSenGainRate; // Sensible heat gain [W]
EPVector<Real64> PeopleRepLatGainRate; // Latent heat gain [W]
EPVector<Real64> PeopleRepTotGainRate; // Total heat gain [W]
EPVector<Real64> PeopleRepCO2GainRate; // Carbon Dioxide Gain Rate [m3/s]
EPVector<Real64> PeopleRepRadGainEnergy; // Radiant heat gain [J]
EPVector<Real64> PeopleRepConGainEnergy; // Convective heat gain [J]
EPVector<Real64> PeopleRepSenGainEnergy; // Sensible heat gain [J]
EPVector<Real64> PeopleRepLatGainEnergy; // Latent heat gain [J]
EPVector<Real64> PeopleRepTotGainEnergy; // Total heat gain [J]

void clear_state() override
{
this->MaxSolidWinLayers = 0;
Expand Down Expand Up @@ -2605,6 +2604,21 @@ struct HeatBalanceData : BaseGlobalStruct
this->ZoneLocalEnvironment.deallocate();
this->MundtFirstTimeFlag = true;
this->spaceTypes.deallocate();

this->PeopleRepNumOcc.deallocate();
this->PeopleRepTemperatureInZone.deallocate();
this->PeopleRepRelativeHumidityInZone.deallocate();
this->PeopleRepRadGainRate.deallocate();
this->PeopleRepConGainRate.deallocate();
this->PeopleRepSenGainRate.deallocate();
this->PeopleRepLatGainRate.deallocate();
this->PeopleRepTotGainRate.deallocate();
this->PeopleRepCO2GainRate.deallocate();
this->PeopleRepRadGainEnergy.deallocate();
this->PeopleRepConGainEnergy.deallocate();
this->PeopleRepSenGainEnergy.deallocate();
this->PeopleRepLatGainEnergy.deallocate();
this->PeopleRepTotGainEnergy.deallocate();
}
};

Expand Down
Loading

5 comments on commit c73e8e6

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

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

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

spacesTestVect (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (3166 of 3169 tests passed, 726 test warnings)

Messages:\n

  • 729 tests had: AUD diffs.
  • 685 tests had: MDD diffs.
  • 699 tests had: MTD diffs.
  • 685 tests had: RDD diffs.
  • 3 tests had: Table big diffs.
  • 2 tests had: EIO diffs.
  • 3 tests had: ESO small diffs.
  • 4 tests had: IDF diffs.
  • 1 test had: MTR small diffs.

Failures:\n

regression Test Summary

  • Passed: 744
  • Failed: 3

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

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

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.

spacesTestVect (mjwitte) - x86_64-MacOS-10.15-clang-11.0.0: OK (3126 of 3128 tests passed, 723 test warnings)

Messages:\n

  • 725 tests had: AUD diffs.
  • 681 tests had: MDD diffs.
  • 695 tests had: MTD diffs.
  • 681 tests had: RDD diffs.
  • 2 tests had: Table big diffs.
  • 1 test had: EIO diffs.
  • 2 tests had: ESO small diffs.
  • 4 tests had: IDF diffs.

Failures:\n

regression Test Summary

  • Passed: 725
  • Failed: 2

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.

spacesTestVect (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (731 of 731 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.