Module: BTAP::Resources::Envelope
- Defined in:
- lib/openstudio-standards/btap/envelope.rb
Overview
This module contains methods that relate to Materials, Constructions and Construction Sets
Defined Under Namespace
Modules: ConstructionSets, Constructions, Materials
Class Method Summary collapse
-
.assign_interior_surface_construction_to_adiabatic_surfaces(model, runner = nil) ⇒ Object
This method assignes interior surface construction to adiabatic surfaces from model.
-
.remove_all_constructions(model) ⇒ Object
This method removes all constructions from model.
-
.remove_all_default_construction_sets(model) ⇒ Object
This method removes all default construction sets from model.
-
.remove_all_default_subsurface_constructions(model) ⇒ Object
This method removes all default subsurface constructions from model.
-
.remove_all_default_surface_constructions(model) ⇒ Object
This method removes all default surface constructions from model.
-
.remove_all_envelope_information(model) ⇒ Object
This method removes all envelope information from model.
-
.remove_all_materials(model) ⇒ Object
This method removes all materials from model.
-
.remove_all_thermal_mass_definitions(model) ⇒ Object
This method removes all thermal mass definitions from model.
- .set_all_surfaces_to_default_construction(model) ⇒ Object
Class Method Details
.assign_interior_surface_construction_to_adiabatic_surfaces(model, runner = nil) ⇒ Object
This method assignes interior surface construction to adiabatic surfaces from model.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 70 def self.assign_interior_surface_construction_to_adiabatic_surfaces(model, runner = nil) BTAP::runner_register("Info","assign_interior_surface_construction_to_adiabatic_surfaces(#{model},#{runner}", 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. all_adiabatic_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition(model.getSurfaces, "Adiabatic") unless all_adiabatic_surfaces.empty? wall_construction = model.building.get.defaultConstructionSet.get.defaultInteriorSurfaceConstructions.get.wallConstruction.get BTAP::Geometry::Surfaces::set_surfaces_construction( all_adiabatic_surfaces, wall_construction) names = "" all_adiabatic_surfaces.each {|surface| name = "#{names} , #{surface.name.to_s} " } BTAP::runner_register("Warning", "The following adiabatic surfaces have been assigned the construction #{wall_construction.name} : #{name}" , runner) end else BTAP::runner_register("Error", "default constructruction not defined",runner) return false end return true end |
.remove_all_constructions(model) ⇒ Object
This method removes all constructions from model.
40 41 42 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 40 def self.remove_all_constructions( model ) model.getConstructions().each {|item| item.remove} end |
.remove_all_default_construction_sets(model) ⇒ Object
This method removes all default construction sets from model.
61 62 63 64 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 61 def self.remove_all_default_construction_sets( model ) model.getDefaultConstructionSets().each { |item| item.remove } model.building.get.resetDefaultConstructionSet() end |
.remove_all_default_subsurface_constructions(model) ⇒ Object
This method removes all default subsurface constructions from model.
54 55 56 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 54 def self.remove_all_default_subsurface_constructions( model ) model.getDefaultSubSurfaceConstructionss().each { |item| item.remove } end |
.remove_all_default_surface_constructions(model) ⇒ Object
This method removes all default surface constructions from model.
47 48 49 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 47 def self.remove_all_default_surface_constructions( model ) model.getDefaultSurfaceConstructionss().each { |item| item.remove } end |
.remove_all_envelope_information(model) ⇒ Object
This method removes all envelope information from model.
100 101 102 103 104 105 106 107 108 109 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 100 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 ) BTAP::Resources::Envelope::set_all_surfaces_to_default_construction( model ) BTAP::Resources::Envelope::remove_all_constructions( model ) BTAP::Resources::Envelope::remove_all_materials( model ) BTAP::Resources::Envelope::remove_all_thermal_mass_definitions( model ) end |
.remove_all_materials(model) ⇒ Object
This method removes all materials from model.
31 32 33 34 35 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 31 def self.remove_all_materials( model ) model.getMaterials().each do |item| item.remove end unless model.getMaterials().empty? end |
.remove_all_thermal_mass_definitions(model) ⇒ Object
This method removes all thermal mass definitions from model.
92 93 94 95 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 92 def self.remove_all_thermal_mass_definitions( model ) model.getInternalMassDefinitions.each { |item| item.remove } model.getInternalMasss.each { |item| item.remove } end |
.set_all_surfaces_to_default_construction(model) ⇒ Object
112 113 114 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 112 def self.set_all_surfaces_to_default_construction( model ) model.getPlanarSurfaces.each { |item| item.resetConstruction } end |