Skip to content

Conversation

RKStrand
Copy link
Contributor

Pull request overview

Description of the purpose of this PR

Four radiant/convective systems (variable flow low temperature radiant system, constant flow low temperature radiant system, hot water radiant/convective baseboard, and steam radiant/convective baseboard) use two input objects, a base object and a "Design" object, to define the system. The base object refers to the design object by name, but when the name referenced in the base object is incorrect or blank, this was leading to a hard crash of EnergyPlus. This has now been fixed for all four systems. All four utilize the same utility routine to determine whether or not the name referenced is valid. When it is not, EnergyPlus will produce appropriate error messages highlighting the problem and severe/fatal out. This input is now set as required in the IDD. In addition to a unit test to show that the new utility routine is working properly, modifications were made to the Input Output Reference to standardize both the hyperlinks and the organization in these four affected systems. No differences in the iteration tests are expected as this only affects files where there is a problem of this nature.

Pull Request Author

  • 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

  • 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

RKStrand added 2 commits July 14, 2025 16:40
For inputs where there was a :Design object that contained additional data, entering nothing or a bad name for the field of the base object pointing to the :Design object led to a crash of EnergyPlus.  This was a problem for four models: Low Temp Radiant Constant Flow, Low Temp Radiant Variable Flow, Water Rad/Conv Baseboard, and Steam Rad/Conv Baseboard.  This commit fixes the issue for all four, has corrections to the IDD,  and includes some improvements/standardization to the IO Reference.
The fix for a missing design object was modified to work with existing error handling and a unit test was added.
@RKStrand RKStrand added this to the EnergyPlus 25.2 IO Freeze milestone Jul 15, 2025
@RKStrand RKStrand self-assigned this Jul 15, 2025
@RKStrand RKStrand added the Defect Includes code to repair a defect in EnergyPlus label Jul 15, 2025
For some reason, my local clang format did not catch this.  Nor did a previous commit?  Strange.  Hopefully this makes ci happy...
\required-field
\type alpha
\reference BaseboardDesignObject
\reference RadiantDesignObject
Copy link
Contributor

Choose a reason for hiding this comment

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

This means that if there are water and steam baseboards, the when entering the design object in either of the baseboard types, a list of both water and steam design objects would be provided and it would be hard to know which to select. That's not really a bad thing because I noticed that the 2 BB design objects were identical when all that is really needed is one ZoneHVAC:Baseboard:RadiantConvective:Design object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting. I didn't do the original work that split this input objects into a base and design component. I'm not sure what the rationale was if they are identical. All I know is that in the code the lists are kept separately. Not sure why in a single building there would be both hot water baseboards and steam baseboards, but in any case, I think this is probably fine as is.

Copy link
Contributor

@rraustad rraustad left a comment

Choose a reason for hiding this comment

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

I don't see any real issues with this change and could merge as-is.

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.

Doing final testing locally now, but this looks good to go.

ErrorsFound);
if (ErrorsFound) {
break;
}
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 really glad you made a reusable function and applied it in multiple places. Good stuff.

ShowContinueError(state, " The Design Object Name was not found or was left blank. This is not allowed.");
ShowContinueError(state, format(" A valid Design Object Name must be provided for any {} object.", itemType));
}
}
Copy link
Member

Choose a reason for hiding this comment

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

This is a pretty general purpose function, so UtilityRoutines makes good enough sense. And good job not resetting errorFound to false inside here 👍

expectedName = "Second Name";
expectedPtr = 2;
objectType = {"ZoneHVAC:LowTemperatureRadiant:VariableFlow"};
objectName = {"MyVarFlowRadSys"};
Copy link
Member

Choose a reason for hiding this comment

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

Not sure why these are inside braces... but it's fine I guess.

" ** ~~~ ** A valid Design Object Name must be provided for any ZoneHVAC:Baseboard:RadiantConvective:Steam object.",
});
EXPECT_TRUE(compare_err_stream(error_stringTest3, true));
EXPECT_TRUE(gotErrors);
Copy link
Member

Choose a reason for hiding this comment

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

Yeah this is good stuff.

@Myoldmopar
Copy link
Member

All happy, merging.

@Myoldmopar Myoldmopar merged commit 97e3209 into develop Jul 16, 2025
9 checks passed
@Myoldmopar Myoldmopar deleted the 11111DesignObjectMissingIssues branch July 16, 2025 14:35
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autosized ZoneHVAC:LowTemperatureRadiant:VariableFlow with no Design Object throws allocation error

4 participants