Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/develop' into SpaceSizin…
Browse files Browse the repository at this point in the history
…gHVACPart3
  • Loading branch information
mjwitte committed Sep 14, 2023
2 parents cde8ee5 + 17fd4a6 commit 6c25a00
Show file tree
Hide file tree
Showing 24 changed files with 1,096 additions and 647 deletions.
8 changes: 4 additions & 4 deletions src/EnergyPlus/ChilledCeilingPanelSimple.cc
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ void InitCoolingPanel(EnergyPlusData &state, int const CoolingPanelNum, int cons
ThisInNode.Press = 0.0;
ThisInNode.HumRat = 0.0;

thisCP.ZeroSourceSumHATsurf = 0.0;
thisCP.ZeroCPSourceSumHATsurf = 0.0;
thisCP.CoolingPanelSource = 0.0;
thisCP.CoolingPanelSrcAvg = 0.0;
thisCP.LastCoolingPanelSrc = 0.0;
Expand All @@ -887,7 +887,7 @@ void InitCoolingPanel(EnergyPlusData &state, int const CoolingPanelNum, int cons

if (state.dataGlobal->BeginTimeStepFlag && FirstHVACIteration) {
int ZoneNum = thisCP.ZonePtr;
state.dataHeatBal->Zone(ZoneNum).ZeroSourceSumHATsurf = state.dataHeatBal->Zone(ZoneNum).sumHATsurf(state);
thisCP.ZeroCPSourceSumHATsurf = state.dataHeatBal->Zone(ZoneNum).sumHATsurf(state);
thisCP.CoolingPanelSrcAvg = 0.0;
thisCP.LastCoolingPanelSrc = 0.0;
thisCP.LastSysTimeElapsed = 0.0;
Expand Down Expand Up @@ -1412,8 +1412,8 @@ void CoolingPanelParams::CalcCoolingPanel(EnergyPlusData &state, int const Cooli
// that all energy radiated to people is converted to convective energy is
// not very precise, but at least it conserves energy. The system impact to heat balance
// should include this.
LoadMet = (state.dataHeatBal->Zone(ZoneNum).sumHATsurf(state) - state.dataHeatBal->Zone(ZoneNum).ZeroSourceSumHATsurf) +
(CoolingPanelCool * this->FracConvect) + (RadHeat * this->FracDistribPerson);
LoadMet = (state.dataHeatBal->Zone(ZoneNum).sumHATsurf(state) - this->ZeroCPSourceSumHATsurf) + (CoolingPanelCool * this->FracConvect) +
(RadHeat * this->FracDistribPerson);
}
this->WaterOutletEnthalpy = this->WaterInletEnthalpy - CoolingPanelCool / waterMassFlowRate;

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ChilledCeilingPanelSimple.hh
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ namespace CoolingPanelSimple {
int CoolingPanelMassFlowReSimIndex = 0;
int CoolingPanelInletTempFlowReSimIndex = 0;
bool MyEnvrnFlag = true;
Real64 ZeroSourceSumHATsurf = 0.0;
Real64 ZeroCPSourceSumHATsurf = 0.0;
Real64 CoolingPanelSource = 0.0;
Real64 CoolingPanelSrcAvg = 0.0;
Real64 LastCoolingPanelSrc = 0.0;
Expand Down
5 changes: 2 additions & 3 deletions src/EnergyPlus/DataHeatBalance.hh
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,8 @@ namespace DataHeatBalance {
Real64 delta_T = 0.0; // Indoor and outdoor temperature
Real64 delta_HumRat = 0.0; // Indoor and outdoor humidity ratio delta

Real64 ZeroSourceSumHATsurf = 0.0; // From Chilled Ceiling Panel, equal to the SumHATsurf for all the walls in a zone with no source
bool zoneOAQuadratureSum = false; // True when zone OA balance method is Quadrature
int zoneOABalanceIndex = 0; // Index to ZoneAirBalance for this zone, if any
bool zoneOAQuadratureSum = false; // True when zone OA balance method is Quadrature
int zoneOABalanceIndex = 0; // Index to ZoneAirBalance for this zone, if any

// Spaces
bool anySurfacesWithoutSpace = false; // True if any surfaces in a zone do not have a space assigned in input
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ElectricBaseboardRadiator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ namespace ElectricBaseboardRadiator {
DistributeBBElecRadGains(state);
HeatBalanceSurfaceManager::CalcHeatBalanceOutsideSurf(state, ZoneNum);
HeatBalanceSurfaceManager::CalcHeatBalanceInsideSurf(state, ZoneNum);
// Recalculate LoadMet with new ZeroSource... term and see if it is positive now. If not, shut it down.
// Recalculate LoadMet with new ZeroBBSource... term and see if it is positive now. If not, shut it down.
LoadMet = (state.dataHeatBal->Zone(ZoneNum).sumHATsurf(state) - TempZeroBBSourceSumHATsurf) +
(QBBCap * elecBaseboard.FracConvect) + (RadHeat * elecBaseboard.FracDistribPerson);
if (LoadMet < 0.0) {
Expand Down
19 changes: 16 additions & 3 deletions src/EnergyPlus/ExhaustAirSystemManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -675,13 +675,13 @@ namespace ExhaustAirSystemManager {
}

for (int ExhaustControlNum = 1; ExhaustControlNum <= state.dataZoneEquip->NumZoneExhaustControls; ++ExhaustControlNum) {
CalcZoneHVACExhaustControl(state, ExhaustControlNum, _);
CalcZoneHVACExhaustControl(state, ExhaustControlNum);
}

// report results if needed
}

void CalcZoneHVACExhaustControl(EnergyPlusData &state, int const ZoneHVACExhaustControlNum, ObjexxFCL::Optional<bool const> FlowRatio)
void CalcZoneHVACExhaustControl(EnergyPlusData &state, int const ZoneHVACExhaustControlNum, Real64 const FlowRatio)
{
// Calculate a zonehvac exhaust control system

Expand All @@ -695,7 +695,7 @@ namespace ExhaustAirSystemManager {
Real64 Tin = state.dataZoneTempPredictorCorrector->zoneHeatBalance(thisExhCtrl.ZoneNum).ZT;
Real64 thisExhCtrlAvailScheVal = ScheduleManager::GetCurrentScheduleValue(state, thisExhCtrl.AvailScheduleNum);

if (present(FlowRatio)) {
if (FlowRatio >= 0.0) {
thisExhCtrl.BalancedFlow *= FlowRatio;
thisExhCtrl.UnbalancedFlow *= FlowRatio;

Expand All @@ -713,11 +713,24 @@ namespace ExhaustAirSystemManager {
Real64 FlowFrac = 0.0;
if (thisExhCtrl.MinExhFlowFracScheduleNum > 0) {
FlowFrac = ScheduleManager::GetCurrentScheduleValue(state, thisExhCtrl.ExhaustFlowFractionScheduleNum);
if (FlowFrac < 0.0) {
ShowWarningError(
state, format("Exhaust Flow Fraction Schedule value is negative for Zone Exhaust Control Named: {};", thisExhCtrl.Name));
ShowContinueError(state, "Reset value to zero and continue the simulation.");
FlowFrac = 0.0;
}
}

Real64 MinFlowFrac = 0.0;
if (thisExhCtrl.MinExhFlowFracScheduleNum > 0) {
MinFlowFrac = ScheduleManager::GetCurrentScheduleValue(state, thisExhCtrl.MinExhFlowFracScheduleNum);
if (MinFlowFrac < 0.0) {
ShowWarningError(
state,
format("Minimum Exhaust Flow Fraction Schedule value is negative for Zone Exhaust Control Named: {};", thisExhCtrl.Name));
ShowContinueError(state, "Reset value to zero and continue the simulation.");
MinFlowFrac = 0.0;
}
}

if (FlowFrac < MinFlowFrac) {
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/ExhaustAirSystemManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ namespace ExhaustAirSystemManager {

void SimZoneHVACExhaustControls(EnergyPlusData &state);

void CalcZoneHVACExhaustControl(EnergyPlusData &state, int const ZoneHVACExhaustControlNum, ObjexxFCL::Optional<bool const> FlowRatio);
void CalcZoneHVACExhaustControl(EnergyPlusData &state, int const ZoneHVACExhaustControlNum, Real64 const FlowRatio = -1.0);

void SizeExhaustSystem(EnergyPlusData &state, int const exhSysNum);

Expand Down
Loading

5 comments on commit 6c25a00

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

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

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.

SpaceSizingHVACPart3 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3546 of 3548 tests passed, 12 test warnings)

Messages:\n

  • 2 tests had: ESO big diffs.
  • 4 tests had: EIO diffs.
  • 9 tests had: ESO small diffs.
  • 4 tests had: MTR small diffs.
  • 4 tests had: Table small diffs.
  • 3 tests had: ERR diffs.
  • 1 test had: MTR big diffs.
  • 1 test had: SSZ big diffs.
  • 1 test had: ZSZ big diffs.
  • 1 test had: Table big diffs.

Failures:\n

regression Test Summary

  • Passed: 802
  • Failed: 2

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.

SpaceSizingHVACPart3 (mjwitte) - x86_64-MacOS-10.17-clang-14.0.0: OK (3500 of 3507 tests passed, 11 test warnings)

Messages:\n

  • 2 tests had: ESO big diffs.
  • 5 tests had: EIO diffs.
  • 10 tests had: ESO small diffs.
  • 4 tests had: MTR small diffs.
  • 4 tests had: Table small diffs.
  • 4 tests had: ERR diffs.
  • 6 tests had: MTR big diffs.
  • 1 test had: SSZ big diffs.
  • 1 test had: ZSZ big diffs.
  • 2 tests had: Table big diffs.

Failures:\n

regression Test Summary

  • Passed: 777
  • Failed: 7

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.

SpaceSizingHVACPart3 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (788 of 788 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.

SpaceSizingHVACPart3 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (1937 of 1937 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.