Skip to content

Add EMS actuator for CondFD sky longwave radiation override#11478

Open
brianlball wants to merge 11 commits intodevelopfrom
longwaverad_act
Open

Add EMS actuator for CondFD sky longwave radiation override#11478
brianlball wants to merge 11 commits intodevelopfrom
longwaverad_act

Conversation

@brianlball
Copy link
Contributor

Summary

https://github.com/NatLabRockies/EnergyPlus/blob/longwaverad_act/design/FY2026/NFP_SkyLW_Actuator.md

  • Adds a new EMS actuator (CondFD Surface / Sky Longwave Radiation Override) that lets users replace the default sky
    longwave radiation term in the CondFD exterior face heat balance with a user-specified net heat flux [W/m2]. This
    enables custom radiative cooling models (e.g., spectrally-selective coatings, sub-ambient sky emitters) without
    modifying E+ source.
  • New output variable CondFD EMS Sky Longwave Radiation Override Heat Flux [W/m2] reports the actuated value (0 when
    not actuated).
  • Works with both FullyImplicitFirstOrder and CrankNicholsonSecondOrder schemes.

Changes

  • HeatBalFiniteDiffManager.cc/.hh: Register actuator per exterior CondFD surface; apply override in ExteriorBCEqns for
    both FI and CN code paths; set up output variable.
  • design/FY2026/NFP_SkyLW_Actuator.md: New Feature Proposal with physics background and references.
  • doc/input-output-reference/: Document the new output variable.
  • doc/readthedocs/sphinx/ems-application-guide/: Document the new actuator and output variable.
  • testfiles/: Integration test IDFs (1ZoneCondFD_Enet_Test.idf, PythonPluginCondFD_Enet.idf).
  • tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc: Unit tests covering actuator override for both FI and CN
    schemes, verifying temperature shifts and flux restoration on de-actuation.

Test Plan

  • testfiles/: Integration test IDFs (1ZoneCondFD_Enet_Test.idf, PythonPluginCondFD_Enet.idf).

  • tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc: Unit tests covering actuator override for both FI and CN

  • Integration test PythonPluginCondFD_Enet passes

  • 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
Add "CondFD Surface / Sky Longwave Radiation Override" EMS actuator that replaces the hsky*(Tsky-Tsurf) term in ExteriorBCEqns with a user-supplied net sky radiation flux (W/m2). Positive = heat into surface. Header: add enetActuator field (MaterialActuatorData) to SurfaceDataFD. Source changes: - InitHeatBalFiniteDiff: register actuator + output variable for each exterior CondFD surface - ExteriorBCEqns: override sky term in all 6 locations when actuated: 1. R-layer (massless wall) 2. Crank-Nicolson 2nd order 3. Fully implicit 1st order 4. Movable insulation TInsulOut 5. QNetSurfFromOutside 6. SurfQdotRadOutRepPerArea When actuated, hsky*Tsky is replaced by Enet in numerators and hsky is removed from denominators (Enet is a fixed flux, not temperature-dependent). When not actuated, existing behavior is completely unchanged.
Test HeatBalFiniteDiffManager_EnetActuatorOverride exercises ExteriorBCEqns directly with a single-layer concrete surface under FullyImplicitFirstOrder. Four sub-cases: - Actuator OFF: baseline sky radiation via hsky*(Tsky-Tsurf) - Actuator ON, Enet=0: no sky LW exchange, surface warmer than baseline - Actuator ON, Enet=-200: strong sky cooling, surface colder than baseline - Actuator ON, Enet=+200: sky heats surface, warmest case Verifies temperature ordering: Enet=-200 < baseline < Enet=0 < Enet=+200
1ZoneCondFD_Enet_Test.idf: 1-zone box with CondFD, Denver design days, comprehensive outside face heat balance outputs + SQLite. Baseline for validating actuator behavior. 1ZoneCondFD_Enet_EMS.idf: same model with EMS program setting Enet = -200 W/m2 on roof. Validated against Phase 2 hardcoded results: baseline roof temp -23.8C vs EMS Enet=-200 roof temp -54.0C. Both registered in testfiles/CMakeLists.txt as DESIGN_DAY_ONLY.
PythonPluginCondFD_Enet.py: EnergyPlus plugin class for use inside IDF workflows. Edit SURFACE_NAME and ENET_VALUE, add PythonPlugin:Instance to IDF. scripts/CondFD_Enet_Override.ipynb: Jupyter notebook for interactive use with any IDF/EPW. Features: - Auto-detects exterior CondFD surfaces by parsing IDF - Runs baseline + multiple Enet values in one session - Plots temperature and LW radiation comparison per surface - CSV export and time-varying Enet from CSV (for COMSOL coupling) NFP_SkyLW_Actuator.md: New Feature Proposal documenting the actuator design, physics, sign convention, testing, and scope.
Add QRad sign checks, SurfOpaqOutFaceCondFlux monotonic ordering, and actuator toggle-back test to cover output variable correctness and state restoration.
…-experts - Moved NFP_SkyLW_Actuator.md to design/FY2026/ - Added Background section: Stefan-Boltzmann law, linearization explanation, formal Enet definition, key terminology table - Expanded Physics section with full implicit solver equation - Added sign convention references with 5 verified sources
- I/O ref: document Sky Longwave Radiation Override output - EMS guide: document CondFD Surface actuator and output variable - Register PythonPluginCondFD_Enet integration test - Add CrankNicolson scheme unit test for Enet actuator override
@brianlball brianlball added NewFeature Includes code to add a new feature to EnergyPlus DoNotMerge Code that requires additional attention and investigation labels Mar 18, 2026
@github-actions
Copy link

⚠️ Regressions detected on ubuntu-24.04 for commit 8bbc915

Regression Summary
  • Audit: 2
  • EDD: 2
  • RDD: 2
@github-actions
Copy link

⚠️ Regressions detected on ubuntu-24.04 for commit 490e92e

Regression Summary
  • Audit: 2
  • EDD: 2
  • RDD: 2
@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit 8bbc915

Regression Summary
  • Audit: 2
  • EDD: 2
  • RDD: 2
@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit 490e92e

Regression Summary
  • Audit: 2
  • EDD: 2
  • RDD: 2
@github-actions
Copy link

⚠️ Regressions detected on ubuntu-24.04 for commit 9b4642f

Regression Summary
  • Audit: 2
  • EDD: 2
  • RDD: 2
@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit 9b4642f

Regression Summary
  • Audit: 2
  • EDD: 2
  • RDD: 2
@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit 75fc8c9

Regression Summary
  • Audit: 2
  • EDD: 2
  • RDD: 2
@github-actions
Copy link

⚠️ Regressions detected on ubuntu-24.04 for commit 75fc8c9

Regression Summary
  • ESO Small Diffs: 703
  • Table Small Diffs: 391
  • MTR Small Diffs: 523
  • Table String Diffs: 186
  • EIO: 396
  • JSON Small Diffs: 2
  • ZSZ Small Diffs: 72
  • Table Big Diffs: 36
  • ERR: 14
  • MTR Big Diffs: 2
  • EDD: 6
  • ESO Big Diffs: 10
  • SSZ Small Diffs: 13
  • Audit: 2
  • RDD: 2
  • JSON Big Diffs: 2
@github-actions
Copy link

⚠️ Regressions detected on ubuntu-24.04 for commit 75fc8c9

Regression Summary
  • Audit: 2
  • EDD: 2
  • RDD: 2
Copy link
Collaborator

@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.

Looks good to me.

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

Labels

DoNotMerge Code that requires additional attention and investigation NewFeature Includes code to add a new feature to EnergyPlus

4 participants