Class: BTAP::Resources::Envelope::ConstructionSets::ConstructionsSetTests

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
lib/openstudio-standards/btap/envelope.rb

Instance Method Summary collapse

Instance Method Details

#test_create_default_construction_setObject

This method creates default constructions



1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
# File 'lib/openstudio-standards/btap/envelope.rb', line 1061

def test_create_default_construction_set()
  model = OpenStudio::Model::Model.new()
  #Create layers from defaults
  insulation = BTAP::Resources::Envelope::Materials::Opaque::create_opaque_material(model)
  opaque = BTAP::Resources::Envelope::Materials::Opaque::create_opaque_material(model)
  air_gap = BTAP::Resources::Envelope::Materials::Opaque::create_air_gap(model)
  massless = BTAP::Resources::Envelope::Materials::Opaque::create_massless_opaque_material(model)
  construction = BTAP::Resources::Envelope::Constructions::create_construction(model, "test construction", [opaque, air_gap, 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 = BTAP::Resources::Envelope::Materials::Fenestration::create_simple_glazing(model)
  standard = BTAP::Resources::Envelope::Materials::Fenestration::create_standard_glazing(model)
  gas = BTAP::Resources::Envelope::Materials::Fenestration::create_gas(model)
  blind = BTAP::Resources::Envelope::Materials::Fenestration::create_blind(model)
  screen = BTAP::Resources::Envelope::Materials::Fenestration::create_screen(model)
  shade = BTAP::Resources::Envelope::Materials::Fenestration::create_shade(model)
  fixedWindowConstruction = BTAP::Resources::Envelope::Constructions::create_construction(model, "test construction", [simple, standard, gas, blind, screen, shade], gas)
  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_constructionsObject

This method creates default subsurface constructions



1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
# File 'lib/openstudio-standards/btap/envelope.rb', line 1034

def test_create_default_subsurface_constructions()
  model = OpenStudio::Model::Model.new()
  #Create layers from defaults
  simple = BTAP::Resources::Envelope::Materials::Fenestration::create_simple_glazing(model)
  standard = BTAP::Resources::Envelope::Materials::Fenestration::create_standard_glazing(model)
  gas = BTAP::Resources::Envelope::Materials::Fenestration::create_gas(model)
  blind = BTAP::Resources::Envelope::Materials::Fenestration::create_blind(model)
  screen = BTAP::Resources::Envelope::Materials::Fenestration::create_screen(model)
  shade = BTAP::Resources::Envelope::Materials::Fenestration::create_shade(model)
  fixedWindowConstruction = BTAP::Resources::Envelope::Constructions::create_construction(model, "test construction", [simple, standard, gas, blind, screen, shade], gas)
  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_constructionsObject

This method creates default surface constructions



1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
# File 'lib/openstudio-standards/btap/envelope.rb', line 1017

def test_create_default_surface_constructions()
  model = OpenStudio::Model::Model.new()
  #Create layers from defaults
  insulation = BTAP::Resources::Envelope::Materials::Opaque::create_opaque_material(model)
  opaque = BTAP::Resources::Envelope::Materials::Opaque::create_opaque_material(model)
  air_gap = BTAP::Resources::Envelope::Materials::Opaque::create_air_gap(model)
  massless = BTAP::Resources::Envelope::Materials::Opaque::create_massless_opaque_material(model)
  construction = BTAP::Resources::Envelope::Constructions::create_construction(model, "test construction", [opaque, air_gap, 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