-
Notifications
You must be signed in to change notification settings - Fork 425
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 VAV min flow frac > 1.0 and a bunch of termunitsizing issues related to multiple airloops #6338
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.
👍
Could you comment on the one question I had about the final calculation that pulls the flow back up to at least minOA?
@@ -2099,10 +2099,10 @@ namespace SingleDuct { | |||
} | |||
if ( Sys( SysNum ).ZoneMinAirFracMethod == ConstantMinFrac ) { | |||
if ( ZoneSizingRunDone ) { | |||
if ( CurZoneEqNum > 0 ) { | |||
if ( CurTermUnitSizingNum > 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.
Based on the issue description, I guess this gets the index correctly due to the extra TermUnitSizing objects being stored.
// use the combined defaults or other user inputs stored in DesCoolVolFlowMin | ||
if ( Sys( SysNum ).MaxAirVolFlowRate > 0.0 ) { | ||
MinAirFlowFracDes = FinalZoneSizing( CurZoneEqNum ).DesCoolVolFlowMin / Sys( SysNum ).MaxAirVolFlowRate; | ||
MinAirFlowFracDes = min( 1.0, TermUnitFinalZoneSizing( CurTermUnitSizingNum ).DesCoolVolFlowMin / Sys( SysNum ).MaxAirVolFlowRate ); |
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 to me.
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.
Why would this ever be > 1 ? There is something else going on.
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.
Valid point (why would this ever be > 1? One example is a hard-sized value for one and autosize for the other that aren't consistent. For the fully autosized case, other fixes in this PR should have gotten rid of that, but I haven't confirmed that.
src/EnergyPlus/SizingManager.cc
Outdated
@@ -3768,6 +3768,9 @@ namespace SizingManager { | |||
thisTUFZSizing.DesHeatOAFlowFrac = 0.0; | |||
} | |||
thisTUFZSizing.MinOA = thisFZSizing.MinOA * minOAFrac; | |||
|
|||
// Make sure cooling min flow is at least the minOA flow, regardless of the term unit cooling sizing ratio applied above | |||
thisTUFZSizing.DesCoolVolFlowMin = max( thisTUFZSizing.DesCoolVolFlowMin, thisTUFZSizing.MinOA ); |
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 seems like it stomps on things right at the end here. Is there any chance this could result in a DesCoolVolFlowMin too high and have the same problem (ratio>1.0) downstream somewhere?
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.
Good question. I added this, because the DOAS system in 5ZoneAirCooledWithDOASAirLoop came back with a zero design min frac because it's airterminal sizing spec is 0 for cooling 1.0 for outdoor air.
One perspective is that the OA requirement should always be king at this point, so there should be two more lines here to make sure that DesHeatVolFlow and DesCoolVolFlow should be >=MinOA. But then what about all the other flavors of that? Will review the base zone sizing calcs to see which of these are checked against OA requirement in FinalZoneSizing.
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 other perspective is that the equipment should sort this out and this line should go. The autosized airflow for this terminal unit was OK even without this line. It was just the autosized min frac that showed as zero.
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.
@Myoldmopar @rraustad Back to sizing basics. The zone MinOA requirement impacts the cooling design flow rate during the base zone sizing calcs here. You can see from the blame that this has been the case since way-back-when. Interesting that this is only applied to cooling flow, and not heating, but that's how it is.
The way the air terminal sizing spec is working at the moment, the OA requirement will be the floor for the design cooling flow rate, even if a particular air terminal is supposed to deliver a fraction (or zero) of the OA. That's true with or without the line that was added here to adjust DesignCoolVolMinFlow.
I'm working on a fix for that now. I'm going to save some info about the impact of MinOA (like maybe DesignCoolVolFlowNoOA) that honors all the minima except MinOA and then use it here with the ratios to set TermUnitFinalZoneSizing.DesignCoolVolFlow appropriately. Not sure about all the other flavors of *Cool* here.
|
||
TEST_F( EnergyPlusFixture, VAVReheatTerminal_SizeMinFrac ) { | ||
std::string const idf_objects = delimited_string( { | ||
"Version,8.4;", |
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.
Version 8.4? 😃
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.
What? It works. Will change if I change the other line.
CurTermUnitSizingNum = 1; | ||
DataSizing::TermUnitFinalZoneSizing( 1 ).DesCoolVolFlowMin = 0.5; | ||
SingleDuct::SizeSys( SysNum ); | ||
EXPECT_EQ( 0.5, SingleDuct::Sys( SysNum ).ZoneMinAirFrac ); |
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.
SingleDuct::Sys( SysNum ).ZoneMinAirFrac = AutoSize; // need to reset this so it sizes again | ||
DataSizing::TermUnitFinalZoneSizing( 1 ).DesCoolVolFlowMin = 1.5; | ||
SingleDuct::SizeSys( SysNum ); | ||
EXPECT_EQ( 1.0, SingleDuct::Sys( SysNum ).ZoneMinAirFrac ); |
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.
Excellent. This unit test makes me feel very good about these changes.
…inFlow6327 Conflicts: tst/EnergyPlus/unit/SingleDuct.unit.cc
src/EnergyPlus/DataSizing.hh
Outdated
@@ -455,6 +455,7 @@ namespace DataSizing { | |||
bool EMSOverrideDesHeatMassOn; // true if EMS is acting on this structure | |||
Real64 EMSValueDesHeatMassFlow; // Value EMS directing to use for Design Heating air mass flow [kg/s] | |||
Real64 DesCoolMassFlow; // zone design cooling air mass flow rate [kg/s] | |||
Real64 DesCoolMassFlowNoOA; // zone design cooling air mass flow rate with applying MinOA as a limit [kg/s] |
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.
Accidentally messed up this commit - it is a mix of new changes plus merging in develop. Initial display of this commit shows the new changes mostly, plus conflict resolution changes.
This seems good to go from my point of view. You're done with it right @mjwitte? |
No, not quite done yet. I don't like the diffs in 5ZoneCoolBeam, so I'll revert those changes and sort that out later. Also, termunitsizing isn't flowing in correctly yet. |
With this commit, airflow rates are where they should be. May still be an issue with system OA and reheat coil sizing. Will check back later. |
}} | ||
|
||
// Now make sure that the design cooling air flow rates are greater than or equal to the specified minimums including MinOA | ||
{ Real64 MaxOfMinCoolVolFlow = 0.0; // max of the user specified design cooling minimum flows and min OA flow [m3/s] |
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.
What is the purpose of the open bracket here and close bracket at line 2773?
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.
To limit the context of MaxOfMinCoolVolFlow and make sure it doesn't get confused with the other instance of MaxOfMinCoolVolFlow that was defined earlier without MinOA.
Made progress on the reheat coil sizing and the overall airloop sizing, but it's still not right if the system flow rate is specified in sizing:system along with airterminal sizing factors. Close. |
Real64 adjustedFlow = heatFlowNoOA * heatFlowRatio + ( heatFlowWithOA - heatFlowNoOA ) * this->SpecMinOAFrac; | ||
return adjustedFlow; | ||
} | ||
|
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.
These methods are so nice.
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.
Yeah, but they are being added to DataSizing.cc what was a data-only file. I am not sure of the design policy but I would have expected such routines to be in SizingManager.cc. I guess the thinking is that since they are implemented as structure methods then this is the right place.
} | ||
SysSizing( CurOverallSimDay, AirLoopNum ).NonCoinCoolMassFlow += ZoneSizing( CurOverallSimDay, CtrlZoneNum ).DesCoolMassFlow * coolFlowRatio / ( 1.0 + TermUnitSizing( TermUnitSizingIndex ).InducRat ); | ||
Real64 adjCoolMassFlow = TermUnitSizing( TermUnitSizingIndex ).applyTermUnitSizingCoolFlow( ZoneSizing( CurOverallSimDay, CtrlZoneNum ).DesCoolMassFlow, ZoneSizing( CurOverallSimDay, CtrlZoneNum ).DesCoolMassFlowNoOA ); | ||
SysSizing( CurOverallSimDay, AirLoopNum ).NonCoinCoolMassFlow += adjCoolMassFlow / ( 1.0 + TermUnitSizing( TermUnitSizingIndex ).InducRat ); |
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 VRP diffs were not expected here. Investigating. |
@Myoldmopar So, here's the status of this. In the original implementation of DesignSpecification:AirTerminal:Sizing (back in #6248) the limited set of test files I was using convinced me that the new sizing was working, and it does indeed flow through and, say if you specify a system to serve 50% of the cooling load, the flows and coils come out 50% smaller. Or, specifying one airloop to serve all of the heating/cooling (and no outdoor air) with a DOAS that serves all of the outdoor air and no heating/cooling - that works now. But, I hadn't tested other more complicated combinations with air terminal sizing, like VRP, specified flow in the sizing:system object, sizing on "ventilationrequirement", etc. Those are what this PR is fixing. And it's turning out to be a lot of code changes - lots of places where So, the best path forward is probably to review #6272 and get that in. And if this one proves to be too much to throw in, then I'll add a caveat to the docs explaining what work and what doesn't at this point. |
OK, I think given how far we are past the 11th hour, we should probably focus on your best path forward. Can you add those caveats to the documentation over in #6272 and I'll work on getting that in. Then we'll be done for 8.8. |
@Myoldmopar @EnergyArchmage @rraustad OK, this is ready for review. Diffs are summarized/explained in the PR overview. Please look this over carefully - questions welcomed. I still need to look for any engineering ref changes that may be needed. |
ShowFatalError( "This is a defect. Please report this issue." ); | ||
} | ||
if ( SysSizNum > 0 ) { | ||
ZoneOAUnc = TermUnitFinalZoneSizing( TermUnitSizingIndex ).TotalOAFromPeople + TermUnitFinalZoneSizing( TermUnitSizingIndex ).TotalOAFromArea; // should not have diversity at this point |
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.
How are you splitting up people and area per terminal unit? line 4382 SimAirServingZones
// Outdoor air | ||
thisTUFZSizing.MinOA = thisFZSizing.MinOA * minOAFrac; | ||
thisTUFZSizing.TotalOAFromPeople = thisFZSizing.TotalOAFromPeople * minOAFrac; | ||
thisTUFZSizing.TotalOAFromArea = thisFZSizing.TotalOAFromArea * minOAFrac; |
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.
Line 4355 SizingManager. So these are the total zone OA flow per person and zone, correct (from line 1640 of ZoneEquipmentManager)? And you move that data into each terminal unit sizing array which is then used for Std 62.1. Do you know the TU flow rate and the total zone flow rate here? You could use that ratio to allocate OA to each terminal unit. At the very least, you could divide by number of TU's per zone.
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 user is supposed to manage OA allocation with DesignSpecification:AirTerminal:Sizing objects. I hadn't thought about trying to automatically allocate that. If the user puts more than one air terminal in the same zone without any DSATZ objects, then there will be excess OA. Flow rates are known here, so I suppose something could be done automatically for this case.
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.
And just to clarify. TerminalUnitFinalZoneSizing is used for more than Std 62.1 calcs - it's used everywhere for terminal unit sizing, including .MinOA. So, then the question would be if we're going to automatically allocate OA for multiple terminal units without any DesignSpec AT Sizing objects, then do we automatically divide up the supply flow also? If there are no DSATZ objects, then the supply flow rate will be the same for every terminal unit in the same zone. So, that puts us back to dividing by the number of TUs per zone - but only if nobody in that zone has a DesignSpec AT Sizing object.
//Vpz: "Primary" supply air from main air handler served by an oa mixer | ||
ZonePA = FinalZoneSizing( CtrlZoneNum ).DesCoolVolFlow; | ||
ZonePA = TermUnitFinalZoneSizing( TermUnitSizingIndex ).DesCoolVolFlow; | ||
//Vdz: "Discharge" supply air delivered to zone by terminal unit | ||
ZoneSA = max( TermUnitSizing( TermUnitSizingIndex ).AirVolFlow, ZonePA ); |
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.
maybe this instance of TermUnitSizing should now be TermUnitFinalZoneSizing, line 4463 SimAirServingZones.cc
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.
TermUnitSizing holds values that are set in the terminal units, e.g. here for PIU. The values should be based on TermUnitFinalZoneSizing with any scaling.
// Don't allow the design terminal airflow to be less than the design heating airflow | ||
TermUnitSizing( TermUnitSizingIndex ).AirVolFlow = max( TermUnitSizing( TermUnitSizingIndex ).AirVolFlow, FinalZoneSizing( CtrlZoneNum ).DesHeatVolFlow ); | ||
TermUnitSizing( TermUnitSizingIndex ).AirVolFlow = max( TermUnitSizing( TermUnitSizingIndex ).AirVolFlow, TermUnitFinalZoneSizing( TermUnitSizingIndex ).DesHeatVolFlow ); |
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.
More TermUnitSizing vs TermUnitFinalZoneSizing here. And line 4607 below
DataSizing::VpzMinClgByZone.dimension( NumOfZones, 0.0 ); | ||
DataSizing::VpzHtgByZone.dimension( NumOfZones, 0.0 ); | ||
DataSizing::VpzMinHtgByZone.dimension( NumOfZones, 0.0 ); | ||
DataSizing::VdzClgByZone.dimension( NumAirTerminalUnits, 0.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.
Unfortunate that all these array variables are named *ByZone when now they should be *ByTerminal or something.
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.
True, I could rename them if you think it's more clear.
Pretty massive and important set of changes. I have reviewed the code changes and don't have any serious comments. Diffs seem appropriate I/O Ref entry for DesignSpecification:AirTerminal:Sizing lists some limitations that I think have been addressed here, so the documentation can be revised to remove some caveats there. |
As for item # 10 in PR description, I have no idea. I am not up to speed with that VRF flavor. Presumably it is related to changes at line 7753 and 7767 in HVACVariableRefrigerantFlow.cc "Garate" stuff. seems like unrelated stuff crept in. |
Looks good to me. I'm going to hold off on merging to let CI keep running on a few other branches, but this will go in within a couple hours. |
Pull request overview
Explanation of Diffs
eio diffs: VAV SYS 1 is a recirculation system (no outdoor air) so it should have a zero system central design heating load, and the diffs for reheat coil sizing look good, too.
5ZoneAirCooled_VRPSizing, 5ZoneAirCooled_VRPSizing_MaxZd
eio and table diffs for Zone-level OA flow rates per items 5 and 6 above.
5ZoneVAV-ChilledWaterStorage-Mixed_DCV_MaxZd and 5ZoneVAV-ChilledWaterStorage-Mixed_DCV_MultiPath
eio, eso, and table diffs
Zone MinOA is no longer adjusted by Std62 system-level ratios so this changes the powered induction unit minimum primary air flow rate, and also the reheat coil size.
Annual run of 5ZoneVAV-ChilledWaterStorage-Mixed_DCV_MultiPath shows some changes in annual energy use.
2% more heating gas, 2% decrease in cooling electricity (as related electric). Small change in hours not met (1 more heating not met out of 200, 5 more cooling out of 335).
Fault_FoulingEvapCooler_StripMallZoneEvapCooler, StripMallZoneEvapCoolerAutosized, StripMallZoneEvapCooler
table diffs - order of rows in Energy Meters table.
err diffs - Reported severe errors are the same, but they are now counted as 2 severe errors during sizing (because zone equipment is called sooner now in cases without system sizing, if there was autosized system equipment in this file, then the errors would be during sizing both before and after this PR).
House-2FurnaceAC*
eio diffs - just small warmup convergence diffs
table diffs - Std62.1 reports - These files have two furnaces, one sized to 75% of the total load, and the other to 25%. Before this PR,, any zone-level flow rates in the Std 62 reports were the same for both systems which was wrong. Now they are different as expected. System level numbers were correct before and have not changed.
MultiStory and MicroCogeneration
rdd/mtd/table diffs - order of rows changed in Energy Meters table report. No change in values. Due to changes in
ManageSizing
to call zone equipment sooner when there is no system sizing.RadLoTempElecTermReheat and RadLoTempHydrTermReheat
table diffs - In the new coil sizing details reports - before this PR, the Terminal Unit Reheat Coil Multiplier column was all -9999. Now there are values on the order of 2 or 3 - assuming they are correct.
RefBldgLargeHotelNew2004_Chicago
eio diffs - VAV min flow fraction is 1.0 now instead of 2+ - the whole reason this PR got started in the first place.
HVACTemplate-5ZoneVRF and VariableRefrigerantFlow_5Zone
err diffs - some warnings now counted as sizing warnings due to earlier execution of VRF equipment.
VariableRefrigerantFlow_FluidTCtrl_HR_5Zone
err diffs - Small change reported ODB in warnings
table diffs - In the new Coil Sizing Details table, significant differences in VRF terminal unit coil capacity and leaving conditions at "rating conditions".
???? Problem ???
DirectIndirectEvapCoolers, DirectIndirectEvapCoolersVSAS, HeatPumpWaterHeater, HeatPumpWaterHeaterStratified, RefBldgSecondarySchoolNew2004_Chicago, RefBldgSmallHotelNew2004_Chicago, and VSHeatPumpWaterHeater
eio diffs - change in time stamp for peak system heating load (no change in value)
LookupTables
eio diffs - just a change in order - table curve output shows before zone sizing output now.
table diffs - change in Design Size Constant Minimum Air Flow Fraction (no change in results, because there's a user-specified min frac)
Work Checklist
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Review Checklist
This will not be exhaustively relevant to every PR.