Skip to content

Apply human readable text to autosizing strings#11492

Open
rraustad wants to merge 7 commits intodevelopfrom
11477-water-coil-sizing-strings
Open

Apply human readable text to autosizing strings#11492
rraustad wants to merge 7 commits intodevelopfrom
11477-water-coil-sizing-strings

Conversation

@rraustad
Copy link
Copy Markdown
Collaborator

@rraustad rraustad commented Mar 31, 2026

Pull request overview

Description of the purpose of this PR

Component sizing strings should be uniform between for idf or json formats, whichever are used.

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
  • If adding/removing any output files (e.g., eplustbl.*)
    • Update ..\scripts\Epl-run.bat
    • Update ..\scripts\RunEPlus.bat
    • Update ..\src\EPLaunch\ MainModule.bas, epl-ui.frm, and epl.vbp (VersionComments)
    • Update ...github\workflows\energyplus.py

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

@rraustad rraustad self-assigned this Mar 31, 2026
@rraustad rraustad added the Defect Includes code to repair a defect in EnergyPlus label Mar 31, 2026
@rraustad
Copy link
Copy Markdown
Collaborator Author

rraustad commented Mar 31, 2026

5ZoneAirCooledDemandLimiting json file format result in this branch. Note snake_case column headings:

image

idf result, note Camel Case column headings:

image

@rraustad
Copy link
Copy Markdown
Collaborator Author

rraustad commented Apr 1, 2026

Background:

When the component sizing routines were consolidated into the sizer functions there were some components that used one string and other components that used a similar string. To reduce diffs the overrideSizingString function was implemented. This was used to 1) unify textual strings as Camel case, 2) used to override the snake_case used in json (same as 1 really), and 3) keep the look of the tables the same regardless of idf or json format using Camel Case text.

The sizing string is passed via a text string or a field name string depending on which source file is setting up that string.

std::string SizingString = "Rated Gross Total Cooling Capacity [W]";

SizingString = state.dataWaterCoils->WaterCoilNumericFields(CoilNum).FieldNames(FieldNum) + " [W]";

For the json file format, the FieldNames string is of course snake_case, without units. Hopefully there is a clean path forward to fix all other issues caused by this specific code.

idf:

Coil:Heating:Water,
  Main Heating Coil 1,     !- Name
  autosize,                !- Rated Capacity {W}

 N3 , \field Rated Capacity
   \units W

json:

"Coil:Heating:Water": {
    "Main Heating Coil 1": {
        "rated_capacity": "Autosize",

        "rated_capacity": {
            "units": "W",

state.dataSize->DataCapacityUsedForSizing = waterCoil.DesWaterHeatingCoilRate;
}
waterCoil.DesTotWaterCoilLoad = waterCoil.DesWaterHeatingCoilRate;
state.dataSize->DataCapacityUsedForSizing = waterCoil.DesWaterHeatingCoilRate;
Copy link
Copy Markdown
Collaborator Author

@rraustad rraustad Apr 1, 2026

Choose a reason for hiding this comment

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

I tried to reduce this further and call the same sizer function for both coil locations, airloop and zone, but this doesn't work for system coils and the autosized result is 0:

WaterHeaterCapacitySizing.cc:

} else if (this->curSysNum > 0) {
    if (!this->wasAutoSized && !this->sizingDesRunThisAirSys) {
        this->autoSizedValue = _originalValue;
    } else {
        // not implemented for air loop equipment
    }

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

If I call the HeatingCapacity sizer, without overriding SizingString, I get a good table but the column heading is nominal_capacity, which is the field name for non-water coil types.

Coil:Heating:Water,
N3 , \field Rated Capacity

Coil:Heating:Electric,
N2 , \field Nominal Capacity

HeatingCapacitySizing.cc:

if (this->overrideSizeString) {
    if (this->isEpJSON) {
        this->sizingString = "nominal_capacity [W]";
    }
}
Image

@joseph-robertson
Copy link
Copy Markdown
Collaborator

@rraustad This PR fixes the issue that @mitchute brought up here, right? But how does it partially address #11477?

@rraustad
Copy link
Copy Markdown
Collaborator Author

rraustad commented Apr 7, 2026

@rraustad This PR fixes the issue that @mitchute brought up here, right? But how does it partially address #11477?

Because it was noted in the issue that there are other tables that show diffs between idf and json. If that is incorrect then this PR could close that issue.

@rraustad rraustad changed the title Correct idf versus json sizing string for water coils Apply human readable text to autosizing strings Apr 14, 2026
@github-actions
Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit acf51db

Regression Summary
  • EIO: 1
  • Table Big Diffs: 1
  • Table String Diffs: 1

@github-actions
Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit 5165f16

Regression Summary
  • EIO: 1
  • Table Big Diffs: 1
  • Table String Diffs: 1

@github-actions
Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit 5165f16

Regression Summary
  • EIO: 1
  • Table Big Diffs: 1
  • Table String Diffs: 1

@github-actions
Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit 9570798

Regression Summary
  • EIO: 1
  • Table Big Diffs: 1
  • Table String Diffs: 1

@github-actions
Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit 9570798

Regression Summary
  • EIO: 1
  • Table Big Diffs: 1
  • Table String Diffs: 1

@rraustad
Copy link
Copy Markdown
Collaborator Author

rraustad commented Apr 14, 2026

File with diffs, RefBldgMediumOfficeNew2004_Chicago_epJSON

Example eio diff:

- Component Sizing Information, Coil:Cooling:DX:TwoSpeed, VAV_1_COOLC DXCOIL, Design Size high_speed_rated_sensible_heat_ratio, 0.73493
- Component Sizing Information, Coil:Cooling:DX:TwoSpeed, VAV_1_COOLC DXCOIL, Design Size low_speed_gross_rated_sensible_heat_ratio, 0.73493

+ Component Sizing Information, Coil:Cooling:DX:TwoSpeed, VAV_1_COOLC DXCOIL, Design Size High Speed Rated Sensible Heat Ratio, 0.73493
+ Component Sizing Information, Coil:Cooling:DX:TwoSpeed, VAV_1_COOLC DXCOIL, Design Size Low Speed Gross Rated Sensible Heat Ratio, 0.73493

Example table diff (now has Camel Case column headings):

develop:

image

this branch:

image

@rraustad
Copy link
Copy Markdown
Collaborator Author

rraustad commented Apr 14, 2026

@mitchute @joseph-robertson these changes address a lot of the eio and table issues with snake_case text. I am changing the description to show that this branch fixes the issue and other issues can be corrected when found.

@github-actions
Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit 73ad1a4

Regression Summary
  • EIO: 1
  • Table Big Diffs: 1
  • Table String Diffs: 1

@github-actions
Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit 73ad1a4

Regression Summary
  • EIO: 1
  • Table Big Diffs: 1
  • Table String Diffs: 1

@github-actions
Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit 444c9d2

Regression Summary
  • EIO: 1
  • Table Big Diffs: 1
  • Table String Diffs: 1

@github-actions
Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit 444c9d2

Regression Summary
  • EIO: 1
  • Table Big Diffs: 1
  • Table String Diffs: 1

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.

idf and epjson generate output with different column headers

4 participants