-
Notifications
You must be signed in to change notification settings - Fork 396
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 HVAC Sizing Summary Min OA flow for Spaces #10728
Conversation
|
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.
Code walkthru
bool const UseMinOASchFlag, // Use min OA schedule in DesignSpecification:OutdoorAir object | ||
bool const PerPersonNotSet, // when calculation should not include occupants (e.g., dual duct) | ||
bool const MaxOAVolFlowFlag, // TRUE when calculation uses occupancy schedule (e.g., dual duct) | ||
int const spaceNum) |
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.
Add spaceNum
parameter to several OA function calls.
PerPersonNotSet, | ||
MaxOAVolFlowFlag, | ||
thisDSOA.dsoaSpaceIndexes(dsoaCount)); | ||
if ((spaceNum == 0) || ((spaceNum > 0) && (spaceNum == thisDSOA.dsoaSpaceIndexes(dsoaCount)))) { |
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.
When calculating for a DesignSpecification:OutdoorAir:SpaceList, if spaceNum==0
then sum all the spaces on the list, otherwise "sum" only the matching space. Same approach for 3 OA functions.
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.
Makes sense.
// Use the max occupancy PEOPLE structure to calculate design min OA for each zone from the outside air flow per person input | ||
Real64 TotPeopleInZone = 0.0; | ||
Real64 ZoneMinOccupancy = 0.; | ||
int DSOAPtr = finalZoneSizing.ZoneDesignSpecOAIndex; // index to DesignSpecification:OutdoorAir object | ||
if ((DSOAPtr > 0) && !dsoaError) { |
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 a chunk of code to a separate function so it can be called for zones or spaces.
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.
👍
void calcSizingOA(EnergyPlusData &state, | ||
DataSizing::ZoneSizingData &zsFinalSizing, | ||
DataSizing::ZoneSizingData &zsCalcFinalSizing, | ||
bool &dsoaError, | ||
bool &ErrorsFound, | ||
int const zoneNum, | ||
int const spaceNum) | ||
{ | ||
// Use the max occupancy PEOPLE structure to calculate design min OA for each zone from the outside air flow per person input | ||
Real64 TotPeopleInZone = 0.0; | ||
Real64 ZoneMinOccupancy = 0.; | ||
int DSOAPtr = zsFinalSizing.ZoneDesignSpecOAIndex; // index to DesignSpecification:OutdoorAir object |
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.
Here's the new function.
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.
Looks good to me.
PerPersonNotSet, | ||
MaxOAVolFlowFlag, | ||
thisDSOA.dsoaSpaceIndexes(dsoaCount)); | ||
if ((spaceNum == 0) || ((spaceNum > 0) && (spaceNum == thisDSOA.dsoaSpaceIndexes(dsoaCount)))) { |
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.
Makes sense.
Real64 desFlowPerZonePerson(EnergyPlusData &state, | ||
int const actualZoneNum // Zone index | ||
); | ||
Real64 desFlowPerZonePerson(EnergyPlusData &state, int const actualZoneNum, int const spaceNum = 0); |
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.
Nice. Love the default argument value usage here. Clean.
// Use the max occupancy PEOPLE structure to calculate design min OA for each zone from the outside air flow per person input | ||
Real64 TotPeopleInZone = 0.0; | ||
Real64 ZoneMinOccupancy = 0.; | ||
int DSOAPtr = finalZoneSizing.ZoneDesignSpecOAIndex; // index to DesignSpecification:OutdoorAir object | ||
if ((DSOAPtr > 0) && !dsoaError) { |
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.
👍
Happy with develop pulled in, let's get this in. Thanks @mjwitte |
Pull request overview
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.