Class: BTAP::Resources::Envelope::ConstructionSets::ConstructionsSetTests
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- BTAP::Resources::Envelope::ConstructionSets::ConstructionsSetTests
- Defined in:
- lib/openstudio-standards/btap/envelope.rb
Instance Method Summary collapse
-
#test_create_default_construction_set ⇒ Object
This method creates default constructions.
-
#test_create_default_subsurface_constructions ⇒ Object
This method creates default subsurface constructions.
-
#test_create_default_surface_constructions ⇒ Object
This method creates default surface constructions.
-
#test_customize_default_surface_constructions_rsi ⇒ Object
This method customizes default surface constructions.
Instance Method Details
#test_create_default_construction_set ⇒ Object
This method creates default constructions
935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 935 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_constructions ⇒ Object
This method creates default subsurface constructions
908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 908 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_constructions ⇒ Object
This method creates default surface constructions
871 872 873 874 875 876 877 878 879 880 881 882 883 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 871 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 |
#test_customize_default_surface_constructions_rsi ⇒ Object
This method customizes default surface constructions
887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 887 def test_customize_default_surface_constructions_rsi() 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?)) new_set = BTAP::Resources::Envelope::ConstructionSets::customize_default_surface_constructions_rsi(model,"changed_rsi",construction_set,1.0/2.45,1.0/2.55 , 1.0/2.65) assert_in_delta(1.0/2.45,BTAP::Resources::Envelope::Constructions::get_conductance(new_set.wallConstruction.get).to_f,0.00001 ) assert_in_delta(1.0/2.55,BTAP::Resources::Envelope::Constructions::get_conductance(new_set.floorConstruction.get).to_f,0.00001 ) assert_in_delta(1.0/2.65,BTAP::Resources::Envelope::Constructions::get_conductance(new_set.roofCeilingConstruction.get).to_f,0.00001 ) end |