-
Notifications
You must be signed in to change notification settings - Fork 4
Upgrades construction/materials constants/methods #122
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
Conversation
| UMAX = OSut::UMAX.dup | ||
| UMIN = OSut::UMIN.dup | ||
| RMIN = OSut::RMIN.dup | ||
| RMAX = OSut::RMAX.dup |
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.
Adds extended OSut constants.
|
|
||
| d = m.thickness | ||
| k = (d / de_r).clamp(KMIN, KMAX) | ||
| d = (k * de_r).clamp(DMIN, DMAX) |
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.
In an effort to harmonize OSut, TBD & BTAP methods, de/up-rated materials have first thermal conductivity, then thickness adjustments (if required).
| # This didn't mean EnergyPlus wouldn't halt a simulation due to invalid CTF | ||
| # calculations - happens with very thick materials. Recent 2025 TBD changes | ||
| # have removed this check. Users of pre-v3.5.X OpenStudio should expect | ||
| # OS-generated simulation failures when uprating (extremes cases). Achtung! |
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.
Removing the thickness check - a head's up if using OpenStudio versions < 3.5.X.
| constructions.setWallConstruction(lc) if typ == :wall | ||
| constructions.setFloorConstruction(lc) if typ == :floor | ||
| constructions.setRoofCeilingConstruction(lc) if typ == :ceiling | ||
| if set.nil? |
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.
Osut's defaultConstructionSet failed to retrieve the applicable set for a surface's construction, as the method wasn't (also) looking for an inherited construction from its adjacent surface - not good. The OSut method has been fixed/tested. Adding here an extra fallback (just in case). This still needs a dedicated stress test.
| model.save(file, true) | ||
| end | ||
|
|
||
| it "can purge KIVA objects" do |
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.
Test maintained in the TBD Test Suite.
|
|
||
| unless ids.include?(i) | ||
| log(ERR, "Orphaned subsurface #{i} (mth)") | ||
| adj = nil |
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.
Interzone subsurfaces between CONDITIONED vs UNCONDITIONED spaces (e.g. trap door in an attic floor) is a rare - but not odd - occurrence. TBD wasn't catching these cases properly, raising an ERROR in the process. This is now caught correctly.
| expect(surfaces).to be_a(Hash) | ||
| expect(surfaces.size).to eq(43) | ||
| expect(io).to have_key(:edges) | ||
| expect(io[:edges].size).to eq(109) |
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.
An extra 4 edges (i.e. thermal bridges) around attic trap door - an example.
| argh[:floor_ut ] = 5.678 unless argh.key?(:floor_ut ) | ||
| argh[:wall_ut ] = UMAX unless argh.key?(:wall_ut ) | ||
| argh[:roof_ut ] = UMAX unless argh.key?(:roof_ut ) | ||
| argh[:floor_ut ] = UMAX unless argh.key?(:floor_ut ) |
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.
Forgot to harmonize these.
| next unless surface.key?(:construction) | ||
| next unless surface[:construction].is_a?(cl3) | ||
| next unless surface[:construction] == lc | ||
| next unless surface[:deratable] |
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.
Without this check, adjacent surface constructions in UNCONDITIONED spaces (e.g. vented attics), would unintentionally inherit cloned uprated constructions (with a big fat warning). These would later be overridden by the derate method, leaving orphaned, cloned constructions in the model. Not good.
An effort to harmonize OSut, TBD & BTAP constants/methods when dealing with multilayered constructions and opaque materials.