Skip to content

Commit

Permalink
Merge pull request #1435 from NREL/fix/issue1423
Browse files Browse the repository at this point in the history
fix typo and delete extra methods
  • Loading branch information
mdahlhausen authored Mar 13, 2023
2 parents 50d4bcb + b2a7ed1 commit c5fbf4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/openstudio-standards/btap/btap.model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class OpenStudio::Model::Construction
#insulation layer.
#@author Phylroy A. Lopez <plopez@nrcan.gc.ca>
#@return OpenStudio::Model::Material insulation_material_layer
def self.find_and_set_insulaton_layer()
def self.find_and_set_insulation_layer()
insulation_material_layer = nil
#return if there is already a defined insulation layer.
return self.insulation unless self.insulation.empty?
Expand Down Expand Up @@ -77,7 +77,7 @@ def customize(model,

if conductance.kind_of?(Float)
#re-find insulation layer
find_and_set_insulaton_layer(self.model,new_construction)
find_and_set_insulation_layer(self.model,new_construction)

#Determine how low the resistance can be set. Subtract existing insulation
#Values from the total resistance to see how low we can go.
Expand Down
8 changes: 4 additions & 4 deletions lib/openstudio-standards/btap/envelope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -504,13 +504,13 @@ def test_create_opaque_construction()

#This method will test find and set insulation layer.
# @author Phylroy A. Lopez <plopez@nrcan.gc.ca>
def test_find_and_set_insulaton_layer()
def test_find_and_set_insulation_layer()
construction = BTAP::Resources::Envelope::Constructions::create_construction(@model, "test construction", [@opaque, @air_gap, @insulation, @massless, @opaque])

#check insulation was not set.
assert((construction.insulation().empty?))
#now set it.
BTAP::Resources::Envelope::Constructions::find_and_set_insulaton_layer(@model, [construction])
BTAP::Resources::Envelope::Constructions::find_and_set_insulation_layer(@model, [construction])
#Now check that it found the insulation value.
assert(construction.insulation().get == @insulation)
end
Expand Down Expand Up @@ -544,7 +544,7 @@ def test_create_new_construction_based_on_exisiting()
#@param model [OpenStudio::Model::Model]
#@param constructions_array [BTAP::Common::validate_array]
#@return <String> insulating_layers
def self.find_and_set_insulaton_layer(model, constructions_array)
def self.find_and_set_insulation_layer(model, constructions_array)
constructions_array = BTAP::Common::validate_array(model, constructions_array, "Construction")
insulating_layers = Array.new()
constructions_array.each do |construction|
Expand Down Expand Up @@ -619,7 +619,7 @@ def self.customize_opaque_construction(model, construction, conductance)

if conductance.kind_of?(Float)
#re-find insulation layer
find_and_set_insulaton_layer(model, new_construction)
find_and_set_insulation_layer(model, new_construction)

#Determine how low the resistance can be set. Subtract exisiting insulation
#Values from the total resistance to see how low we can go.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def construction_set_u_value(construction, target_u_value_ip, insulation_layer_n
if insulation_layer_name.nil? && target_u_value_ip == 0.0
# Do nothing if the construction already doesn't have an insulation layer
elsif insulation_layer_name.nil?
insulation_layer_name = find_and_set_insulaton_layer(construction).name
insulation_layer_name = find_and_set_insulation_layer(construction).name
end

# Remove the insulation layer if the specified U-value is zero.
Expand Down

0 comments on commit c5fbf4e

Please sign in to comment.