class BTAP::Resources::Envelope::ConstructionSets::ConstructionsSetTests

Public Instance Methods

test_create_default_construction_set() click to toggle source

This method creates default constructions @author phylroy.lopez@nrcan.gc.ca

# File lib/openstudio-standards/btap/envelope.rb, line 507
def test_create_default_construction_set()
  model = OpenStudio::Model::Model.new()
  #Create layers from defaults
  insulation = OpenStudio::Model::StandardOpaqueMaterial.new(model, 'Smooth', 0.1, 0.001, 0.1, 0.1)
  opaque = OpenStudio::Model::StandardOpaqueMaterial.new(model, 'Smooth', 0.1, 0.1, 0.1, 100)
  massless = OpenStudio::Model::MasslessOpaqueMaterial.new(model, 'Smooth', 0.1)
  construction = BTAP::Resources::Envelope::Constructions::create_construction(model, "test construction", [opaque, insulation, massless, opaque], insulation)
  walls_cons = floor_cons = roof_cons = construction
  exterior_construction_set = BTAP::Resources::Envelope::ConstructionSets::create_default_surface_constructions(model, "test construction set", walls_cons, floor_cons, roof_cons)
  interior_construction_set = ground_construction_set = exterior_construction_set

  #Create layers from defaults
  simple = OpenStudio::Model::SimpleGlazing.new(model, 0.1, 0.1)
  simple.setThickness(0.005)
  simple.setVisibleTransmittance(0.8)
  standard = OpenStudio::Model::StandardGlazing.new(model, 'SpectralAverage', 0.003)
  fixedWindowConstruction = BTAP::Resources::Envelope::Constructions::create_construction(model, "test construction", [simple, standard])
  operableWindowConstruction = setDoorConstruction = setGlassDoorConstruction = overheadDoorConstruction = skylightConstruction = tubularDaylightDomeConstruction = tubularDaylightDiffuserConstruction = fixedWindowConstruction
  ext_subsurface_constructions = BTAP::Resources::Envelope::ConstructionSets::create_subsurface_construction_set(
      model,
      fixedWindowConstruction,
      operableWindowConstruction,
      setDoorConstruction,
      setGlassDoorConstruction,
      overheadDoorConstruction,
      skylightConstruction,
      tubularDaylightDomeConstruction,
      tubularDaylightDiffuserConstruction)

  int_subsurface_constructions = ext_subsurface_constructions

  construction_set = BTAP::Resources::Envelope::ConstructionSets::create_default_construction_set(
      model,
      "default construction set test",
      exterior_construction_set,
      interior_construction_set,
      ground_construction_set,
      ext_subsurface_constructions,
      int_subsurface_constructions)

  #Check that the construction was created
  assert(!(construction_set.to_DefaultConstructionSet.empty?))
end
test_create_default_subsurface_constructions() click to toggle source

This method creates default subsurface constructions @author phylroy.lopez@nrcan.gc.ca

# File lib/openstudio-standards/btap/envelope.rb, line 483
def test_create_default_subsurface_constructions()
  model = OpenStudio::Model::Model.new()
  #Create layers from defaults
  simple = OpenStudio::Model::SimpleGlazing.new(model, 0.1, 0.1)
  simple.setThickness(0.005)
  simple.setVisibleTransmittance(0.8)
  standard = OpenStudio::Model::StandardGlazing.new(model, 'SpectralAverage', 0.003)
  fixedWindowConstruction = BTAP::Resources::Envelope::Constructions::create_construction(model, "test construction", [simple, standard])
  operableWindowConstruction = setDoorConstruction = setGlassDoorConstruction = overheadDoorConstruction = skylightConstruction = tubularDaylightDomeConstruction = tubularDaylightDiffuserConstruction = fixedWindowConstruction
  default_subsurface_constructions = BTAP::Resources::Envelope::ConstructionSets::create_subsurface_construction_set(
      model,
      fixedWindowConstruction,
      operableWindowConstruction,
      setDoorConstruction,
      setGlassDoorConstruction,
      overheadDoorConstruction,
      skylightConstruction,
      tubularDaylightDomeConstruction,
      tubularDaylightDiffuserConstruction)
  assert(!(default_subsurface_constructions.to_DefaultSubSurfaceConstructions.empty?))
end
test_create_default_surface_constructions() click to toggle source

This method creates default surface constructions @author phylroy.lopez@nrcan.gc.ca

# File lib/openstudio-standards/btap/envelope.rb, line 468
def test_create_default_surface_constructions()
  model = OpenStudio::Model::Model.new()
  #Create layers from defaults
  insulation = OpenStudio::Model::StandardOpaqueMaterial.new(model, 'Smooth', 0.1, 0.001, 0.1, 0.1)
  opaque = OpenStudio::Model::StandardOpaqueMaterial.new(model, 'Smooth', 0.1, 0.1, 0.1, 100)
  massless = OpenStudio::Model::MasslessOpaqueMaterial.new(model, 'Smooth', 0.1)
  construction = BTAP::Resources::Envelope::Constructions::create_construction(model, "test construction", [opaque, insulation, massless, opaque], insulation)
  walls_cons = floor_cons = roof_cons = construction
  construction_set = BTAP::Resources::Envelope::ConstructionSets::create_default_surface_constructions(model, "test construction set", walls_cons, floor_cons, roof_cons)
  #Check that the construction was created
  assert(!(construction_set.to_DefaultSurfaceConstructions.empty?))
end