-
Notifications
You must be signed in to change notification settings - Fork 457
Fix 10168 zone multiplier incorrectly applies to water heater tank losses #11240
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
base: develop
Are you sure you want to change the base?
Fix 10168 zone multiplier incorrectly applies to water heater tank losses #11240
Conversation
…lies-to-water-heater-tank-losses
…lies-to-water-heater-tank-losses
|
@mjwitte this looks OK to me, but I'd defer to you on it. |
| if (state.dataHeatBal->Zone(ZoneNum).numSpaces > 1) { | ||
| gainFrac = state.dataHeatBal->space(spaceNum).FloorArea / state.dataHeatBal->Zone(ZoneNum).FloorArea; | ||
| } | ||
| if (std::find(AdjustTankLossMultipliers.begin(), AdjustTankLossMultipliers.end(), IntGainCompType) != AdjustTankLossMultipliers.end()) { |
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.
The method here is sound, but a comment line to explain would be helpful here.
But should this be done at the space level instead of here? At this point, only zone-level internal gain types call SetupSpaceInternalGain directly, so no multiplier adjustment is necessary. However, if at some point in the future the tank loss allows specifying a Zone Name or Space Name, then this adjustment will not get applied.
I think it would be better to move this into SetupSpaceInternalGain.
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.
Added a comment and moved to SetupSpaceInternalGain
| gainFrac = state.dataHeatBal->space(spaceNum).FloorArea / state.dataHeatBal->Zone(ZoneNum).FloorArea; | ||
| } | ||
| if (std::find(AdjustTankLossMultipliers.begin(), AdjustTankLossMultipliers.end(), IntGainCompType) != AdjustTankLossMultipliers.end()) { | ||
| int multiplier = state.dataHeatBal->Zone(ZoneNum).Multiplier * state.dataHeatBal->Zone(ZoneNum).ListMultiplier; |
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.
Nit picking, this can be const
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.
Fixed
| int RetNodeNum = 0 // for return air heat gains | ||
| ); | ||
|
|
||
| // Multipliers are double counted for tank losses - these are the internal gains that need adjust for this |
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.
It's not that the multipliers are double counted, but rather the loss should be distributed across the multiplied zones/spaces. Not sure how to say that more simply.
| static constexpr std::array<DataHeatBalance::IntGainType, 4> AdjustTankLossMultipliers = { | ||
| DataHeatBalance::IntGainType::WaterHeaterMixed, | ||
| DataHeatBalance::IntGainType::WaterHeaterStratified, | ||
| DataHeatBalance::IntGainType::ThermalStorageChilledWaterMixed, | ||
| DataHeatBalance::IntGainType::ThermalStorageChilledWaterStratified}; |
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.
If I'm following this correctly, any gain that comes from HVAC, electrical, refrigeration, etc. (anything other than the zone gains like lights, people, etc) should be included in this list. @shorowit ?
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 did it this way so we could easily add/remove other gains as needed, but beyond water heaters I wasn't sure what to add.
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 guess this is because the tanks have an ambient zone specified, right?
Doing a quick search for "Ambient Temperature Zone Name" in the IDD shows the following components:
Chiller:Electric:ASHRAE205
WaterHeater:Mixed
WaterHeater:Stratified
ThermalStorage:ChilledWater:Mixed
ThermalStorage:ChilledWater:Stratified
ThermalStorage:HotWater:Stratified
Pipe:Indoor
Searching "Ambient Zone Name" shows these:
ZoneHVAC:ForcedAir:UserDefined
AirTerminal:SingleDuct:UserDefined
Coil:UserDefined
PlantComponent:UserDefined
Duct:Loss:Conduction
Do these get handled here too?
Also, we can put a 📌 in this, but we should probably unify these.
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'll try to test these out and see if any should be added to the list.
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.
Opened #11365 to address other components with ambient temperature zones
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.
@mitchute , we'd like to prevent this PR from expanding in complexity more than the Issue it was created to resolve, so there's a new issue documenting your concerns so we don't lose track of them. In the meantime, this particular set of changes is ready to finalize.
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.
@tanaya-mankad that works. Thanks.
…lies-to-water-heater-tank-losses
…lies-to-water-heater-tank-losses # Conflicts: # tst/EnergyPlus/unit/WaterThermalTanks.unit.cc
|
@kevin-moos it has been 28 days since this pull request was last updated. |
Pull request overview
Description of the purpose of this PR
Fix a defect in which zone multipliers are incorrectly applied to water heater tank losses. Add unit test to show correctly adjusted space gain fraction.
Pull Request Author
Reviewer