Skip to content

Conversation

@tanaya-mankad
Copy link
Collaborator

@tanaya-mankad tanaya-mankad commented Nov 27, 2023

Pull request overview

This code implements Coil Performance as an inheritable base class, which allows the conventional curve-based performance or a new ASHRAE205-compliant performance to be generated at runtime from the IDF information.

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

@tanaya-mankad tanaya-mankad added the NewFeature Includes code to add a new feature to EnergyPlus label Nov 28, 2023
@nrel-bot-3
Copy link

@tanaya-mankad @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot-2
Copy link

@tanaya-mankad it has been 9 days since this pull request was last updated.

@nrel-bot-2
Copy link

@tanaya-mankad it has been 7 days since this pull request was last updated.

5 similar comments
@nrel-bot-2
Copy link

@tanaya-mankad it has been 7 days since this pull request was last updated.

@nrel-bot-2
Copy link

@tanaya-mankad it has been 7 days since this pull request was last updated.

@nrel-bot-2
Copy link

@tanaya-mankad it has been 7 days since this pull request was last updated.

@nrel-bot-2
Copy link

@tanaya-mankad it has been 7 days since this pull request was last updated.

@nrel-bot-2c
Copy link

@tanaya-mankad it has been 7 days since this pull request was last updated.

@mjwitte mjwitte added the IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) label Feb 6, 2025
@nrel-bot-2
Copy link

@tanaya-mankad @Myoldmopar it has been 29 days since this pull request was last updated.

@nrel-bot-2c
Copy link

@Myoldmopar @tanaya-mankad @Myoldmopar it has been 28 days since this pull request was last updated.

@Myoldmopar
Copy link
Member

@tanaya-mankad @nealkruis I merged in develop and resolved the conflicts. There were a few, all related to formatting changes with our bump to newer Clang Format and brace rules. It is passing happily locally, so assuming CI is happy, this should be ready to merge later today.

Copy link
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.

OK, this is looking good. I have a few comments that I'd like resolved before merging.

  • There are some stray double that should be Real64 to fit with E+
  • There appears to be a stray .bak backup file in the branch that needs to be cleaned out
  • I'd like to hear your thoughts on the shared pointer necessity

Honestly, this is super close though.

Real64 air_mass_flow_rate) const;

// Rating constants
const double outdoor_coil_entering_dry_bulb_temperature_K{308.15}; // 95F
Copy link
Member

Choose a reason for hiding this comment

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

constexpr Real64?

Copy link
Member

Choose a reason for hiding this comment

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

Is this .bak file an accidental commit? I'm assuming it's some backup file.

int condInletNodeIndex = 0;
int condOutletNodeIndex = 0;
CoilCoolingDXCurveFitPerformance performance;
std::shared_ptr<CoilCoolingDXPerformanceBase> performance; // TODO: unique_ptr and explicit copy ctor
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about this being needed. If you want to try to convince me, I'm open to hearing opinions as to why it's necessary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since the performance is now decided at runtime (through the IDF), we decided to implement it with runtime polymorphism. It seems like the commonest method, so we added a Performance base class and derive 205 and standard curve-fit performance from that. Possibly I made some obvious oversight of how to implement this?

Copy link
Member

Choose a reason for hiding this comment

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

We've just had lots of debates about whether we need the extra layers of managed pointers within EnergyPlus. The argument is usually that we do not dynamically allocate anything throughout the program, we just stand everything up once at init, and then run, and then leave. And in cases like PlantComponent, we have each component stored in a regular container on state, and then we operate on raw non-owning pointers to the common base class of those components to capture polymorphism.

I don't think it's necessarily worth holding this up. Just thought I'd ask.

Copy link
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.

Looks good to me. One final test pass locally (redundant, but still), and then this should be ready to go.

\paragraph{Field: Performance Interpolation Method}

This alpha field specifies how performance data from the Representation File will be interpolated.
Choices are "Linear" and "Cubic."
Copy link
Member

Choose a reason for hiding this comment

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

For the record, in LaTeX, we prefer ``backticks then apostrophes'' and let TeX render them as it sees fit. Don't need to hold this up for it.

@Myoldmopar
Copy link
Member

Yep, all happy here. Merging this. Thanks @tanaya-mankad and @nealkruis

@Myoldmopar Myoldmopar merged commit eade06e into NREL:develop Jun 5, 2025
9 checks passed
@Myoldmopar Myoldmopar deleted the ashrae-205-coils branch June 5, 2025 14:45
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.

9 participants