Skip to content

Conversation

lymereJ
Copy link
Collaborator

@lymereJ lymereJ commented Aug 5, 2025

Pull request overview

Addresses #10866: the EMS code developed by TRANE was similar to the calcSZVAVModel routine already implemented in EnergyPlus and available through the SingleZoneVAV control type for AirLoopHVAC:UnitarySystem objects. TRANE requested that we add support for variable speed coil objects.

Description of the purpose of this PR

The SingleZoneVAV control type for AirLoopHVAC:UnitarySystem currently only supports Coil:Cooling/Heating:Water or Coil:Cooling/Heating:DX:SingleSpeed coil objects. This new feature add support for Coil:Cooling/Heating:DX:VariableSpeed.

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

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

@lymereJ lymereJ added this to the EnergyPlus 25.2 IO Freeze milestone Aug 5, 2025
@lymereJ lymereJ added NewFeature Includes code to add a new feature to EnergyPlus NotIDDChange Code does not impact IDD (can be merged after IO freeze) labels Aug 5, 2025
Copy link
Collaborator Author

@lymereJ lymereJ left a comment

Choose a reason for hiding this comment

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

Code walkthrough:

Comment on lines 10791 to 10793
} else if (this->m_SimASHRAEModel && this->m_SimASHRAEModelOn) {
state.dataUnitarySystems->CompOnMassFlow = this->m_HeatMassFlowRate[this->m_NumOfSpeedHeating];
state.dataUnitarySystems->CompOnFlowRatio = this->m_MSHeatingSpeedRatio[this->m_NumOfSpeedHeating];
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Set the "compressor on" flow rate (and associated variable) to be the highest cooling/heating speed. This is only done when doing the SZVAV calculation. Changes below are similar.


state->dataGlobal->BeginEnvrnFlag = true;

// Test for zone 1 - Heating
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Add new unit test and check all operating "zones" of the SZVAV control strategy for both heating and cooling operation.

add_simulation_test(IDF_FILE _5ZoneAirCooled_annual.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw ANNUAL_SIMULATION)
add_simulation_test(IDF_FILE _5ZoneAirCooled_LeapYear_annual.idf EPW_FILE MadeUpLeapYear.epw ANNUAL_SIMULATION)
add_simulation_test(IDF_FILE UnitarySystem_MultiSpeedDX_EconoStaging.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw ANNUAL_SIMULATION)
add_simulation_test(IDF_FILE UnitarySystem_VariableSpeedDX_SZVAV.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw ANNUAL_SIMULATION)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Add new example file; Results shown in the PR are generated from this file.

bool m_ValidASHRAEHeatCoil = false;
bool m_SimASHRAEModel = false; // flag denoting that ASHRAE model (SZVAV) should be used
bool m_SimASHRAEModel = false; // flag denoting that ASHRAE model (SZVAV) should be used
bool m_SimASHRAEModelOn = false; // flag denoting that the SZVAV calculation is active
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

New flag to denote that the SZVAV calculation are being performed. This allows the initial calls to calcUnitarySystemToLoad in controlUnitarySystemOutput to not be based on the SZVAV flow rates, for example when determining which speed to pick to meet the load.

Comment on lines 9796 to 9799
if (this->m_SimASHRAEModel) {
this->m_HeatingCycRatio = PartLoadRatio;
this->m_HeatingSpeedRatio = 1.0;
} else if (this->m_SingleMode == 0) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Single mode-like operation for SZVAV calcs.

Comment on lines 11999 to 12001
if (this->m_SimASHRAEModel) {
CoilPLR = PartLoadRatio;
} else if (this->m_CoolingSpeedNum > 1) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Passing the actual PLR when running the SZVAV control strategy.

@lymereJ
Copy link
Collaborator Author

lymereJ commented Aug 22, 2025

Results from the example file:

Cooling Operation

  • System flow rate (m3/s) as a function of predicated load (W)

    • Single-speed DX Coil:
      image

    • Variable-speed (3-speed, represented by colors) DX Coil:
      image

  • System supply air temperature (deg. C) as a function of predicated load (W), min SAT is set to 10 deg. C in the model

    • Single-speed DX Coil:
      image

    • Variable-speed (3-speed, represented by colors) DX Coil:
      image

Heating Operation

  • System flow rate (m3/s) as a function of predicated load (W)

    • Single-speed DX Coil:
      image

    • Variable-speed (3-speed, represented by colors) DX Coil:
      image

  • System supply air temperature (deg. C) as a function of predicated load (W), max SAT is set to 35 deg. C in the model

    • Single-speed DX Coil:
      image

    • Variable-speed (3-speed, represented by colors) DX Coil:
      image

@lymereJ lymereJ marked this pull request as ready for review August 22, 2025 19:18
@nrel-bot-2
Copy link

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

Comment on lines 971 to 977
" Coil:Cooling:DX:VariableSpeed,",
" Sys 2 Furnace DX Cool Cooling Coil, !- Name",
" Sys 2 Furnace DX Cool Mixed Air Outlet, !- Indoor Air Inlet Node Name",
" Sys 2 Furnace DX Cool Cooling Coil Outlet, !- Indoor Air Outlet Node Name",
" 3, !- Number of Speeds {dimensionless}",
" 3, !- Nominal Speed Level {dimensionless}",
" 3513.72009, !- Gross Rated Total Cooling Capacity At Selected Nominal Speed Level {W}",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not the most critical issue, but can you cleanup the comment alignment a bit here to help with readability?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mitchute, done!

@mitchute
Copy link
Collaborator

mitchute commented Oct 1, 2025

We'll try this one more time. It builds fine locally on my Arm64 Mac.

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

Labels

NewFeature Includes code to add a new feature to EnergyPlus NotIDDChange Code does not impact IDD (can be merged after IO freeze)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants