Skip to content

Conversation

@lgu1234
Copy link
Contributor

@lgu1234 lgu1234 commented Jan 3, 2025

Pull request overview

  • DESCRIBE PURPOSE OF THIS PULL REQUEST

The task will improve duct modeling support to enable conduction heat losses for a single air loop, and also duct leakage for a single air loop. The duct modeling roadmap was developed previously and should be used as guidance for the scope of these features.

NOTE: ENHANCEMENTS MUST FOLLOW A SUBMISSION PROCESS INCLUDING A FEATURE PROPOSAL AND DESIGN DOCUMENT PRIOR TO SUBMITTING CODE

Pull Request Author

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)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@lgu1234 lgu1234 added NewFeature Includes code to add a new feature to EnergyPlus IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) labels Jan 3, 2025
@mjwitte mjwitte added this to the EnergyPlus 25.2 IO Freeze milestone Feb 6, 2025
@nrel-bot-2
Copy link

@lgu1234 @Myoldmopar it has been 29 days since this pull request was last updated.

@mjwitte mjwitte removed their assignment May 7, 2025
@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit 4aa23dd

Regression Summary
  • Audit: 764
  • RDD: 750

@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit 250d44c

Regression Summary
  • Audit: 764
  • RDD: 750

@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit f846a75

Regression Summary
  • Audit: 764
  • RDD: 750

@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit f4c1841

Regression Summary
  • Audit: 764
  • RDD: 750

@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit 770732c

Regression Summary
  • Audit: 764
  • RDD: 750

@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit b6691d2

Regression Summary
  • Audit: 764
  • RDD: 750

@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit 50abf76

Regression Summary
  • Audit: 764
  • RDD: 750

Comment on lines 739 to 744
for (int SupAirPath = 1; SupAirPath <= state.dataZoneEquip->NumSupplyAirPaths; ++SupAirPath) {
for (int CompNum = 1; CompNum <= state.dataZoneEquip->SupplyAirPath(SupAirPath).NumOfComponents; ++CompNum) {
state.dataDuctLoss->SplitterNum = state.dataZoneEquip->SupplyAirPath(SupAirPath).SplitterIndex(CompNum);
break;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not understand these loops. Shouldn't there be some sort of if test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The loop logic is to find SplitterNum from the loop. It is not necessary for the present new feature, due to a single AirLoop. SplitterNum should be equal 1. I can remove the loop and set the value = 1. Any suggestions?

Copy link
Contributor

@mjwitte mjwitte Jun 19, 2025

Choose a reason for hiding this comment

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

The loop logic is to find SplitterNum from the loop. It is not necessary for the present new feature, due to a single AirLoop. SplitterNum should be equal 1. I can remove the loop and set the value = 1. Any suggestions?

There are some bigger questions:

  1. I did not find an error check for a single airloop?
  2. It is possible to define an airloop without any mixer or splitter if it is a single zone loop.
  3. It is possible to have supply paths with multiple mixers/splitters/plenums.
  4. It is possible for an airloop to have more than 1 supply paht (e.g. dual-duct system).
  5. I did not find any checks for these possibilities.
  6. state.dataAirLoop->AirToZoneNodeInfo(AirSysNum).SupplyAirPath(ductNum) and SupplyAirPathNum(ductNum). So that much is already known.
  7. state.dataZoneEquip->SupplyAirPath and state.dataZoneEquip->ReturnAirPath already know their inlet and outlet nodes, so I think you can use those directly without accessing the splitter/mixer data.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjwitte Here are my answers based on your question order:

  1. A single airloop is checked in AirflowNetwork. I can add an error check for a single airloop.
  2. The present model assumes a single splitter and mixer for a single airloop, Any other choices will be expanded later.
  3. No for the present model. The airflownetwork model does not allow multiple mixers and splitters for a single airloop. More choices will be expanded later.
  4. Not yet for the present model.
  5. I am going to add more error checks to allow a single splitter and mixer for a single airloop.

Copy link
Contributor

@mjwitte mjwitte Jun 20, 2025

Choose a reason for hiding this comment

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

In that case, then I would remove these loops and just initialize the mixer and splitter nums to 1.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjwitte You are right.
I remove state.dataZoneEquip->SupplyAirPath and state.dataZoneEquip->ReturnAirPath and set both variables of SplitterNum and MixerNumto 1,
Thanks.

state.dataHeatBal->Zone(ZoneNum).Name);
}

if (state.dataDuctLoss->NumOfDuctLosses > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Noticed RDD diffs on many test files:

+Output:Variable,*,Zone Added Latent Rate Due to Duct Loss,hourly; !- HVAC Average [W]
+Output:Variable,*,Zone Added Sensible Rate Due to Duct Loss,hourly; !- HVAC Average [W]

These shouldn't be created if these are no duct loss objects.
Move this if up higher? Before the SetupOutputVariable calls and maybe more. Move up to line 348?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right. The issue is fixed. Thanks.

@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit 497c1f6

Regression Summary
  • Audit: 764
  • RDD: 750

@mjwitte
Copy link
Contributor

mjwitte commented Jun 19, 2025

Also, there are two warnings about duplicate labels in the I/O Ref.

image

image

@lgu1234
Copy link
Contributor Author

lgu1234 commented Jun 20, 2025

@mjwitte A warning of duplicate labels is addressed

Copy link
Contributor

@mjwitte mjwitte left a comment

Choose a reason for hiding this comment

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

@lgu1234 Your changes to address earlier comments look good. Thanks. Sorry for the delay in reviewing them. There are some documentation and idd cleanup comments below.

\item
Supply Trunk duct: The connection of SupplyTrunk is between the inlet node (AirloopHVAC Demand Side Inlet Node) of AirLoopHVAC and the AirLoopHVAC:ZoneSplitter. A single supply trunk is specified. In other words, there is a single supply trunk for each AirLoopHVAC.
\item
Supply Branch duct: The connection of SupplyBranch is between the AirLoopHVAC:ZoneSplitter and the inlet node of a zone terminal. Each outlet of the AirLoopHVAC:ZoneSplitter has a single branch duct. The number of Supply Brnach ducts are the same as the number of outlets of the AirLoopHVAC:ZoneSplitter for each AirLoopHVAC.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: Brnach
Also in line 3402.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks.


\begin{itemize}
\item
Supply Trunk leak: The supply trunk duct leak occurs at the end of supply trunk duct. The leak is originated at the AirLoopHVAC:ZoneSplitter and terminated at a zone or outdoor.
Copy link
Contributor

Choose a reason for hiding this comment

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

outdoor --> outdoors
Here and in the next three leak descriptions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


Other input rules

The inputs for Duct:Loss:Leakage require inputs of a corresponding Duct:Loss:Conduction. For instance, a Supply Trunk leak must have an associated Supply Trunk duct. However, a Supply Trunk duct is allowed to exist without a corresponding Supply Trunk leak.
Copy link
Contributor

Choose a reason for hiding this comment

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

image Even though there is only one item in the list, it would look better to use the itemize format here. Also this sentence is unclear, I think it should say "must have an associated Supply Trunk conduction loss."?

After reading through the duct loss section and then looking at AirflowNetwork:Distribution:Linkage it is not clear that AirflowNetwork:Distribution:Component:Duct objects are the last piece of this puzzle. I would add bullets here for

  • Every Duct:Loss:* object requires a corresponding AirflowNetwork:Distribution:Linkage object.
  • The AirflowNetwork:Distribution:Linkage objects must reference an AirflowNetwork:Distribution:Component:Duct object which specifies the duct properties.
  • The Duct:Loss:Conduction and Duct:Loss:Leakage objects for a given duct should reference the same AirflowNetwork:Distribution:Component:Duct object.

Perhaps a simple example of a complete set of these objects would be useful here as an idf snippet.
AirflowNetwork:Distribution:Component:Duct
Duct:Loss:Conduction
AirflowNetwork:Distribution:Linkage
Duct:Loss:Leakage
AirflowNetwork:Distribution:Linkage

Oh, wait, and then there's AirflowNetwork:Distribution:Node objects, and AirflowNetwork:Distribution:Component:LeakageRatio objects.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great suggestion.

Add all required objects in idf snippets to simulate Duct:Loss:x using the simple duct model.

Done


\subsection{Duct:Loss:Conduction}\label{ductlossconduction}

This object allows users to input ducts with conduction loss only for simplified duct model. The object is used without using Airflow Network model exclusively.
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure what this means: "The object is used without using Airflow Network model exclusively."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. The statement is not clear and removed.


\paragraph{Duct Loss Sensible Loss Rate {[}W{]}}\label{duct-loss-sensible-rate-w}

This is the duct loass sensible ratee output in W for the simple duct model for each duct loss object.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typos: loass sensible ratee output
Also in the next paragraph.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


Note:

The return conduction and leak losses are not part fo system loads. The impact is the temperature and moisture change at the AirLoopHVAC inlet node. The HVAC system in an AirLoopHVAC uses changed inlet conditions to cover the return conduction and leakage impact.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: part fo system

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

\note the OutdoorAir:Mixer
\note Other -- none of the above, the Node name already defined in the previous field is part
\note of an air loop.
\note Zone -- Enter a zone name for duct simple model to calculate duct loss wihtout using AFN model.
Copy link
Contributor

Choose a reason for hiding this comment

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

wihtout

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Duct:Loss:Conduction,
A1 , \field Name
\required-field
A2 , \field AirLoopHAVC Name
Copy link
Contributor

Choose a reason for hiding this comment

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

AirLoopHAVC

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Duct:Loss:Leakage,
A1 , \field Name
\required-field
A2 , \field AirLoopHAVC Name
Copy link
Contributor

Choose a reason for hiding this comment

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

AirLoopHAVC

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Duct:Loss:MakeupAir,
A1 , \field Name
\required-field
A2 , \field AirLoopHAVC Name
Copy link
Contributor

Choose a reason for hiding this comment

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

AirLoopHAVC

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@lgu1234
Copy link
Contributor Author

lgu1234 commented Jul 18, 2025

@mjwitte Your comments have been addressed. All changes were uploaded. Please review the changes.

Copy link
Contributor

@mjwitte mjwitte left a comment

Choose a reason for hiding this comment

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

@lgu1234 Thanks for the updates.
@Myoldmopar This is ready for your full review.

@mjwitte mjwitte assigned Myoldmopar and unassigned mjwitte Jul 24, 2025
@nrel-bot-2
Copy link

@Myoldmopar @lgu1234 @Myoldmopar it has been 29 days since this pull request was last updated.

@nrel-bot-2
Copy link

@Myoldmopar @lgu1234 @Myoldmopar it has been 33 days since this pull request was last updated.

@mitchute mitchute requested review from mitchute and removed request for Myoldmopar September 24, 2025 18:16
@mitchute
Copy link
Collaborator

@mjwitte I just resolved a couple issues and merge in develop here. Are you intending to do any more review here?

@mjwitte
Copy link
Contributor

mjwitte commented Sep 25, 2025

@mjwitte I just resolved a couple issues and merge in develop here. Are you intending to do any more review here?

No.

@mitchute
Copy link
Collaborator

Seems like everyone is pretty much done here. Merging.

@mitchute mitchute merged commit f39ddc9 into develop Sep 25, 2025
11 checks passed
@mitchute mitchute deleted the Improved-Duct-Model branch September 25, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) NewFeature Includes code to add a new feature to EnergyPlus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants