Support Space for Infiltration and Ventilation#9564
Conversation
| }; | ||
|
|
||
| struct ZoneData | ||
| struct ZoneData : ZoneSpaceData |
There was a problem hiding this comment.
Is ZoneData really a subclass of ZoneSpaceData or is ZoneSpaceData a "sub-struct" of ZoneData? Is there any usage in which ZoneSpaceData can be used instead of ZoneData?
There was a problem hiding this comment.
Is
ZoneDatareally a subclass ofZoneSpaceDataor isZoneSpaceDataa "sub-struct" ofZoneData?
Well, no. ZoneData and SpaceData are peers with very similar structs (many of the same field names), but then each one has some additional fields that only apply to one or the other.
Is there any usage in which
ZoneSpaceDatacan be used instead ofZoneData?
Possibly. For calculating things like Volume, FloorArea, CeilingHeight, etc. I was thinking those could be member functions of ZoneSpaceData.
There was a problem hiding this comment.
Actually, they aren't peers. Spaces are contained within Zones but they do have many similar attributes.
There was a problem hiding this comment.
Okay, so this is kind of a "tweener" idiom. Not exactly an "is-a" (child struct), not exactly a "has-a" (included struct). Both work for now, can keep it this way until/unless a more obvious parent-child relationship reveals itself.
| int ListMultiplier = 1; // For Zone Group object: used in reporting and systems calculations | ||
| int ListGroup = 0; // used only in Zone Group verification. and for error message. | ||
| Real64 RelNorth = 0.0; // Relative North (to building north) [Degrees] | ||
| Real64 OriginX = 0.0; // X origin [m] |
| Real64 OriginX = 0.0; // X origin [m] | ||
| Real64 OriginY = 0.0; // Y origin [m] | ||
| Real64 OriginZ = 0.0; // Z origin [m] | ||
| int OfType = 1; // 1=Standard Zone, Not yet used: |
There was a problem hiding this comment.
Make this an enumeration and please don't use Of in variable/type names.
src/EnergyPlus/DataHeatBalance.hh
Outdated
| int W5GapMatEQL = 0; // Window5 Equivalent Layer Single-Gas Materials | ||
| int TotZoneAirBalance = 0; // Total Zone Air Balance Statements in input | ||
| int TotFrameDivider = 0; // Total number of window frame/divider objects | ||
| int NumOfZoneLists = 0; // Total number of zone lists |
There was a problem hiding this comment.
When is something NumOf vs. Tot vs. nothing?
| if (zoneVolume > 0.0) { | ||
| spaceFrac = thisSpace.Volume / zoneVolume; | ||
| } else { | ||
| ShowSevereError(state, std::string(RoutineName) + "Zone volume is zero when allocating Infiltration to Spaces."); |
There was a problem hiding this comment.
I understand that string + literal string is a special case, but this is still at best one reallocation more than format.
| "The Minimum Indoor Temperature value and schedule are provided. The scheduled temperature will be used in the " + | ||
| cCurrentModuleObject + " object = " + cAlphaArgs(1)); | ||
| ShowWarningError(state, | ||
| std::string{RoutineName} + |
There was a problem hiding this comment.
If you find yourself doing std::string{RoutineName}, turn around and use format for the whole thing.
| for (ZoneNum = 1; ZoneNum <= state.dataGlobal->NumOfZones; ++ZoneNum) { | ||
|
|
||
| auto &thisZone = state.dataHeatBal->Zone(ZoneNum); | ||
| if (!state.dataHeatBal->Zone(ZoneNum).HasFloor) { |
| @@ -12039,7 +12044,7 @@ namespace SurfaceGeometry { | |||
|
|
|||
| int countNotFullyEnclosedZones = 0; | |||
| for (ZoneNum = 1; ZoneNum <= state.dataGlobal->NumOfZones; ++ZoneNum) { | |||
There was a problem hiding this comment.
If you're not going to use ZoneNum for anything other than find thisZone, you may as well define this loop as (thisZone : state.dataHeatBal->Zone). I can't believe I just suggested that. What's happening to me?
| Test 352a, !- Name | ||
| None, !- Fuel Type | ||
| ZONE ONE, !- Zone or ZoneList Name | ||
| ZONE ONE, !- Zone or ZoneList or Space or SpaceList Name |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| Test 352a, !- Name | ||
| None, !- Fuel Type | ||
| 试验, !- Zone or ZoneList Name | ||
| 试验, !- Zone or ZoneList or Space or SpaceList Name |
There was a problem hiding this comment.
I do not speak this language! Could be right, could be wrong.
| People, | ||
| ZONE ONE People, !- Name | ||
| ZONE ONE, !- Zone or ZoneList Name | ||
| ZONE ONE, !- Zone or ZoneList or Space or SpaceList Name |
There was a problem hiding this comment.
This field name change needs to be described in Rules22-1-0-to-22-2-0.md
There was a problem hiding this comment.
Same for People, Lights, and all *Equipment object. The field names changed before, this just brings the example files up to date, because I ran the entire set through transition so it cleaned up all the field names.
There was a problem hiding this comment.
OK, I see. So these would show up in a previous change log.
There was a problem hiding this comment.
OK, I see. So these would show up in a previous change log.
| Lights, | ||
| SPACE1-1 Lights 1, !- Name | ||
| ZONE ONE, !- Zone or ZoneList Name | ||
| ZONE ONE, !- Zone or ZoneList or Space or SpaceList Name |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
I reviewed everything. Very good changes and a good learning experience in review. I think for this type of change we need to rely on example file results moreso than code review for results accuracy. I tried several variations of input changes to try and break the code. A few numerical differences that should be explained and some editorial work on the docs. Other than that, this feature looks good for a first pass.
Overall nice job. |
|
I ran original 5ZoneAirCooled example file with the same ventilation object applied to Space1-1. The annual ventilation sum matches what is shown in the table above. So there is likely no issue with the table reports as first thought. I still do not understand what is wrong with the hand calc. |
|
From #9564 (comment)
Looking at the ABUPS report, electricity stays the same, but natural gas increases from 28.34 GJ to 28.55. So, if the OA fraction changes but the overall airflow stays the same, this would make sense. These values are for the file with 2 run periods, Jan 1-31, and July 1-31 (1488.00 hrs). However, the annual values in the Energy Meters table output are nowhere near the values in ABUPS (even in develop). |
|
@rraustad Regarding hand calc comment #9564 (comment). |
|
@Myoldmopar I believe that all of @rraustad 's comments have been addressed either in code or in comments. Assuming CI comes back all happy, this will be ready for your final review. |
|
@Myoldmopar I agree with @mjwitte assessment. This should be ready to go. |
| EXPECT_EQ(thisInfiltration.DesignLevel, flows[itemNum]); | ||
| EXPECT_TRUE(UtilityRoutines::SameString(ventNames[itemNum], thisVentilation.Name)); | ||
| EXPECT_EQ(thisVentilation.DesignLevel, flows[itemNum]); | ||
| } |
There was a problem hiding this comment.
This unit test that shows inputs to infiltration and ventilation are correctly interpreted/managed at the space level.
rraustad
left a comment
There was a problem hiding this comment.
This is a good addition to E+. Nice job!
|
Let's merge this in and perhaps the folks wanting to leverage this space stuff (@shorowit?) could play with it in their own workflows/tools, leaving us plenty of time to address anything before release. Thanks all! |


Pull request overview
Addresses #9448
GlobalInternalGainMiscObjectstruct and related variables fromDataHeatBalancetoInternalHeatGains.hh. Nearly all arrays that usedGlobalInternalGainMiscObjectand relatedNum...variables are now local to their respective getInput functions. Lights and ElectricEquipment are needed for the demand manager, so they're now instate.InternalHeatGains.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.