Skip to content

Commit

Permalink
Space IV.5 - Implement sizing by space ext perimeter length
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Aug 29, 2024
1 parent a2bf2e9 commit f857dfa
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 38 deletions.
1 change: 1 addition & 0 deletions src/EnergyPlus/DataHeatBalance.hh
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ namespace DataHeatBalance {
Real64 Volume = Constant::AutoCalculate; // Volume entered by user [m3] or calculated
Real64 ExtGrossWallArea = 0.0; // Exterior Wall Area for Zone (Gross)
Real64 ExteriorTotalSurfArea = 0.0; // Total surface area of all exterior surfaces for Zone
Real64 extPerimeter = 0.0; // Total exposed perimeter (sum of width of exterior walls)
int SystemZoneNodeNumber = 0; // This is the zone or space node number for the system for a controlled zone
Real64 FloorArea = 0.0; // Floor area used for this space
Real64 TotOccupants = 0.0; // total design occupancy (sum of NumberOfPeople for the space People objects, not multiplied)
Expand Down
72 changes: 34 additions & 38 deletions src/EnergyPlus/DataZoneEquipment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1867,11 +1867,9 @@ void ZoneEquipmentSplitterMixer::size(EnergyPlusData &state)
}
break;
case DataZoneEquipment::SpaceEquipSizingBasis::PerimeterLength:
ShowFatalError(state,
format("ZoneEquipmentSplitterMixer::size: Space Fraction Method={} not supported for {}={}",
DataZoneEquipment::spaceEquipSizingBasisNamesUC[(int)this->spaceSizingBasis],
BranchNodeConnections::ConnectionObjectTypeNames[(int)this->spaceEquipType],
this->Name));
for (auto &thisSpace : this->spaces) {
spacesTotal += state.dataHeatBal->space(thisSpace.spaceIndex).extPerimeter;
}
break;
default:
// If method is not set, then return
Expand All @@ -1890,43 +1888,41 @@ void ZoneEquipmentSplitterMixer::size(EnergyPlusData &state)
for (auto &thisSpace : this->spaces) {
thisSpace.fraction = spaceFrac;
}
return;
} else {
// Calculate space fractions
for (auto &thisSpace : this->spaces) {
if (thisSpace.fraction == DataSizing::AutoSize) {
switch (this->spaceSizingBasis) {
case DataZoneEquipment::SpaceEquipSizingBasis::DesignCoolingLoad:
thisSpace.fraction = state.dataSize->FinalSpaceSizing(thisSpace.spaceIndex).DesCoolLoad / spacesTotal;
break;
case DataZoneEquipment::SpaceEquipSizingBasis::DesignHeatingLoad:
thisSpace.fraction = state.dataSize->FinalSpaceSizing(thisSpace.spaceIndex).DesHeatLoad / spacesTotal;
break;
case DataZoneEquipment::SpaceEquipSizingBasis::FloorArea:
thisSpace.fraction = state.dataHeatBal->space(thisSpace.spaceIndex).FloorArea / spacesTotal;
break;
case DataZoneEquipment::SpaceEquipSizingBasis::Volume:
thisSpace.fraction = state.dataHeatBal->space(thisSpace.spaceIndex).Volume / spacesTotal;
break;
case DataZoneEquipment::SpaceEquipSizingBasis::PerimeterLength:
thisSpace.fraction = state.dataHeatBal->space(thisSpace.spaceIndex).extPerimeter / spacesTotal;
break;
default:
break;
}
}
}
}

// Calculate space fractions
// Report sizing results
int spaceCounter = 0;
for (auto &thisSpace : this->spaces) {
++spaceCounter;
if (thisSpace.fraction == DataSizing::AutoSize) {
switch (this->spaceSizingBasis) {
case DataZoneEquipment::SpaceEquipSizingBasis::DesignCoolingLoad:
thisSpace.fraction = state.dataSize->FinalSpaceSizing(thisSpace.spaceIndex).DesCoolLoad / spacesTotal;
break;
case DataZoneEquipment::SpaceEquipSizingBasis::DesignHeatingLoad:
thisSpace.fraction = state.dataSize->FinalSpaceSizing(thisSpace.spaceIndex).DesHeatLoad / spacesTotal;
break;
case DataZoneEquipment::SpaceEquipSizingBasis::FloorArea:
thisSpace.fraction = state.dataHeatBal->space(thisSpace.spaceIndex).FloorArea / spacesTotal;
break;
case DataZoneEquipment::SpaceEquipSizingBasis::Volume:
thisSpace.fraction = state.dataHeatBal->space(thisSpace.spaceIndex).Volume / spacesTotal;
break;
case DataZoneEquipment::SpaceEquipSizingBasis::PerimeterLength:
ShowFatalError(state,
format("ZoneEquipmentSplitterMixer::size: Space Fraction Method={} not supported for {}={}",
DataZoneEquipment::spaceEquipSizingBasisNamesUC[(int)this->spaceSizingBasis],
BranchNodeConnections::ConnectionObjectTypeNames[(int)this->spaceEquipType],
this->Name));
break;
default:
break;
}
BaseSizer::reportSizerOutput(state,
BranchNodeConnections::ConnectionObjectTypeNames[(int)this->spaceEquipType],
this->Name,
format("Space {} Fraction", spaceCounter),
thisSpace.fraction);
}
BaseSizer::reportSizerOutput(state,
BranchNodeConnections::ConnectionObjectTypeNames[(int)this->spaceEquipType],
this->Name,
format("Space {} Fraction", spaceCounter),
thisSpace.fraction);
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/EnergyPlus/SurfaceGeometry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,8 @@ namespace SurfaceGeometry {
thisZone.ExtGrossWallArea += thisSurface.GrossArea;
thisSpace.ExtGrossWallArea += thisSurface.GrossArea;
thisZone.ExtGrossWallArea_Multiplied += thisSurface.GrossArea * thisZone.Multiplier * thisZone.ListMultiplier;
thisZone.extPerimeter += thisSurface.Width;
thisSpace.extPerimeter += thisSurface.Width;
if (DetailedWWR) {
print(state.files.debug,
"{},Wall,{:.2R},{:.1R}\n",
Expand Down

4 comments on commit f857dfa

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

SpacePart4Followup (mjwitte) - Win64-Windows-10-VisualStudio-16: OK (2874 of 2874 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.

SpacePart4Followup (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3708 of 3709 tests passed, 1 test warnings)

Messages:\n

  • 2 tests had: EIO diffs.
  • 1 test had: Table big diffs.
  • 1 test had: Table small diffs.

Failures:\n

regression Test Summary

  • Passed: 812
  • Failed: 1

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.

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

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

SpacePart4Followup (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (797 of 797 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.