module BTAP::Resources::Envelope
This module contains methods that relate to Materials, Constructions
and Construction Sets
Public Class Methods
assign_interior_surface_construction_to_adiabatic_surfaces(model, runner = nil)
click to toggle source
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
# File lib/openstudio-standards/btap/envelope.rb, line 29 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. 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 all_adiabatic_surfaces.each { |surface| surface.setConstruction(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_envelope_information(model)
click to toggle source
This method removes all envelope information from model. @author phylroy.lopez@nrcan.gc.ca @param model [OpenStudio::Model::Model] A model object
# File lib/openstudio-standards/btap/envelope.rb, line 53 def self.remove_all_envelope_information(model) model.getDefaultConstructionSets.each(&:remove) model.building.get.resetDefaultConstructionSet model.getDefaultSubSurfaceConstructionss.each(&:remove) model.getDefaultSurfaceConstructionss.each(&:remove) model.getPlanarSurfaces.sort.each { |item| item.resetConstruction } model.getConstructionBases.each(&:remove) model.getMaterials.each(&:remove) model.getInternalMassDefinitions(&:remove) model.getInternalMasss(&:remove) end