Module: BTAP::Resources::Envelope::Materials::Opaque
- Defined in:
- lib/openstudio-standards/btap/envelope.rb
Overview
This module contains methods to create opaque materials for Opaque constructions such as walls, roofs, floor and ceilings.
Defined Under Namespace
Classes: OpaqueTests
Class Method Summary collapse
-
.create_air_gap(model, name = "air gap", resistance = 0.1) ⇒ OpenStudio::Model::AirGap
This method will create a new OpenStudio::Model::AirGap material layer.
-
.create_massless_opaque_material(model, name = "massless opaque", roughness = "Smooth", thermalResistance = 0.1) ⇒ OpenStudio::Model::MasslessOpaqueMaterial
This method will create a new OpenStudio::Model::MasslessOpaqueMaterial material layer.
-
.create_opaque_material(model, name = "opaque material", thickness = 0.1, conductivity = 0.1, density = 0.1, specific_heat = 100, roughness = "Smooth", thermal_absorptance = 0.9, solar_absorptance = 0.7, visible_absorptance = 0.7) ⇒ OpenStudio::Model::StandardOpaqueMaterial
This method will create a OpenStudio::Model::StandardOpaqueMaterial material layer.
Class Method Details
.create_air_gap(model, name = "air gap", resistance = 0.1) ⇒ OpenStudio::Model::AirGap
This method will create a new OpenStudio::Model::AirGap material layer
240 241 242 243 244 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 240 def self.create_air_gap(model,name = "air gap",resistance = 0.1) air = OpenStudio::Model::AirGap.new(model,resistance) air.setName( name) return air end |
.create_massless_opaque_material(model, name = "massless opaque", roughness = "Smooth", thermalResistance = 0.1) ⇒ OpenStudio::Model::MasslessOpaqueMaterial
This method will create a new OpenStudio::Model::MasslessOpaqueMaterial material layer
226 227 228 229 230 231 232 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 226 def self.create_massless_opaque_material(model, name = "massless opaque", roughness = "Smooth", thermalResistance = 0.1) # make sure the roughness value is acceptable. raise("Roughness Value \"#{roughness}\" is not a part of accepted values: #{OpenStudio::Model::StandardOpaqueMaterial::roughnessValues.join(",")}") unless OpenStudio::Model::StandardOpaqueMaterial::roughnessValues.include?(roughness) massless = OpenStudio::Model::MasslessOpaqueMaterial.new(model, roughness,thermalResistance) massless.setName( name) return massless end |
.create_opaque_material(model, name = "opaque material", thickness = 0.1, conductivity = 0.1, density = 0.1, specific_heat = 100, roughness = "Smooth", thermal_absorptance = 0.9, solar_absorptance = 0.7, visible_absorptance = 0.7) ⇒ OpenStudio::Model::StandardOpaqueMaterial
This method will create a OpenStudio::Model::StandardOpaqueMaterial material layer. BTAP::Resources::Envelope::Materials::Opaque::create_opaque_material
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 195 def self.create_opaque_material( model, name = "opaque material", thickness = 0.1 , conductivity = 0.1 , density = 0.1, specific_heat = 100, roughness = "Smooth", thermal_absorptance = 0.9, solar_absorptance = 0.7, visible_absorptance = 0.7 ) # make sure the roughness value is acceptable. raise("Roughness Value \"#{roughness}\" is not a part of accepted values such as: #{OpenStudio::Model::StandardOpaqueMaterial::roughnessValues.join(",")}") unless OpenStudio::Model::StandardOpaqueMaterial::roughnessValues.include?(roughness) # I was thinking of adding a suffix to the name to make it more descriptive, but this can be confusing. Keeping it here if I need it later. # name = name + " " + "t=" + sprintf("%.3f", thickness) + "c=" + sprintf("%.3f", conductance) + "d=" + sprintf("%.3f", density) + "s=" + sprintf("%.3", specific_heat) material = OpenStudio::Model::StandardOpaqueMaterial.new( model, roughness , thickness, conductivity , density, specific_heat ) material.setName( name ) unless name == "" or name == nil material.setThermalAbsorptance( thermal_absorptance ) material.setSolarAbsorptance( solar_absorptance ) material.setVisibleAbsorptance( visible_absorptance ) return material end |