-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Addresses #4403, add Sql helper methods to retrieve U-factors, SHGC, or VT for glazing systems #4550
Conversation
@@ -1531,3 +1534,34 @@ TEST_F(ModelFixture, Issue_4361_Multi_Subsurfaces_Overlapping) { | |||
windowWallRatio = surface.windowToWallRatio(); | |||
EXPECT_NEAR(windowWallRatio, 0.2742, 0.01); | |||
} | |||
|
|||
TEST_F(ModelFixture, 4403_FenestrationAssembly) { | |||
// Test for #4403 - Add Sql helper methods to retrieve U-factors, SHGC, or VT for glazing systems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the test
(Side note: I'm not a big fan on relying on the ReverseTranslator though. Would be better with an OSM directly, but that's probably a non issue)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it makes sense to use RUN_ENERGYPLUS to keep current, so I actually like this solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see pros/cons both ways. The con, as I see it, with OSM directly is that OSM/IDF get out of sync in FrameAndDivider
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the very least, move the method from Modelobject to SubSurface, but perhaps delete it?
src/model/ModelObject.cpp
Outdated
/** Gets the fenestration value from the sql file **/ | ||
boost::optional<double> ModelObject_Impl::getFenestrationValue(std::string columnName) const { | ||
boost::optional<double> result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless there is another class that will need this, this shouldn't be on ModelObject, but just on the SubSurface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this method a bit confusing. Do we need this in addition to the better named assemblyUFactor
etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using getAutosizedValue
as a guide, where you can pass in the appropriate columnName
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah but in that case it makes sense because lots of child classes get to use that method. Here that doesn't seem to be the case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the harm - it reduces duplicated code. Should we rename the method to something other than getFenestrationValue
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to getExteriorFenestrationValue
so that it aligns with TableName=Exterior Fenestration
.
@@ -1531,3 +1534,34 @@ TEST_F(ModelFixture, Issue_4361_Multi_Subsurfaces_Overlapping) { | |||
windowWallRatio = surface.windowToWallRatio(); | |||
EXPECT_NEAR(windowWallRatio, 0.2742, 0.01); | |||
} | |||
|
|||
TEST_F(ModelFixture, 4403_FenestrationAssembly) { | |||
// Test for #4403 - Add Sql helper methods to retrieve U-factors, SHGC, or VT for glazing systems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it makes sense to use RUN_ENERGYPLUS to keep current, so I actually like this solution.
CI Results for b3d13c0:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joseph-robertson LGTM!
/** @name Queries */ | ||
//@{ | ||
|
||
/** Gets the fenestration value from the sql file **/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a comment here or in the implementation explaining that it only reports for exterior fenestration (and not interior fenestration, and unlike the original NFP) would be helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok, my bad, the name actually is spot on, getExteriorFenestrationValue. LGTM!
HotFix #4550 - Remove getExteriorFenestrationValue from public API
Pull request overview
Checklist:
SubSurface
:assembly<type>()
getFenestrationValue(std::string <type>)
(onModelObject
)src/model/test/SubSurface_GTest.cpp
SqlFile
:assembly<type>(std::string name)
assembly<type>TotalorAverage()
?assembly<type>NorthTotalorAverage()
?assembly<type>NonNorthTotalorAverage()
?src/utilities/sql/Test/SqlFile_GTest.cpp
resources/energyplus
:FrameAndDivider/in.idf
(copied from os-resourceswindow_property_frame_and_divider.rb
)for
UFactor
,SHGC
,VisibleTransmittance
.Questions:
getFenestrationValue
methods fromSqlFile
andSubSurface
so that we don't duplicate code?TableName=Exterior Fenestration
, thenTableName=Interior Fenestration
? Update: Interior Fenestration wasn't implemented.assembly<type>()
methods onSubSurface
? Update: Use newFrameAndDivider
; reverse translatein.idf
and attacheplusout.sql
tomodel
.Pull Request Author
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)Labels:
IDDChange
APIChange
Pull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.