Skip to content

Allow Multiple Air Loops to One Thermal Zone - Part 2 and Fix Zone Air Mass Balance#6272

Merged
Myoldmopar merged 52 commits intodevelopfrom
Beyond1Airloop-Part2
Sep 25, 2017
Merged

Allow Multiple Air Loops to One Thermal Zone - Part 2 and Fix Zone Air Mass Balance#6272
Myoldmopar merged 52 commits intodevelopfrom
Beyond1Airloop-Part2

Conversation

@mjwitte
Copy link
Copy Markdown
Contributor

@mjwitte mjwitte commented Aug 24, 2017

Pull request overview

Followup work to complete and clean up #6248. This pull request is focused on the simulation side of multiple airloops - getting rid of the one-return-node/one-airloopnum per zone mindset and revising the whole zone air mass balance to split thing up across multiple return nodes in a zone.

Diffs Comments

6 files with big diffs as of 2017-09-21

5ZoneAirCooledWithDOASAirLoop and DOASDXCOIL_wADPBFMethod_NoReturnPath - big table diffs, because the outdoor air summary table is correct now (previously zeros)

5ZoneAirCooled_ZoneAirMassFlowBalance and 5ZoneAirCooled_ZoneAirMassFlowBalance_Pressurized - big eso diffs etc because zone air mass conservation is fixed here

DOAToWaterToAirHPInlet - These diffs should go away once #6333 drops in.

VSHeatPumpWaterHeater - big table and eio diffs because there is one less warmup day now as of 09-25 there are now a few more warmup days - but no code changes here just merging in develop

3 files with err diffs as of 2017-09-21

DOAToUnitVentilator - Node connection errors are gone.

HospitalLowEnergy - One fewer SolveAirLoopControllers warning for DOAS1 and DOAS5.

VariableRefrigerantFlow_FluidTCtrl_HR_5Zone - New unbalanced air flow warnings - should go away when #6301 is fixed.

Work Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • At least one of the following appropriate labels must be added to this PR to be consumed into the changelog:
    • Defect: This pull request repairs a github defect issue. The github issue should be referenced in the PR description
    • Refactoring: This pull request includes code changes that don't change the functionality of the program, just perform refactoring
    • NewFeature: This pull request includes code to add a new feature to EnergyPlus
    • Performance: This pull request includes code changes that are directed at improving the runtime performance of EnergyPlus
    • DoNoPublish: This pull request includes changes that shouldn't be included in the changelog

Review Checklist

This will not be exhaustively relevant to every PR.

  • Code style (parentheses padding, variable names)
  • Functional code review (it has to work!)
  • If defect, results of running current develop vs this branch should exhibit the fix
  • CI status: all green or justified
  • Performance: CI Linux results include performance check -- verify this
  • Unit Test(s)
  • C++ checks:
    • Argument types
    • If any virtual classes, ensure virtual destructor included, other things
  • If new idf included, locally check the err file and other outputs
  • Documentation changes in place
  • Changed docs build successfully
  • If output changes, including tabular output structure, add to output rules file for interfaces

@mjwitte mjwitte added the NewFeature Includes code to add a new feature to EnergyPlus label Aug 24, 2017
@mjwitte mjwitte added this to the EnergyPlus 8.8.0 milestone Aug 24, 2017
@rraustad
Copy link
Copy Markdown
Collaborator

What's the status here. I don't see anything in the diff's that stand out.

@mjwitte
Copy link
Copy Markdown
Contributor Author

mjwitte commented Aug 30, 2017

Still wrestling with this. And have some other parts to implement. The thing is, at this point it should be zero diffs. But finding interesting things that are contributing to diffs - like this which is likely responsible for ReverseDD failures in the two data center files.

…to Beyond1Airloop-Part2

# Conflicts:
#	src/EnergyPlus/SimulationManager.cc
@rraustad
Copy link
Copy Markdown
Collaborator

rraustad commented Aug 30, 2017

I thought ResetNodeData was already called at BeginEnvironment. In your "reset earlier" branch, I see you added another instead of moving the existing call. That seems wrong (should only call once), but of course your the one looking at this.

I also see that the plenum does it's own node reset. That seems redundant unless node data isn't read in first.

@mjwitte
Copy link
Copy Markdown
Contributor Author

mjwitte commented Aug 30, 2017

Probably correct to move ResetNodeData instead of calling it twice. The place it's called currently (in develop) is too late for the IT equipment which uses a supply node temp to calculate it's power consumption. It showed up because the results coming out of SetUpSimulation (which runs everything for a few time steps) was different in this branch (because the airloop nums aren't all intialized yet) but that shouldn't matter, because in theory everything gets reset on begin environment. Follow? Sorry, confusing.

The plenum wants to start at 20C like the zones do. But ResetNodeData sets everything to 0C. For the IT equipment, I could add a begin environment init there instead, but I wanted to see if it might change some other files - which it did not. Still seems easier just to move ResetNodeData. I should open a PR for that branch.

CMakeLists.txt Outdated
endif()

set( REGRESSION_BASELINE_SHA "" CACHE STRING "SHA of baseline comparison" )
set( REGRESSION_BASELINE_SHA "73377e2" CACHE STRING "SHA of baseline comparison" )
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Myoldmopar Did I do this right? I want to compare this branch with branch ResetNodeDataEarlier

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, I'd revert that out. Change it here instead.

@mjwitte
Copy link
Copy Markdown
Contributor Author

mjwitte commented Sep 6, 2017

Diffs explanations (as of 0f8a85a )

5ZoneAirCooledWithCoupledInGradeSlab and UnitarySystem_WaterCoils_wMultiSpeedFan - eio warmup convergence diffs and tiny eso diffs

5Zone_Unitary_HXAssistedCoil - ** Warning ** CoilSystem:Cooling:DX:HeatExchangerAssisted "HEAT EXCHANGER ASSISTED COOLING COIL 1" -- Exceeded max iterations error continues - total error count is 68 now instead of 70, almost all during warmup. No other diffs.

DOAToUnitVentilator - Node connection warnings introduced earlier with this feature are now gone.

HospitalLowEnergy - Warning during warmup is gone In AirLoopHVAC DOAS2 there is unbalanced exhaust air flow. All other results have no diffs. This warning normally is allowed to print only once. Ran with a version of develop that allowed this warning to always print, and there were only six occurences, all during warmup.


\paragraph{Allocation to Multiple Return Nodes}\label{allocation-to-multiple-return-nodes}

If there are multiple return air nodes in the zone, then each return air node is assumed to be paired with on supply air inlet node. The initial flow rate at a given return air node is based on the supply air inlet node for the same airloop and the AirloopHVAC Design Return Air Flow Fraction of Supply Air Flow:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... paired with ONE supply air inlet node.

@rraustad
Copy link
Copy Markdown
Collaborator

rraustad commented Sep 6, 2017

I went throught this again last night. It is admittedly hard to follow the intricate changes necessary for two air loops serving the same zone. Nothing stood out as blatently wrong. The unit test shows that return air flow can be properly managed. Diff's are minimal and explained. Question for HospitalLowEnergy results - if warning is now gone, why were there 6 occurrences during warmup for the special build?

@mjwitte
Copy link
Copy Markdown
Contributor Author

mjwitte commented Sep 6, 2017

Not sure about HospitalLowEnergy - that file runs terribly slow in debug. In fact, the time stamps on those are all 01/01 which isn't even one of the environments for this file. That says the warnings are happening during SetUpSimulation which really shouldn't be producing warnings at all. With the new multi-airloop world, the airloop number mapping to zone equipment isn't known yet during SetUpSimulation so that explains why these aren't present in this branch.

Regarding the changes, there are more to come.

@Myoldmopar
Copy link
Copy Markdown
Member

My final adventure...I'm going to go ahead and kick off an RC package so it can build overnight and I can feel good about the release package situation. And I'll get this reviewed along with #6338.

@Myoldmopar
Copy link
Copy Markdown
Member

So how coupled are #6338 and this? I saw the title change on the other one to include a reference to fixes for multiple air loops. Does that mean these two are basically coupled? If so, what do you think about pulling that branch into here, or vice versa, to make sure you are capturing the combined effects? If they aren't that coupled and I'm just reading it wrong, that's fine too. Things just still feel squishy, so I'm hesitating before investing much more review time.

@mjwitte
Copy link
Copy Markdown
Contributor Author

mjwitte commented Sep 24, 2017

This pull request is focused on the simulation side of multiple airloops - getting rid of the one-return-node/one-airloopnum per zone mindset. And also, revising the whole zone air mass balance to split thing up across multiple return nodes in a zone. #6338 fixes some issues with the new air terminal sizing inputs - cases that I had not tested before now. So, they are closely related, yet somewhat separate. If you'd prefer one combo pull request to review, I can do that too.

@mjwitte
Copy link
Copy Markdown
Contributor Author

mjwitte commented Sep 25, 2017

@Myoldmopar Air terminal sizing limitations added to I/O Ref. Ready for final review here.

@Myoldmopar
Copy link
Copy Markdown
Member

Stray unit test failure is unrelated. Linux failures are the s3 problem.

Doing final code review now.

Copy link
Copy Markdown
Member

@Myoldmopar Myoldmopar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly what I was expecting to find. Tons and tons of bookkeeping. Changing single lines of code where nodes where looked up or assigned into loops. This is a huge amount of code changes, but they look good. It's great to see some tests added on to existing unit tests, and the new unit tests look like they cover core functionality. The doc changes look good, and they build locally for me. I'll check them out visually and do some testing, but I think this is good to go.

CMakeLists.txt Outdated
endif()

set( REGRESSION_BASELINE_SHA "" CACHE STRING "SHA of baseline comparison" )
set( REGRESSION_BASELINE_SHA "73377e2" CACHE STRING "SHA of baseline comparison" )
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, I'd revert that out. Change it here instead.

\item \emph{Maximum} means that the maximum flow derived from \emph{Outdoor Air Flow per Person,} \emph{Outdoor Air Flow per Area, Outdoor Air Flow per Zone,} and \emph{Air Changes per Hour} (using the associated conversions to m\(^{3}\)/s for each field) will be used as the zone outdoor air flow rate.

\item \emph{IndoorAirQualityProcedure} means that the program will use the other procedure defined in ASHRAE Standard 62.1-2007 to calculate the amount of outdoor air necessary in order to maintain the levels of indoor air carbon dioxide at or below the setpoint defined in the ZoneControl:ContaminantController object. Appendix A of the ASHRAE 62.1-2010 user’s manual discusses another method for implementing CO2-based DCV in a single zone system. The last two methods of Proportional Control calculate the required outdoor air flow rate which varies in proportion to the percentage of the CO2 signal range and has two choices to calculate occupancy-based outdoor air rate.
\item \emph{IndoorAirQualityProcedure} means that the program will use the other procedure defined in ASHRAE Standard 62.1-2007 to calculate the amount of outdoor air necessary in order to maintain the levels of indoor air carbon dioxide at or below the setpoint defined in the ZoneControl:ContaminantController object. Appendix A of the ASHRAE 62.1-2010 user’s manual discusses another method for implementing CO2-based DCV in a single zone system. The last two methods of Proportional Control calculate the required outdoor air flow rate which varies in proportion to the percentage of the CO2 signal range and has two choices to calculate occupancy-based outdoor air rate.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's still a funny character in here, but I'm assuming there's not enough need to push more commits solely for this.

image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whacky - you know when I made the doc changes last night, the local commit diff showed this line and another even though I hadn't changed anything, so I thought maybe my editor had automatically done something it shouldn't. So, I undid those before I pushed it up.

\item It does not work with VRP sizing.
\item It does not work with a specified system flow rate in Sizing:System.
\item It does not work if the base minimum outdoor air flow exceeds the heating or cooling air flow.
\end{itemize}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

extern Array1D< Real64 > OAMFL; // OUTDOOR AIR MASS FLOW (M**3/SEC) for infiltration
extern Array1D< Real64 > VAMFL; // OUTDOOR AIR MASS FLOW (M**3/SEC) for ventilation
extern Array1D< Real64 > OAMFL; // OUTDOOR AIR MASS FLOW (kg/s) for infiltration
extern Array1D< Real64 > VAMFL; // OUTDOOR AIR MASS FLOW (kg/s) for ventilation
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}
}}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, at some point, when the entire codebase is setup to handle the possibility of multiple nodes per zone, this function should never need to warn anymore, right? The NodeName will be required and provided once the callers all understand the new paradigm. I hope so, but if I'm wrong then I just want to understand why.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I had wanted the node names to be optional in places like return air heat gain from lights so if you do have only one return node, you don't have to enter a node name. If we make the return node required, then it wouldn't work with a zonelist name anymore. So, not sure.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is interesting. And tricky. I see your point, but it feels funny as optional. Nothing to worry about for today, that's for sure. We'll see how it plays out.

int numRetNodes = thisZoneEquip.NumReturnNodes;
Real64 totReturnFlow = 0.0; // Total flow to all return nodes in the zone (kg/s)
Real64 totVarReturnFlow = 0.0; // Total variable return flow, for return nodes connected to an airloop with an OA system or not with specified flow (kg/s)
Real64 returnSchedFrac = ScheduleManager::GetCurrentScheduleValue( thisZoneEquip.ReturnFlowSchedPtrNum );
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You feel OK calling this without validation of the index variable? I'm sure it's done elsewhere, so it's probably fine...

} else {
FinalTotalReturnMassFlow = totReturnFlow;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whew, quite a function 👍

DataGlobals::KickOffSimulation = true;

WeatherManager::ResetEnvironmentCounter();
TestAirPathIntegrity( ErrorsFound ); // Needed to initialize return node connections to airloops and inlet nodes
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

" 10.0, !- Watts per Zone Floor Area{ W / m2 }",
" , !- Watts per Person{ W / person }",
" 0.1, !- Return Air Fraction",
" 0.0, !- Return Air Fraction",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this to avoid having to change all the values being checked by the unit test?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return air doesn't impact thermal comfort calcs. This change was to avoid tripping on this error because the unit test doesn't have any conditioned zone info.

EXPECT_EQ( FinalTotalReturnMassFlow, 6.0 );
EXPECT_EQ( Node( returnNode1 ).MassFlowRate, 2.0 );
EXPECT_EQ( Node( returnNode2 ).MassFlowRate, 1.0 );
EXPECT_EQ( Node( returnNode3 ).MassFlowRate, 3.0 );
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍 👍

@Myoldmopar
Copy link
Copy Markdown
Member

@mjwitte Apparently I had started a review a while back and tried to comment to you about the REGRESSION_SHA in the CMakeLists file. I guess Github kept that comment in a cache, even though that diff is long gone. Anyway, sorry for any confusion on the CMakeLists.txt (outdated) comment above.

@Myoldmopar
Copy link
Copy Markdown
Member

You don't think this bnd diff is going to cause a problem in HVACDiagram or other tools do you?

image

@Myoldmopar
Copy link
Copy Markdown
Member

Interesting. Checking out the diffs on 5ZoneAirCooled_ZoneAirMassFlowBalance, and the EIO is showing better convergence at the end of the warmup days. Nothing significant, but to be honest, I kinda expected to see the system having a bit more freedom and taking a little longer to converge. Looks like this improved it. Or it was just luck?

(new EIO lines on the bottom in blue)

image

@Myoldmopar
Copy link
Copy Markdown
Member

OK, if no one else has anything to say on this I'm merging it in very soon.

@Myoldmopar
Copy link
Copy Markdown
Member

You don't think this bnd diff is going to cause a problem in HVACDiagram or other tools do you?

Oh I guess #6345 explains it 😆

@mjwitte
Copy link
Copy Markdown
Contributor Author

mjwitte commented Sep 25, 2017

The bnd change doesn't affect HVAC diagram, not sure if that's used by any other tools. I can revert that back and save it for post-release. But that reminds me, HVAC diagram chokes on zones with more than one airloop (e.g. 5ZoneAirCooledWithDOASAirLoop ). Posted #6345 for that.

Regarding 5ZoneAirCooled_ZoneAirMassFlowBalance, the mass balance was broken before. It works now - actually balances.

@Myoldmopar
Copy link
Copy Markdown
Member

OK, thanks for all these comments.

@mjwitte
Copy link
Copy Markdown
Contributor Author

mjwitte commented Sep 25, 2017

Thanks for the review. I can clean up the funny doc chars and the whitespace stuff if you want. Or just take care of them in that other open PR.

@Myoldmopar
Copy link
Copy Markdown
Member

"Documentation Issues October-November 2017" 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Defect Includes code to repair a defect in EnergyPlus NewFeature Includes code to add a new feature to EnergyPlus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants