-
Notifications
You must be signed in to change notification settings - Fork 398
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
Space Sizing and HVAC Documentation and Unit Test Updates #10239
Conversation
@Myoldmopar @rraustad Funny how unit tests uncover issues. So, found that a big chunk of zone equipment config inits weren't being done for spaces. Hopefully this will come back clean and pass muster to go in for v23.2. |
if (state.dataHeatBal->doSpaceHeatBalanceSimulation) { | ||
for (auto &thisSpaceEquipConfig : state.dataZoneEquip->spaceEquipConfig) { | ||
if (!thisSpaceEquipConfig.IsControlled) continue; | ||
thisSpaceEquipConfig.beginEnvirnInit(state); |
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.
OK, so you needed to do this for zone AND spaces. Easy to overlook since it's only updating exhaust and return nodes, and only on BeginEnvrnFlag.
if (state.dataHeatBal->doSpaceHeatBalanceSimulation) { | ||
for (auto &thisSpaceEquipConfig : state.dataZoneEquip->spaceEquipConfig) { | ||
if (!thisSpaceEquipConfig.IsControlled) continue; | ||
thisSpaceEquipConfig.hvacTimeStepInit(state, FirstHVACIteration); |
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.
Now this one happens each FirstHVACIteration, still easy to overlook.
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 does pass muster with me, and really does a good job of polishing up this work. Thanks @mjwitte
} | ||
} | ||
} | ||
} |
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.
I am a big fan of these functions with clear purposes. This type of code makes it easy to envision more intentional calling points like we do in plant. One big one-time-init pass and then no need to check one-time-flag inside the components anymore. This is a good step.
EXPECT_NEAR(mixSpace1Node.MassFlowRateMaxAvail, equipInletNode.MassFlowRateMaxAvail * mixSpace1.fraction, 0.0001); | ||
EXPECT_NEAR(mixSpace2Node.MassFlowRateMaxAvail, equipInletNode.MassFlowRateMaxAvail * mixSpace2.fraction, 0.0001); | ||
EXPECT_NEAR(mixSpace3Node.MassFlowRateMaxAvail, equipInletNode.MassFlowRateMaxAvail * mixSpace3.fraction, 0.0001); | ||
} |
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.
Wonderful unit tests.
CI is happy, just the one space file with expected diffs. Pulled in develop and it's happy locally as well. Merging this, thanks @mjwitte |
Pull request overview
Completes the Space Sizing and HVAC new feature. See also
#9982
#10174
#10205
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.