Skip to content

Conversation

@brgix
Copy link
Member

@brgix brgix commented Sep 8, 2025

An effort to harmonize OSut, TBD & BTAP constants/methods when dealing with multilayered constructions and opaque materials.

@brgix brgix self-assigned this Sep 8, 2025
@brgix brgix added the enhancement New feature or request label Sep 8, 2025
UMAX = OSut::UMAX.dup
UMIN = OSut::UMIN.dup
RMIN = OSut::RMIN.dup
RMAX = OSut::RMAX.dup
Copy link
Member Author

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)
Copy link
Member Author

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!
Copy link
Member Author

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?
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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)
Copy link
Member Author

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 )
Copy link
Member Author

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]
Copy link
Member Author

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.

@brgix brgix merged commit 7bcd5a1 into develop Sep 12, 2025
7 checks passed
@brgix brgix deleted the sky branch September 12, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants