Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction of Window Face Temperature Reporting for Non-Complex Windows #7474

Merged
merged 5 commits into from
Aug 27, 2019

Conversation

RKStrand
Copy link
Contributor

Pull request overview

A user noted that the window face temperatures were reporting as zero. Further investigation showed that these variables were only being produced for complex (BSDF) windows. This pull request includes a fix that allows the outer most surface outward facing temperature and the inner most surface inward facing temperature to be produced. For other layers of non-BSDF windows, the output will not be produced at all. In addition, the variable Surface Window Total Absorbed Shortwave Radiation Rate Layer will only be produced for BSDF windows, not for other types. This addresses GitHub Issue #4420.

Work Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

Review Checklist

This will not be exhaustively relevant to every PR.

  • Functional code review (it has to work!)
  • If defect, results of running current develop vs this branch should exhibit the fix
  • CI status: all green or justified
  • Performance: CI Linux results include performance check
  • Unit Test(s)
  • C++ checks:
    • Argument types
    • If any virtual classes, ensure virtual destructor included, other things
  • IDD changes:
    • Verify naming conventions and styles, memos and notes and defaults
    • Open windows IDF Editor with modified IDD to check for errors
    • If transition, add to input rules file for interfaces
    • If transition, add transition source
    • If transition, update idfs
  • If new idf included, locally check the err file and other outputs
  • Required documentation updates?
  • ExpandObjects changes?
  • If output changes, including tabular output structure, add to output rules file for interfaces

The problem noted by a user is that when requesting Surface Window
Front (or Back) Face Temperature Layer X from EnergyPlus that for a
non-BSDF window type that these variables are not defined by anything
and thus show up as zero in the output.  This fixes this by assigning
the correct value at least at the outer and inner most faces and will
not output anything for in-between layers that are not calculated.
A unit test to exercise the new code and documentation edits to the
Input Output Reference are included in this commit.
@RKStrand RKStrand added Defect Includes code to repair a defect in EnergyPlus EnergyPlus labels Aug 26, 2019
@RKStrand RKStrand requested review from Myoldmopar and mjwitte August 26, 2019 21:49
@RKStrand RKStrand self-assigned this Aug 26, 2019
@mjwitte mjwitte added this to the EnergyPlus 9.2.0 milestone Aug 26, 2019
@rraustad
Copy link
Contributor

This all looks good. My only question would be why the inner/outer surface temps could not also be reported for non-BSDF windows? To be clear, this change addresses the issue, but for the future shouldn't all window surface temps be available?
The 2 example files that show err diff's are for the "unused" report variable that is no longer available for non-BSDF windows.

@mjwitte mjwitte added the OutputChange Code changes output in such a way that it cannot be merged after IO freeze label Aug 27, 2019
@mjwitte
Copy link
Contributor

mjwitte commented Aug 27, 2019

Added OutputChange label - at first glance this may have to wait until after release due to changes in output variables? Not sure though.

@RKStrand
Copy link
Contributor Author

@rraustad But this change specifically did allow the reporting of non-BSDF windows--at the outer most outward facing layer and the inner most inward facing layer. The unit test documents the setting of those variables and the documentation also shows that. So, you get all layers in both directions for BSDF windows because it is calculating things layer by layer. For non-BSDF windows, you just get what gets calculated at the inside and outside surface heat balance. Those variables were already available like they would be for any other surface so this can be verified pretty easily. So, I think this work addresses your concern already...or is something missing???

@rraustad
Copy link
Contributor

Maybe I was just confused by the description. Reading again I guess it says outer/inner layers of non-BSDF windows will be reported but others will not.

"For other layers of non-BSDF windows, the output will not be produced at all."

@mjwitte mjwitte removed the OutputChange Code changes output in such a way that it cannot be merged after IO freeze label Aug 27, 2019
@mjwitte
Copy link
Contributor

mjwitte commented Aug 27, 2019

Removed outputchange label - this is just fixing existing variables.

@@ -2632,15 +2632,16 @@ \subsection{Window Output Variables}\label{window-output-variables}

\subsubsection{Surface Window Total Absorbed Shortwave Radiation Rate Layer \textless{}x\textgreater{} {[}W{]}}\label{surface-window-total-absorbed-shortwave-radiation-rate-layer-x-w}

This will output shortwave radiation absorbed in a window layer. The key values for this output variable are the surface name. Layers are numbered from the outside to the inside of the surface. The full listing will appear in the RDD file.
This will output shortwave radiation absorbed in a window layer. The key values for this output variable are the surface name. Layers are numbered from the outside to the inside of the surface. The full listing will appear in the RDD file. Note that this variable is only defined for constructions defined by a \hyperref[constructioncomplexfenestrationstate]{Construction:ComplexFenestrationState}.
Copy link
Member

Choose a reason for hiding this comment

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

👍

@@ -5608,6 +5608,10 @@ namespace HeatBalanceManager {
for (SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) {
DataSurfaces::Surface(SurfNum).MovInsulIntPresentPrevTS = DataSurfaces::Surface(SurfNum).MovInsulIntPresent;
}

// For non-complex windows, update a report variable so this shows up in the output as something other than zero
UpdateWindowFaceTempsNonBSDFWin();
Copy link
Member

Choose a reason for hiding this comment

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

No problem here.

"Zone",
"Average",
Surface(SurfLoop).Name);
}
Copy link
Member

Choose a reason for hiding this comment

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

OK, shortwave absorbed is only defined for BSDF.

"Zone",
"Average",
Surface(SurfLoop).Name);
}
Copy link
Member

Choose a reason for hiding this comment

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

But the front and back layers are available for all types, and for every layer in BSDF.


DataHeatBalance::clear_state();
DataSurfaces::clear_state();
DataHeatBalSurface::clear_state();
Copy link
Member

Choose a reason for hiding this comment

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

Definitely should not be necessary. These should've been cleaned up by the cleanup from the unit test that ran before this. It's OK that they are here right now, but just note this shouldn't be needed. If it is then something else is wrong.


// Second surface is a window so these should be set
EXPECT_NEAR(FenLaySurfTempFront(1,2),DataHeatBalSurface::TH(1,1,2),0.0001);
EXPECT_NEAR(FenLaySurfTempBack(SurfsForRegWindow,2),DataHeatBalSurface::TH(2,1,2),0.0001);
Copy link
Member

Choose a reason for hiding this comment

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

OK

@Myoldmopar
Copy link
Member

@RKStrand this needs the example files cleaned up to get rid of the error diffs due to the warning message about unused output variable. While making that change, might as well go ahead and fix up the unnecessary clear_state calls at the beginning of the new unit test. I'm going to build this locally and verify anyway, so I'll likely just make those changes and push the fixes up.

@RKStrand
Copy link
Contributor Author

@Myoldmopar Thanks for sorting that out (if you end up doing it). My apologies for some sloppy clear_state calls in the unit test. I was operating under the mode that each unit test has to perform on its own and not rely on anything from any previous unit test. My thought was that if the previous unit test changes or gets deleted (would that ever happen?) that would then potentially cause a problem with this one. I understand that could be somewhat wasteful though with lots and lots of calls to clear_state routines that aren't really needed.

@Myoldmopar
Copy link
Member

You are generally right, a unit test should operate on their own. However, clear_state calls are handled at the end of every single unit test automatically by the EnergyPlusFixture base class. It is expected that through these clear_state calls, the entire global state of EnergyPlus will be reset fully to its raw state again. If a clear_state needs to be called within a unit test, it indicates that something wasn't properly added to the fixture base class.

I pulled this branch and tested locally. With develop pulled in, and the unneeded clear_state calls in place, the unit test suite runs successfully. I also re-ran the example files after cleaning out the output variable issue and the error files are fully clean again. Merging this.

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.

9 participants