-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added additional single layer systems to test
- Loading branch information
1 parent
278a7fd
commit 1781192
Showing
200 changed files
with
10,838 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#include <memory> | ||
#include <gtest/gtest.h> | ||
#include <cstdlib> | ||
#include <memory> | ||
#include <iostream> | ||
#include <filesystem> | ||
#include <fstream> | ||
|
||
#include "wincalc/wincalc.h" | ||
#include "optical_calcs.h" | ||
#include "util.h" | ||
#include "convert_optics_parser.h" | ||
#include "paths.h" | ||
|
||
|
||
using namespace wincalc; | ||
using namespace window_standards; | ||
|
||
class Test_1_layer_bsdf_xml_cgdb_14060 : public testing::Test | ||
{ | ||
protected: | ||
std::shared_ptr<Glazing_System> glazing_system_u; | ||
std::shared_ptr<Glazing_System> glazing_system_shgc; | ||
|
||
virtual void SetUp() | ||
{ | ||
std::filesystem::path shade_path(test_dir); | ||
shade_path /= "products"; | ||
shade_path /= "cgdb_14060_Urban Loft River Stone.xml"; | ||
|
||
std::vector<OpticsParser::ProductData> parsed_products; | ||
auto shade = OpticsParser::parseBSDFXMLFile(shade_path.string()); | ||
parsed_products.push_back(shade); | ||
|
||
std::vector<std::shared_ptr<Tarcog::ISO15099::CIGUGapLayer>> gaps; | ||
|
||
std::filesystem::path standard_path(test_dir); | ||
standard_path /= "standards"; | ||
standard_path /= "W5_NFRC_2003.std"; | ||
Optical_Standard standard = load_optical_standard(standard_path.string()); | ||
|
||
auto bsdf_hemisphere = | ||
SingleLayerOptics::BSDFHemisphere::create(SingleLayerOptics::BSDFBasis::Full); | ||
|
||
glazing_system_u = std::make_shared<Glazing_System>( | ||
standard, parsed_products, gaps, 1.0, 1.0, 90, nfrc_u_environments(), bsdf_hemisphere); | ||
glazing_system_shgc = std::make_shared<Glazing_System>( | ||
standard, parsed_products, gaps, 1.0, 1.0, 90, nfrc_shgc_environments(), bsdf_hemisphere); | ||
} | ||
}; | ||
|
||
TEST_F(Test_1_layer_bsdf_xml_cgdb_14060, Test_Optical) | ||
{ | ||
test_optical_results("1_layer/bsdf_xml_cgdb_14060/full_basis", glazing_system_u, update_results); | ||
} | ||
|
||
TEST_F(Test_1_layer_bsdf_xml_cgdb_14060, Test_Thermal) | ||
{ | ||
test_thermal_results("1_layer/bsdf_xml_cgdb_14060/full_basis", "thermal_U_Environment", glazing_system_u, update_results); | ||
test_thermal_results("1_layer/bsdf_xml_cgdb_14060/full_basis", "thermal_SHGC_Environment", glazing_system_shgc, update_results); | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#include <memory> | ||
#include <gtest/gtest.h> | ||
#include <cstdlib> | ||
#include <memory> | ||
#include <iostream> | ||
#include <filesystem> | ||
#include <fstream> | ||
|
||
#include "wincalc/wincalc.h" | ||
#include "optical_calcs.h" | ||
#include "util.h" | ||
#include "convert_optics_parser.h" | ||
#include "paths.h" | ||
|
||
|
||
using namespace wincalc; | ||
using namespace window_standards; | ||
|
||
|
||
class Test_1_layer_genBSDF_cgdb_24040 : public testing::Test | ||
{ | ||
protected: | ||
std::shared_ptr<Glazing_System> glazing_system_u; | ||
std::shared_ptr<Glazing_System> glazing_system_shgc; | ||
|
||
virtual void SetUp() | ||
{ | ||
std::filesystem::path product_path(test_dir); | ||
product_path /= "products"; | ||
product_path /= | ||
"CS03_genBSDF.xml"; //"cgdb_24040_Intigral_SL_Vanity_C000_White_Pleated_Shade_20mm_genBSDF.xml"; | ||
|
||
std::vector<OpticsParser::ProductData> products; | ||
auto shade = OpticsParser::parseBSDFXMLFile(product_path.string()); | ||
products.push_back(shade); | ||
|
||
std::vector<std::shared_ptr<Tarcog::ISO15099::CIGUGapLayer>> gaps; | ||
|
||
std::filesystem::path standard_path(test_dir); | ||
standard_path /= "standards"; | ||
standard_path /= "W5_NFRC_2003.std"; | ||
Optical_Standard standard = load_optical_standard(standard_path.string()); | ||
|
||
auto bsdf_hemisphere = | ||
SingleLayerOptics::BSDFHemisphere::create(SingleLayerOptics::BSDFBasis::Full); | ||
|
||
glazing_system_u = std::make_shared<Glazing_System>( | ||
standard, products, gaps, 1.0, 1.0, 90, nfrc_u_environments(), bsdf_hemisphere); | ||
glazing_system_shgc = std::make_shared<Glazing_System>( | ||
standard, products, gaps, 1.0, 1.0, 90, nfrc_shgc_environments(), bsdf_hemisphere); | ||
} | ||
}; | ||
|
||
TEST_F(Test_1_layer_genBSDF_cgdb_24040, Test_Thermal) | ||
{ | ||
// The genBSDF XML files do not have conductivity and so cannot generate thermal results | ||
EXPECT_THROW(glazing_system_u->gap_layers_effective_conductivities(Tarcog::ISO15099::System::Uvalue), std::runtime_error); | ||
EXPECT_THROW(glazing_system_u->gap_layers_effective_conductivities(Tarcog::ISO15099::System::SHGC), std::runtime_error); | ||
EXPECT_THROW(glazing_system_u->layer_temperatures(Tarcog::ISO15099::System::Uvalue), std::runtime_error); | ||
EXPECT_THROW(glazing_system_u->layer_temperatures(Tarcog::ISO15099::System::SHGC), std::runtime_error); | ||
EXPECT_THROW(glazing_system_u->relative_heat_gain(), std::runtime_error); | ||
EXPECT_THROW(glazing_system_u->shgc(), std::runtime_error); | ||
EXPECT_THROW(glazing_system_u->u(), std::runtime_error); | ||
EXPECT_THROW(glazing_system_u->solid_layers_effective_conductivities(Tarcog::ISO15099::System::Uvalue), std::runtime_error); | ||
EXPECT_THROW(glazing_system_u->solid_layers_effective_conductivities(Tarcog::ISO15099::System::SHGC), std::runtime_error); | ||
EXPECT_THROW(glazing_system_u->system_effective_conductivity(Tarcog::ISO15099::System::Uvalue), std::runtime_error); | ||
EXPECT_THROW(glazing_system_u->system_effective_conductivity(Tarcog::ISO15099::System::SHGC), std::runtime_error); | ||
|
||
|
||
} | ||
|
||
TEST_F(Test_1_layer_genBSDF_cgdb_24040, Test_Optical) | ||
{ | ||
test_optical_results("1_layer/genBSDF_cgdb_24040/full_basis", glazing_system_u, update_results); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#include <memory> | ||
#include <gtest/gtest.h> | ||
#include <cstdlib> | ||
#include <memory> | ||
#include <iostream> | ||
#include <filesystem> | ||
#include <fstream> | ||
|
||
#include "wincalc/wincalc.h" | ||
#include "optical_calcs.h" | ||
#include "util.h" | ||
#include "convert_optics_parser.h" | ||
#include "paths.h" | ||
|
||
|
||
using namespace wincalc; | ||
using namespace window_standards; | ||
|
||
class Test_1_layer_venetian_cgdb_24000 : public testing::Test | ||
{ | ||
protected: | ||
std::shared_ptr<Glazing_System> glazing_system_u; | ||
std::shared_ptr<Glazing_System> glazing_system_shgc; | ||
|
||
virtual void SetUp() | ||
{ | ||
std::filesystem::path product_path(test_dir); | ||
product_path /= "products"; | ||
product_path /= "cgdb_24000_Alabaster Venetian Blind Open (Intigral)_Alabaster_0_12.5.json"; | ||
|
||
std::vector<OpticsParser::ProductData> products; | ||
auto product = OpticsParser::parseJSONFile(product_path.string()); | ||
products.push_back(product); | ||
|
||
std::vector<std::shared_ptr<Tarcog::ISO15099::CIGUGapLayer>> gaps; | ||
|
||
std::filesystem::path standard_path(test_dir); | ||
standard_path /= "standards"; | ||
standard_path /= "W5_NFRC_2003.std"; | ||
Optical_Standard standard = load_optical_standard(standard_path.string()); | ||
auto bsdf_hemisphere = | ||
SingleLayerOptics::BSDFHemisphere::create(SingleLayerOptics::BSDFBasis::Full); | ||
|
||
glazing_system_u = std::make_shared<Glazing_System>( | ||
standard, products, gaps, 1.0, 1.0, 90, nfrc_u_environments(), bsdf_hemisphere); | ||
glazing_system_shgc = std::make_shared<Glazing_System>( | ||
standard, products, gaps, 1.0, 1.0, 90, nfrc_shgc_environments(), bsdf_hemisphere); | ||
} | ||
}; | ||
|
||
TEST_F(Test_1_layer_venetian_cgdb_24000, Test_Thermal) | ||
{ | ||
test_thermal_results("1_layer/venetian_cgdb_24000/full_basis", "thermal_U_Environment", glazing_system_u, update_results); | ||
test_thermal_results( | ||
"1_layer/venetian_cgdb_24000/full_basis", "thermal_SHGC_Environment", glazing_system_shgc, update_results); | ||
} | ||
|
||
TEST_F(Test_1_layer_venetian_cgdb_24000, Test_Optical) | ||
{ | ||
test_optical_results("1_layer/venetian_cgdb_24000/full_basis", glazing_system_u, update_results); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#include <memory> | ||
#include <gtest/gtest.h> | ||
#include <cstdlib> | ||
#include <memory> | ||
#include <iostream> | ||
#include <filesystem> | ||
#include <fstream> | ||
|
||
#include "wincalc/wincalc.h" | ||
#include "optical_calcs.h" | ||
#include "util.h" | ||
#include "convert_optics_parser.h" | ||
#include "paths.h" | ||
|
||
|
||
using namespace wincalc; | ||
using namespace window_standards; | ||
|
||
class Test_1_layer_venetian_cgdb_24001 : public testing::Test | ||
{ | ||
protected: | ||
std::shared_ptr<Glazing_System> glazing_system_u; | ||
std::shared_ptr<Glazing_System> glazing_system_shgc; | ||
|
||
virtual void SetUp() | ||
{ | ||
std::filesystem::path product_path(test_dir); | ||
product_path /= "products"; | ||
product_path /= "cgdb_24001_Alabaster Venetian Blind Closed (Intigral)_Alabaster_+70_12.5.json"; | ||
|
||
std::vector<OpticsParser::ProductData> products; | ||
auto product = OpticsParser::parseJSONFile(product_path.string()); | ||
products.push_back(product); | ||
|
||
std::vector<std::shared_ptr<Tarcog::ISO15099::CIGUGapLayer>> gaps; | ||
|
||
std::filesystem::path standard_path(test_dir); | ||
standard_path /= "standards"; | ||
standard_path /= "W5_NFRC_2003.std"; | ||
Optical_Standard standard = load_optical_standard(standard_path.string()); | ||
auto bsdf_hemisphere = | ||
SingleLayerOptics::BSDFHemisphere::create(SingleLayerOptics::BSDFBasis::Full); | ||
|
||
glazing_system_u = std::make_shared<Glazing_System>( | ||
standard, products, gaps, 1.0, 1.0, 90, nfrc_u_environments(), bsdf_hemisphere); | ||
glazing_system_shgc = std::make_shared<Glazing_System>( | ||
standard, products, gaps, 1.0, 1.0, 90, nfrc_shgc_environments(), bsdf_hemisphere); | ||
} | ||
}; | ||
|
||
TEST_F(Test_1_layer_venetian_cgdb_24001, Test_Thermal) | ||
{ | ||
test_thermal_results("1_layer/venetian_cgdb_24001/full_basis", "thermal_U_Environment", glazing_system_u, update_results); | ||
test_thermal_results( | ||
"1_layer/venetian_cgdb_24001/full_basis", "thermal_SHGC_Environment", glazing_system_shgc, update_results); | ||
} | ||
|
||
TEST_F(Test_1_layer_venetian_cgdb_24001, Test_Optical) | ||
{ | ||
test_optical_results("1_layer/venetian_cgdb_24001/full_basis", glazing_system_u, update_results); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#include <memory> | ||
#include <gtest/gtest.h> | ||
#include <cstdlib> | ||
#include <memory> | ||
#include <iostream> | ||
#include <filesystem> | ||
#include <fstream> | ||
|
||
#include "wincalc/wincalc.h" | ||
#include "optical_calcs.h" | ||
#include "util.h" | ||
#include "convert_optics_parser.h" | ||
#include "paths.h" | ||
|
||
|
||
using namespace wincalc; | ||
using namespace window_standards; | ||
|
||
class Test_1_layer_venetian_cgdb_24002 : public testing::Test | ||
{ | ||
protected: | ||
std::shared_ptr<Glazing_System> glazing_system_u; | ||
std::shared_ptr<Glazing_System> glazing_system_shgc; | ||
|
||
virtual void SetUp() | ||
{ | ||
std::filesystem::path product_path(test_dir); | ||
product_path /= "products"; | ||
product_path /= "cgdb_24002_Alabaster Venetian Blind +45 (Intigral)_Alabaster_+45_12.5.json"; | ||
|
||
std::vector<OpticsParser::ProductData> products; | ||
auto product = OpticsParser::parseJSONFile(product_path.string()); | ||
products.push_back(product); | ||
|
||
std::vector<std::shared_ptr<Tarcog::ISO15099::CIGUGapLayer>> gaps; | ||
|
||
std::filesystem::path standard_path(test_dir); | ||
standard_path /= "standards"; | ||
standard_path /= "W5_NFRC_2003.std"; | ||
Optical_Standard standard = load_optical_standard(standard_path.string()); | ||
auto bsdf_hemisphere = | ||
SingleLayerOptics::BSDFHemisphere::create(SingleLayerOptics::BSDFBasis::Full); | ||
|
||
glazing_system_u = std::make_shared<Glazing_System>( | ||
standard, products, gaps, 1.0, 1.0, 90, nfrc_u_environments(), bsdf_hemisphere); | ||
glazing_system_shgc = std::make_shared<Glazing_System>( | ||
standard, products, gaps, 1.0, 1.0, 90, nfrc_shgc_environments(), bsdf_hemisphere); | ||
} | ||
}; | ||
|
||
TEST_F(Test_1_layer_venetian_cgdb_24002, Test_Thermal) | ||
{ | ||
test_thermal_results("1_layer/venetian_cgdb_24002/full_basis", "thermal_U_Environment", glazing_system_u, update_results); | ||
test_thermal_results( | ||
"1_layer/venetian_cgdb_24002/full_basis", "thermal_SHGC_Environment", glazing_system_shgc, update_results); | ||
} | ||
|
||
TEST_F(Test_1_layer_venetian_cgdb_24002, Test_Optical) | ||
{ | ||
test_optical_results("1_layer/venetian_cgdb_24002/full_basis", glazing_system_u, update_results); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.