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

Changes towards general TBD solution #1

Open
wants to merge 9 commits into
base: nrcan_denis
Choose a base branch
from
Open

Conversation

brgix
Copy link
Owner

@brgix brgix commented Jan 21, 2023

No description provided.

@brgix brgix self-assigned this Jan 21, 2023
#
# lib/openstudio-standards/btap/bridging.rb
#
# Otherwise, :bad vs :good PSI factor sets refer to costed BTAP details.
Copy link
Owner Author

Choose a reason for hiding this comment

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

Boils down to a single TBD parameter.

@@ -1265,13 +1265,11 @@ def initialize(model = nil, argh = {})
comply = false
redflag = false
perform = :lp # Low-performance wall constructions
quality = :bad # poor PSI factors
quality = :bad # poor PSI factors - maybe reset to :good (user option)
quality = :good if argh.key?(:quality) && argh[:quality] == :good
Copy link
Owner Author

Choose a reason for hiding this comment

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

When BTAP users opt to NOT uprate, but instead run cases while setting PSI factor quality (:poor vs :bad) - reset BEFORE setting the combo variable (i.e. TBD JSON Hash).

@@ -1340,6 +1339,8 @@ def initialize(model = nil, argh = {})
break if unable

unable = log[:message].include?("Can't uprate " )

# Maybe check for FATAL errors logged by TBD ... TO-DO.
Copy link
Owner Author

Choose a reason for hiding this comment

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

TBD will catch FATAL and non-fatal ERROR messages (critical to its own internal calculations) that aren't necessarily caught by OpenStudio, but usually caught by EnergyPlus. Here, TBD only red-flags cases it can't uprate (and then takes step accordingly). TBD could also catch FATAL errors beforehand. Or alternatively let EnergyPlus halt a simulation in such cases. Up to BTAP Team.

# puts
# puts "#{id} : #{stypes} : #{group[:uo]}: #{group[:faces].size}x"
# group[:faces].each { |s| puts s.nameString }
sss = BTAP::Geometry::Surfaces.set_surfaces_construction_conductance(group[:faces], group[:uo])
Copy link
Owner Author

Choose a reason for hiding this comment

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

When BTAP users request 'uprating' (e.g. NECB2017, NECB2020) yet TBD fails to identify a winning Uo + PSI factor combo to meet the Ut target. Such cases are non-compliant, yet the code here nonetheless resets (in batches) construction Uo factors to the lowest (i.e. best performing) BTAP 'costed' option (e.g. 0.100 or 0.080 W/K.m^2 for walls). TBD ultimately derates the same constructions. This provides a ball-park figure of effort ($) vs return ($), despite non-compliance.

mdl.addObjects(model.toIdfFile.objects)
TBD.clean!
res = TBD.process(mdl, args)
surfaces = res[:surfaces]
Copy link
Owner Author

Choose a reason for hiding this comment

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

Running a 'dry-run' TBD instance is more efficient for validating and gathering key inputs from the OpenStudio model (than duplicating a lot of the same code).

# Add final selection of (uprated) Uo factors per BTAP construction.
return true unless @model.key?(:constructions)

@tally[:constructions] = @model[:constructions]
Copy link
Owner Author

Choose a reason for hiding this comment

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

tally now holds a Hash of edges (i.e. thermal bridges), as well as uprated constructions (if applicable).

# temporarily mistaken as a conditioned plenum. The return variable of the
# following method is a Hash holding temporarily-modified spaces,
# i.e. buffer zones.
buffers = self.alter_buffers(model)
Copy link
Owner Author

Choose a reason for hiding this comment

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

Temporary solution to fix attic vs plenum mixup in BTAP.

# @param tbd_option [String] BTAP/TBD option
#
# @return [Bool] true if successful, e.g. no errors, compliant if uprated
def apply_thermal_bridging(model: nil, tbd_option: 'none')
Copy link
Owner Author

Choose a reason for hiding this comment

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

Moves BTAP/TBD processes after resetting FWDR & SRR.

fdback << log

# NOTE: BTAP/TBD feedback logs are simple strings. Look up
# st.tbd.tally Hash to extract quantities for costing.
Copy link
Owner Author

Choose a reason for hiding this comment

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

Key outputs for costing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant