lib/openstudio-standards/btap/envelope.rb in openstudio-standards-0.4.0 vs lib/openstudio-standards/btap/envelope.rb in openstudio-standards-0.5.0.rc1

- old
+ new

@@ -25,50 +25,50 @@ # This module contains methods that relate to Materials, Constructions and Construction Sets module Envelope #Resources::Envelope #This method removes all materials from model. #@author phylroy.lopez@nrcan.gc.ca - #@param model [OpenStudio::model::Model] A model object + #@param model [OpenStudio::Model::Model] A model object def self.remove_all_materials(model) model.getMaterials().each do |item| item.remove end unless model.getMaterials().empty? end #This method removes all constructions from model. #@author phylroy.lopez@nrcan.gc.ca - #@param model [OpenStudio::model::Model] A model object + #@param model [OpenStudio::Model::Model] A model object def self.remove_all_constructions(model) model.getConstructions().each { |item| item.remove } end #This method removes all default surface constructions from model. #@author phylroy.lopez@nrcan.gc.ca - #@param model [OpenStudio::model::Model] A model object + #@param model [OpenStudio::Model::Model] A model object def self.remove_all_default_surface_constructions(model) model.getDefaultSurfaceConstructionss().each { |item| item.remove } end #This method removes all default subsurface constructions from model. #@author phylroy.lopez@nrcan.gc.ca - #@param model [OpenStudio::model::Model] A model object + #@param model [OpenStudio::Model::Model] A model object def self.remove_all_default_subsurface_constructions(model) model.getDefaultSubSurfaceConstructionss().each { |item| item.remove } end #This method removes all default construction sets from model. #@author phylroy.lopez@nrcan.gc.ca - #@param model [OpenStudio::model::Model] A model object + #@param model [OpenStudio::Model::Model] A model object def self.remove_all_default_construction_sets(model) model.getDefaultConstructionSets().each { |item| item.remove } model.building.get.resetDefaultConstructionSet() end #This method assignes interior surface construction to adiabatic surfaces from model. #@author phylroy.lopez@nrcan.gc.ca - #@param model [OpenStudio::model::Model] A model object + #@param model [OpenStudio::Model::Model] A model object def self.assign_interior_surface_construction_to_adiabatic_surfaces(model, runner = nil) BTAP::runner_register("Info", "assign_interior_surface_construction_to_adiabatic_surfaces", runner) unless model.building.get.defaultConstructionSet.empty? or model.building.get.defaultConstructionSet.get.defaultInteriorSurfaceConstructions.empty? or model.building.get.defaultConstructionSet.get.defaultInteriorSurfaceConstructions.get.wallConstruction.empty? #Give adiabatic surfaces a construction. Does not matter what. This is a bug in OpenStudio that leave these surfaces unassigned by the default construction set. @@ -88,18 +88,18 @@ return true end #This method removes all thermal mass definitions from model. #@author phylroy.lopez@nrcan.gc.ca - #@param model [OpenStudio::model::Model] A model object + #@param model [OpenStudio::Model::Model] A model object def self.remove_all_thermal_mass_definitions(model) model.getInternalMassDefinitions.sort.each { |item| item.remove } model.getInternalMasss.sort.each { |item| item.remove } end #This method removes all envelope information from model. #@author phylroy.lopez@nrcan.gc.ca - #@param model [OpenStudio::model::Model] A model object + #@param model [OpenStudio::Model::Model] A model object def self.remove_all_envelope_information(model) BTAP::Resources::Envelope::remove_all_materials(model) BTAP::Resources::Envelope::remove_all_default_construction_sets(model) BTAP::Resources::Envelope::remove_all_default_subsurface_constructions(model) BTAP::Resources::Envelope::remove_all_default_surface_constructions(model) \ No newline at end of file