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

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

Parameters:

Returns:

  • (OpenStudio::Model::AirGap)

    air

Author:



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

Parameters:

  • model (OpenStudio::Model::Model)
  • name (String) (defaults to: "massless opaque")

    the name of the surface.

  • roughness (String) (defaults to: "Smooth")

    valid values are = [“VeryRough”, “Rough”, “MediumRough”,“Smooth”,“MediumSmooth”,“VerySmooth”]

  • thermalResistance (Float) (defaults to: 0.1)

    m*K/W

Returns:

Author:



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

Parameters:

  • model (OpenStudio::Model::Model)
  • name (String) (defaults to: "opaque material")

    the name of the surface.

  • thickness (Float) (defaults to: 0.1)

    meters.

  • conductivity (Float) (defaults to: 0.1)

    W/m*K.

  • density (Float) (defaults to: 0.1)

    kg/m3

  • specific_heat (Float) (defaults to: 100)

    J/kg*K

  • roughness (String) (defaults to: "Smooth")

    valid values are = [“VeryRough”, “Rough”, “MediumRough”,“Smooth”,“MediumSmooth”,“VerySmooth”]

  • thermal_absorptance (Float) (defaults to: 0.9)

    range of 0 to 1.0

  • solar_absorptance (Float) (defaults to: 0.7)

    range of 0 to 1.0

  • visible_absorptance (Float) (defaults to: 0.7)

    range of 0 to 1.0

Returns:

Author:



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