V26.2.0-IOFreeze: new Absorptance Inside Face fields - #5648
Conversation
🧪 Test Results DashboardSummary
❌ Significant Test Failures📊 Test Run Information
|
There was a problem hiding this comment.
🟡 Changes recommended
The blank Material:NoMass reverse-translation test uses incorrect field indices, invalidating its fallback assertions.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds inside-face absorptance support for standard and massless opaque materials, including blank-value inheritance and EnergyPlus translation.
Changes:
- Extends the model schema and APIs with three inside-face absorptance fields.
- Adds forward and reverse translation support.
- Adds model and translator tests.
File summaries
| File | Description |
|---|---|
resources/model/OpenStudio.idd |
Defines the optional fields. |
src/model/StandardOpaqueMaterial.hpp |
Exposes the standard-material API. |
src/model/StandardOpaqueMaterial_Impl.hpp |
Declares implementation methods. |
src/model/StandardOpaqueMaterial.cpp |
Implements fallback and mutation behavior. |
src/model/MasslessOpaqueMaterial.hpp |
Exposes the massless-material API. |
src/model/MasslessOpaqueMaterial_Impl.hpp |
Declares implementation methods. |
src/model/MasslessOpaqueMaterial.cpp |
Implements fallback and mutation behavior. |
src/model/test/StandardOpaqueMaterial_GTest.cpp |
Tests standard-material behavior. |
src/model/test/MasslessOpaqueMaterial_GTest.cpp |
Tests massless-material behavior. |
src/energyplus/ForwardTranslator/ForwardTranslateStandardOpaqueMaterial.cpp |
Writes explicit standard-material values. |
src/energyplus/ForwardTranslator/ForwardTranslateMasslessOpaqueMaterial.cpp |
Writes explicit massless-material values. |
src/energyplus/ReverseTranslator/ReverseTranslateMaterial.cpp |
Imports standard-material values. |
src/energyplus/ReverseTranslator/ReverseTranslateMaterialNoMass.cpp |
Imports massless-material values. |
src/energyplus/Test/ForwardTranslator_GTest.cpp |
Tests omission and emission behavior. |
src/energyplus/Test/ReverseTranslator_GTest.cpp |
Tests imports and blank-field fallback. |
Review details
- Files reviewed: 15/15 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
NatLabRockies/EnergyPlus#11750 adds new output variables:
But I'm not sure whether these should be added to any |
Please do. I blamed, the Surface_Impl::outputVariableNames hasn't been touched since the first git commit 13 years ago. Just add all output variables for Surface in there Edit: done in b0a5595 Add full outputVariableNames for Surface/SubSurface |
| N8, \field Thermal Absorptance Inside Face | ||
| \note When blank, this value is equal to the Thermal Absorptance field above. | ||
| \note When entered, the Thermal Absorptance field applies to the outside face and this field applies to the inside face. | ||
| \type real | ||
| \minimum> 0 | ||
| \maximum 0.99999 | ||
| N9, \field Solar Absorptance Inside Face | ||
| \note When blank, this value is equal to the Solar Absorptance field above. | ||
| \note When entered, the Solar Absorptance field applies to the outside face and this field applies to the inside face. | ||
| \type real | ||
| \minimum 0 | ||
| \maximum 1 | ||
| N10; \field Visible Absorptance Inside Face | ||
| \note When blank, this value is equal to the Visible Absorptance field above. | ||
| \note When entered, the Visible Absorptance field applies to the outside face and this field applies to the inside face. | ||
| \type real | ||
| \minimum 0 | ||
| \maximum 1 |
There was a problem hiding this comment.
Ok, truly optional. and No VT needed
| double thermalAbsorptanceInsideFace() const; | ||
|
|
||
| bool isThermalAbsorptanceInsideFaceDefaulted() const; |
There was a problem hiding this comment.
Ok, so I'm guessing you went with if blank, grab the (regular) thermalAbsorptance field?
| double StandardOpaqueMaterial_Impl::thermalAbsorptanceInsideFace() const { | ||
| if (boost::optional<double> value = getDouble(OS_MaterialFields::ThermalAbsorptanceInsideFace)) { | ||
| return value.get(); | ||
| } | ||
| return thermalAbsorptance(); | ||
| } | ||
|
|
||
| bool StandardOpaqueMaterial_Impl::isThermalAbsorptanceInsideFaceDefaulted() const { | ||
| return isEmpty(OS_MaterialFields::ThermalAbsorptanceInsideFace); | ||
| } |
There was a problem hiding this comment.
Right, yeah. I guess that's indeed a valid choice of implementation.
The other one being just provide an boost::optional<double> getter, setter and resetter.
| // Inside-face absorptance fields have no IDD default and inherit the exterior value when blank. | ||
| if (!modelObject.isThermalAbsorptanceInsideFaceDefaulted()) { | ||
| idfObject.setDouble(openstudio::MaterialFields::ThermalAbsorptanceInsideFace, modelObject.thermalAbsorptanceInsideFace()); | ||
| } |
There was a problem hiding this comment.
Right, only write it if it's explicitly set, makes sense
| const std::vector<std::string>& Surface_Impl::outputVariableNames() const { | ||
| static const std::vector<std::string> result{"Surface Inside Face Temperature", "Surface Outside Face Temperature"}; | ||
| static const std::vector<std::string> result{ | ||
| // Face temperatures and convection | ||
| "Surface Inside Face Temperature", | ||
| "Surface Inside Face Interior Movable Insulation Temperature", | ||
| "Surface Outside Face Temperature", | ||
| "Surface Inside Face Adjacent Air Temperature", | ||
| "Surface Inside Face Convection Heat Transfer Coefficient", | ||
| "Surface Inside Face Convection Heat Gain Rate", | ||
| "Surface Inside Face Convection Heat Gain Rate per Area", |
There was a problem hiding this comment.
I added 98 output Variables for Surface, 169 for SubSurfaces. From the E+ source code itself.
Note: Noticed the I/O ref is out of date, filled NatLabRockies/EnergyPlus#11783 (comment)
There was a problem hiding this comment.
I don't see the following included in your add:
- Surface Thermal Absorptance Outside Face
- Surface Solar Absorptance Outside Face
- Surface Thermal Absorptance Inside Face
- Surface Solar Absorptance Inside Face
Is that intentional?
There was a problem hiding this comment.
Is that from the c++ source code or the I/O reference?
(The I/O reference is quite outdated as I said)
There was a problem hiding this comment.
It's new stuff in the E+ v26.2 IOFreeze.
|
Just going to let CI take a run on it to make sure my Surface/SubSurface edits are ok. @joseph-robertson if you come around to this PR before me and Full Build is happy, go ahead and merge! |
Pull request overview
Pull Request Author
src/model/test)src/energyplus/Test)src/osversion/VersionTranslator.cpp)Labels:
IDDChangeAPIChangePull Request - Ready for CIso that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.