-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix space sizing output (spsz) when there is no space HVAC equipment #10947
base: develop
Are you sure you want to change the base?
Conversation
@@ -4301,4 +4301,6 @@ TEST_F(EnergyPlusFixture, SizingManager_ZoneSizing_Coincident_NonAir_10x_Latent_ | |||
EXPECT_EQ("CHICAGO_IL_USA ANNUAL COOLING 1% DESIGN CONDITIONS DB/MCWB", | |||
OutputReportPredefined::RetrievePreDefTableEntry(*state, state->dataOutRptPredefined->pdchZnClDesDay, "ZONE 1")); | |||
EXPECT_EQ("7/21 16:00:00", OutputReportPredefined::RetrievePreDefTableEntry(*state, state->dataOutRptPredefined->pdchZnClPkTime, "ZONE 1")); | |||
// Expect output to spsz file | |||
EXPECT_FALSE(state->files.spsz.get_output().empty()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work. Tried several different ways to check the contents of this file.
Tested with example files: |
This probably doesn't need any attention but I noticed that, for 5ZoneAirCooledWithSpaceHeatBalance which has auto generated spaces, the header for epluszsz and eplusspsz look the same. Reported as Zone/Space Name ":" Design Day Name ":" Variable Name, so am just noting it here. Then I checked eplusout.csv and the spaces have their own report names which allows proper reporting (i.e., if they had the same report name they would be duplicates and excel would likely not show the duplicate, they would be in the csv but excel might? get confused). Again, probably nothing to do here. UPDATE: I have noticed this "duplicate" issue before but it happened when the cooling design day and heating design day date were the same (e.g., 1/21 for cooling and heating), so the header should report accurately). It was the rows that did not show up correctly, not the columns. |
Also tested 5ZoneAirCooledWithSpaceHeatBalance with Do Space Heat Balance for Sizing set as Yes and No. eplusspsz.csv is blank when set to No so this works as expected.
|
if (forSpaces) { | ||
zoneNum = state.dataHeatBal->space(i).zoneNum; | ||
} | ||
if (!state.dataHeatBal->Zone(zoneNum).IsControlled) continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only if you have any other changes.
int zoneNum = (forSpaces) ? state.dataHeatBal->space(i).zoneNum : i;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, of course. That construct still is not my first thought, or second, or ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes correct the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Walkthru
@@ -219,25 +219,6 @@ void ManageSizing(EnergyPlusData &state) | |||
state.dataGlobal->ZoneSizingCalc = true; | |||
Available = true; | |||
|
|||
if (state.dataSize->SizingFileColSep == CharComma) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to ZoneEquipmentManager to avoid creating an empty spsz output file. Can't make that decision here yet, because the project data (with Do Space Heat Balance flags) has not been read yet.
@@ -2346,14 +2346,15 @@ std::string sizingPeakTimeStamp(EnergyPlusData const &state, int timeStepIndex) | |||
void writeZszSpsz(EnergyPlusData &state, | |||
EnergyPlus::InputOutputFile &outputFile, | |||
int const numSpacesOrZones, | |||
Array1D<DataZoneEquipment::EquipConfiguration> const &zsEquipConfig, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer needed.
if (!zsEquipConfig(i).IsControlled) continue; | ||
int zoneNum = (forSpaces) ? state.dataHeatBal->space(i).zoneNum : i; | ||
if (!state.dataHeatBal->Zone(zoneNum).IsControlled) continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For sizing output, check if the parent zone is controlled instead of checking zsEquipConfig(i).IsControlled
(which is only true if there are SpaceHVAC:* objects).
} else { | ||
state.files.spsz.filePath = state.files.outputSpszTxtFilePath; | ||
} | ||
state.files.spsz.ensure_open(state, "UpdateZoneSizing", state.files.outputControl.spsz); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait until here to open zsz and spsz files. At this point we know if doSpaceHeatBalanceSizing
is active.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually glad you fixed this. I saw the 0 kB files but wasn't sure how to avoid that. This is a perfect fix.
Pull request overview
Description of the purpose of this PR
SpaceHVAC:*
objects.Pull Request Author
If any diffs are expected, author must demonstrate they are justified using plots and descriptionsIf any defect files are updated to a more recent version, upload new versions here or on DevSupportIf IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange labelIf structural output changes, add to output rules file and add OutputChange labelIf adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependenciesReviewer
`