Correct SizingMethod variable initialization#11461
Conversation
|
|
|
|
| if (this->m_HeatPump) { | ||
| EqSizing.SizingMethod(HVAC::HeatingAirflowSizing) = HeatingSAFlowMethod; | ||
| } | ||
| } |
There was a problem hiding this comment.
I really can't believe that this type of code failure (initializing a necessary sizing array variable) lasted this long. It could be that some clean up or refador caused this but in the end this seems to fix it, along with the 2 logic changes below.
| // cooling coil air inlet node temp is greater than cooling coil air outlet node temp | ||
| EXPECT_GT(state->dataLoopNodes->Node(thisSys->AirInNode).Temp, state->dataLoopNodes->Node(thisSys->AirOutNode).Temp); | ||
| EXPECT_NEAR(thisSys->m_CoolingCycRatio, 0.36056, 0.001); | ||
| EXPECT_NEAR(thisSys->m_CoolingCycRatio, 0.37971, 0.001); |
There was a problem hiding this comment.
I assume that a change like this is caused by the code taking a different path now.
| DataZoneEquipment::GetZoneEquipmentData(*state); // read zone equipment configuration and list objects | ||
|
|
||
| state->dataSize->ZoneEqSizing.allocate(1); | ||
| state->dataSize->ZoneEqSizing(1).SizingMethod.allocate(25); |
There was a problem hiding this comment.
A unit test that does not use ZoneUnitarySysTest fixture (where these are already allocated) will need to allocate these, the 2nd one because of this code change. This unit test uses EnergyPlusFixture.
|
|
|
I do not understand these CI diffs. I do expect potential diffs but I also expect them to match my local results. If I run PackagedTerminalAirConditionerVSAS in this branch and develop I get these results using weather file LOCATION,Miami Intl Ap,FL,USA,TMY3,722020. develop: this branch: The CI shows: |
|
|
|
I ran git bisect. This started failing due to something in #11432, but I can't narrow it down to a specific commit. That all seems unrelated to the issue at hand anyway, so I'm guessing some cleanup in there exposed this issue. |
|
I'm still wrestling with the best logic for these scalable sizing inputs. I think I may have over specified the UnitarySystemModel_ConfirmUnitarySystemSizingTest unit test that exercises these scalable inputs thereby hiding the correct answer. If the code takes the wrong path it will just size with the data I used to back calculate the data used for the unit test (e.g., ends up using FinalZoneSizing data instead of the scaled value). I'll try to get this as sound as possible knowing that this area needs attention. |
|
I don't think 11432 is at all related. Changes to WindowManager should not affect component sizing. |
Agreed |
| SysCoolingFlow = CoolCapAtPeak * this->m_MaxCoolAirVolFlow; | ||
| state.dataSize->DataTotCapCurveIndex = 0; | ||
| state.dataSize->DataFlowPerCoolingCapacity = this->m_MaxCoolAirVolFlow; | ||
| state.dataSize->DataAutosizedCoolingCapacity = CoolCapAtPeak; |
There was a problem hiding this comment.
These are the globals used in the switch block for FlowPerCoolingCapacity, so set them and use that block in the switch on the final sizing pass. I still don't like things in the sizer functions, like heating used in a cooling function and using a std::max when sizing a fractional cooling air flow, but this is a good step forward. I do recall that these if conditionals were added just to be safe but it seems like over specifying code. See CoolingAirFlowSizing as an example.
|
|
|
OutdoorAirUnit has some new warnings and different component sizing so that file needs to be looked at before this can merge. |
|
The OutdoorAirUnit example file has CoilSystem:Cooling:DX objects in the outdoor air unit equipment list. This object is managed by UnitarySystem so the changes in this branch stomp on OA Unit sizing. I still think there is an issue with how the SizingMethod is handled in UnitarySystem but changes like this seem too sweeping to make this type of change at this time. The outdoor air unit uses these ZoneEqSizing variables which are used in the default for the switch in CoolingAirFlowSizing. To make this code change would require changing other zone equipment sizing methodology and that seems a little much at this point. I will close this PR and make another change that directly fixes the failing unit test. |
|
@mitchute I'm not sure what to do with this branch since it tries to address an issue with UnitarySystem sizing. The scalable sizing inputs do not seem to be handled properly but this type of code change would take more time to flesh out. I think this PR should close but this issue does need to stay on the radar. PR #11464 directly corrects the unit test for now. |
|
Closing, but I will not delete the branch. |
Pull request overview
SizingMethodvariable on Linux 24.04 for "UnitarySystemModel_MultiSpeedDXCoolCoil_Only_NoFan" #11460Description of the purpose of this PR
The UnitarySystem model uses scalable sizing inputs that need to be correctly initialized according to user inputs.
Pull Request Author
Reviewer