forked from NREL/openstudio-standards
-
Notifications
You must be signed in to change notification settings - Fork 0
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
brgix
wants to merge
9
commits into
nrcan_denis
Choose a base branch
from
nrcan_rd2
base: nrcan_denis
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ec0b845
Changes towards general TBD solution
brgix 68f3bae
Revises options/workflow + TODOs
brgix 682f234
Trims down TBD test runs
brgix 1f345da
Temp fix to ensure 'none' option
brgix 6db0b2b
Harmonizes with TBD's deratable surface tags
brgix a42228d
Fixes typo: surface-specific Ut (rather than Uo)
brgix b11c604
Fixes attic/plenum cases + improves test feedback
brgix 90400e3
Tests TBD 'attics' branch (temporary)
brgix 252fd2b
Pulls TBD v321 (+ Topolys gem v061)
brgix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ class NECB2011 < Standard | |
attr_accessor :standards_data | ||
attr_accessor :space_type_map | ||
attr_accessor :space_multiplier_map | ||
|
||
# This is a helper method to convert arguments that may support 'NECB_Default, and nils to convert to float' | ||
def convert_arg_to_f(variable:, default:) | ||
return variable if variable.kind_of?(Numeric) | ||
|
@@ -230,12 +230,10 @@ def model_create_prototype_model(template:, | |
output_meters: nil, | ||
airloop_economizer_type: nil, | ||
baseline_system_zones_map_option: nil, | ||
derate: false, | ||
uprate: false) | ||
tbd_option: :none) | ||
model = load_building_type_from_library(building_type: building_type) | ||
return model_apply_standard(model: model, | ||
derate: derate, | ||
uprate: uprate, | ||
tbd_option: :none, # 4x options: (1) :none (TBD is ignored), (2) :poor or (3) :good PSI factors (BTAP-costed), and (4) :uprate (i.e. iterative process) | ||
epw_file: epw_file, | ||
sizing_run_dir: sizing_run_dir, | ||
necb_reference_hp: necb_reference_hp, | ||
|
@@ -308,8 +306,7 @@ def load_building_type_from_library(building_type:) | |
# Created this method so that additional methods can be addded for bulding the prototype model in later | ||
# code versions without modifying the build_protoype_model method or copying it wholesale for a few changes. | ||
def model_apply_standard(model:, | ||
derate: false, | ||
uprate: false, | ||
tbd_option: :none, | ||
epw_file:, | ||
sizing_run_dir: Dir.pwd, | ||
necb_reference_hp: false, | ||
|
@@ -377,8 +374,7 @@ def model_apply_standard(model:, | |
electrical_loads_scale: electrical_loads_scale, | ||
oa_scale: oa_scale) | ||
apply_envelope(model: model, | ||
derate: derate, | ||
uprate: uprate, | ||
tbd_option: :none, | ||
ext_wall_cond: ext_wall_cond, | ||
ext_floor_cond: ext_floor_cond, | ||
ext_roof_cond: ext_roof_cond, | ||
|
@@ -514,7 +510,7 @@ def apply_systems_and_efficiencies(model:, | |
necb_reference_hp: necb_reference_hp, necb_reference_hp_supp_fuel: necb_reference_hp_supp_fuel, baseline_system_zones_map_option: baseline_system_zones_map_option) | ||
|
||
# Apply new ECM system. Overwrite standard as required. | ||
ecm.apply_system_ecm(model: model, ecm_system_name: ecm_system_name, template_standard: self, primary_heating_fuel: primary_heating_fuel, | ||
ecm.apply_system_ecm(model: model, ecm_system_name: ecm_system_name, template_standard: self, primary_heating_fuel: primary_heating_fuel, | ||
ecm_system_zones_map_option: ecm_system_zones_map_option) | ||
|
||
# -------- Performace, Efficiencies, Controls and Sensors ------------ | ||
|
@@ -611,8 +607,7 @@ def apply_weather_data(model:, epw_file:) | |
end | ||
|
||
def apply_envelope(model:, | ||
derate: false, | ||
uprate: false, | ||
tbd_option: :none, | ||
ext_wall_cond: nil, | ||
ext_floor_cond: nil, | ||
ext_roof_cond: nil, | ||
|
@@ -653,27 +648,29 @@ def apply_envelope(model:, | |
skylight_solar_trans: skylight_solar_trans) | ||
model_create_thermal_zones(model, @space_multiplier_map) | ||
|
||
if derate | ||
unless tbd_option == :none | ||
argh = {} # BTAP/TBD arguments (Uo/Ut factors may be nilled) | ||
argh[:walls ] = { uo: ext_wall_cond } | ||
argh[:floors] = { uo: ext_floor_cond } | ||
argh[:roofs ] = { uo: ext_roof_cond } | ||
|
||
if uprate | ||
if tbd_option == :uprate | ||
argh[:walls ][:ut] = ext_wall_cond | ||
argh[:floors][:ut] = ext_floor_cond | ||
argh[:roofs ][:ut] = ext_roof_cond | ||
elsif tbd_option == :poor || tbd_option == :good | ||
argh[:quality] = tbd_option | ||
else | ||
argh[:quality] = :poor | ||
end | ||
|
||
tbd = BTAP::Bridging.new(model, argh) | ||
# To-do output to json for costing... - Phylroy | ||
tbd.tally | ||
|
||
tbd.feedback[:logs].each do |log| | ||
puts log | ||
end | ||
|
||
# tbd.tally | ||
|
||
# tbd.feedback[:logs].each do |log| | ||
# puts log | ||
# end | ||
|
||
# tbd.feedback ... report (how?) failed attempts (e.g. uprating) to users. | ||
end | ||
|
@@ -736,10 +733,10 @@ def apply_kiva_foundation(model) | |
kiva_settings = model.getFoundationKivaSettings if !model.getFoundationKivas.empty? | ||
end | ||
|
||
# check if two surfaces are in contact. For every two consecutive vertices on surface 1, | ||
# loop through two consecutive vertices of surface two. Then check whether the vertices | ||
# of surfaces 2 are on the same line as the vertices from surface 1. If the two vectors | ||
# defined by the two vertices on surface 1 and those on surface 2 overlap, then the two | ||
# check if two surfaces are in contact. For every two consecutive vertices on surface 1, | ||
# loop through two consecutive vertices of surface two. Then check whether the vertices | ||
# of surfaces 2 are on the same line as the vertices from surface 1. If the two vectors | ||
# defined by the two vertices on surface 1 and those on surface 2 overlap, then the two | ||
# surfaces are in contact. If a side from surface 2 is in contact with a side from surface 1, | ||
# the length of the side from surface 2 is limited to the length of the side from surface 1. | ||
# created by: Kamel Haddad ([email protected]) | ||
|
@@ -779,9 +776,9 @@ def surfaces_are_in_contact?(surf1,surf2) | |
return surfaces_in_contact | ||
end | ||
|
||
# Loop through the layers of the construction of the surface and replace any massless material with | ||
# a standard one. The material used instead is from the EnergyPlus dataset file 'ASHRAE_2005_HOF_Materials.idf' | ||
# with the name: 'Insulation: Expanded polystyrene - extruded (smooth skin surface) (HCFC-142b exp.)'. | ||
# Loop through the layers of the construction of the surface and replace any massless material with | ||
# a standard one. The material used instead is from the EnergyPlus dataset file 'ASHRAE_2005_HOF_Materials.idf' | ||
# with the name: 'Insulation: Expanded polystyrene - extruded (smooth skin surface) (HCFC-142b exp.)'. | ||
# The thickness of the new material is based on the thermal resistance of the massless material it replaces. | ||
# created by: Kamel Haddad ([email protected]) | ||
def replace_massless_material_with_std_material(model,surf) | ||
|
@@ -820,8 +817,8 @@ def replace_massless_material_with_std_material(model,surf) | |
|
||
end | ||
|
||
# Find the exposed perimeter of a floor surface. For each side of the floor loop through | ||
# the walls and find the walls that share sides with the floor. Then sum the lengths of | ||
# Find the exposed perimeter of a floor surface. For each side of the floor loop through | ||
# the walls and find the walls that share sides with the floor. Then sum the lengths of | ||
# the sides of the walls that come in contact with sides of the floor. | ||
# created by: Kamel Haddad ([email protected]) | ||
def get_surface_exp_per(floor,walls) | ||
|
@@ -856,7 +853,7 @@ def get_surface_exp_per(floor,walls) | |
vert3 = vert4 | ||
end | ||
end | ||
# increment the exposed perimeter of the floor. Limit the length of the walls in contact with the | ||
# increment the exposed perimeter of the floor. Limit the length of the walls in contact with the | ||
# side of the floor to the length of the side of the floor. | ||
floor_exp_per += [walls_exp_per,side_length].min | ||
vert1 = vert2 | ||
|
@@ -865,7 +862,7 @@ def get_surface_exp_per(floor,walls) | |
return floor_exp_per | ||
end | ||
|
||
# check that three vertices are on the same line. Also check that the vectors | ||
# check that three vertices are on the same line. Also check that the vectors | ||
# from vert1 and vert2 and from vert1 and vert3 are in the same direction. | ||
# created by: Kamel Haddad ([email protected]) | ||
def three_vertices_same_line_and_dir?(vert1,vert2,vert3) | ||
|
@@ -896,7 +893,7 @@ def three_vertices_same_line_and_dir?(vert1,vert2,vert3) | |
|
||
return same_line_same_dir | ||
end | ||
|
||
# Thermal zones need to be set to determine conditioned spaces when applying fdwr and srr limits. | ||
# # fdwr_set/srr_set settings: | ||
# # 0-1: Remove all windows/skylights and add windows/skylights to match this fdwr/srr | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Boils down to a single TBD parameter.