Commit 274c3291 authored by Henderson, Shane's avatar Henderson, Shane
Browse files

Remove extraneous test

parent a44b56d2
Loading
Loading
Loading
Loading
+0 −78
Original line number Diff line number Diff line
@@ -370,81 +370,3 @@ TEST(default_data, FLiNaK_465_115_042)
    tp.setComposition({"LiF","BeF2","ThF4"},{0.6998,0.1499,0.1503});
    ASSERT_FALSE(tp.valid_mu());
}
TEST(default_data, full_load)
{
    Default_Data_Store d; d.load("/home/oxh/dev/mstdb-tp/Molten_Salt_Thermophysical_Properties.csv");
    Thermophysical_Properties tp;
    ASSERT_TRUE(tp.initialize(&d));
    // Ensure that the composition set correctly
    ASSERT_TRUE(tp.setComposition({"LiF","NaF","KF"},{0.465,0.115,0.42}));

    // Test Density
    std::vector<double> tks           = {700.0, 750.0, 800.0, 850.0, 860.0, 1000.0};
    // Expected calculated values (note these have been rounded)
    std::vector<double> rho_calc_ref  = {2.1425,2.1113,2.0801,2.04890,2.04266,1.9553};
    for( size_t i = 0; i < tks.size(); ++i)
    {
        double t_k = tks[i];
        EXPECT_NEAR(rho_calc_ref[i], tp.rho(t_k), 1e-3);
    }
    EXPECT_NEAR(tp.rho_h(tp.h_t(900)), tp.rho(900), 1e-4);
    EXPECT_FLOAT_EQ(tp.rho(900)*1000.0,tp.rho_kgm3(900));
    tks.clear();

    // Test Heat Capacity
    // Using values from reference https://doi.org/10.1021/je00029a041
    tks           = {700.0, 750.0, 800.0, 850.0, 860.0, 1000.0};
    // Expected calculated values (note these have been rounded)
    std::vector<double> cp_calc_ref  = {71.0316, 73.2255, 75.4194, 77.6133, 78.0521, 84.195};

    for( size_t i = 0; i < tks.size(); ++i)
    {
        double t_k = tks[i];
        EXPECT_NEAR(cp_calc_ref[i], tp.cp(t_k), 6e-3);
    }
    EXPECT_FLOAT_EQ(tp.cp(900)*(1000.0/41.2909),tp.cp_kg(900));
    EXPECT_NEAR(tp.cp_h(tp.h_t(1200)), tp.cp(1200), 4e-2);
    tks.clear();

    // Test Viscosity
    // Using values from reference https://doi.org/10.1021/je60084a007
    tks                              = {700.0, 822.45, 872.65, 973.45, 922.95, 770.15, 1000.0};
    // Expected calculated value
    std::vector<double> mu_calc_ref  = {17.9814 , 5.6296, 4.0862, 2.5436, 3.1494, 8.5459, 2.3095};

    for( size_t i = 0; i < tks.size(); ++i)
    {
        double t_k = tks[i];
        EXPECT_NEAR(mu_calc_ref[i], tp.mu(t_k), 5e-2);
    }
    tks.clear();

    EXPECT_NEAR(tp.mu_h(tp.h_t(900)), tp.mu(900), 6e-4);

    // Test Thermal Conductivity
    // Using values from reference https://doi.org/10.1016/j.ijheatmasstransfer.2015.07.042
    tks                              = {700.0, 773.0,  823.0,  873.0,  923.0,  973.0, 1000.0};
    // Expected calculated value
    std::vector<double> k_calc_ref  = {0.56, 0.6549, 0.7199, 0.7849, 0.8499, 0.9149, 0.95};

    for( size_t i = 0; i < tks.size(); ++i)
    {
        double t_k = tks[i];
        EXPECT_NEAR(k_calc_ref[i], tp.k(t_k), 5e-4);
    }
    EXPECT_NEAR(tp.k_h(tp.h_t(970)), tp.k(970), 1e-4);

    // Test temperature to enthalpy conversion
    EXPECT_NEAR(748.77152178380845, tp.t_h(1000), 1e-6);
    EXPECT_NEAR(tp.t_h(tp.h_t(970)),970,5e-2);
    EXPECT_NEAR(tp.t_h_kg(tp.h_t_kg(970)),970,5e-2);

    // Set an incomplete data sets to test validity functions
    tp.setComposition({"LiF","BeF2","ThF4"},{0.727,0.157,0.116});
    ASSERT_FALSE(tp.valid_rho());
    ASSERT_FALSE(tp.valid_k());
    ASSERT_FALSE(tp.valid_cp());
    ASSERT_TRUE(tp.valid_mu());
    tp.setComposition({"LiF","BeF2","ThF4"},{0.6998,0.1499,0.1503});
    ASSERT_FALSE(tp.valid_mu());
}
+0 −38
Original line number Diff line number Diff line
@@ -115,41 +115,3 @@ TEST(rk_data_store,input_order)
    ASSERT_FALSE(tp_rk.valid_cp());
    ASSERT_FALSE(tp_rk.valid_mu());
}

TEST(rk_data_store,full_load)
{
    // Set up the interpolation object
    R_Kister_Data_Store rk_DS; rk_DS.load("/home/oxh/dev/mstdb-tp/Molten_Salt_Thermophysical_Properties_RK.csv","/home/oxh/dev/mstdb-tp/Molten_Salt_Thermophysical_Properties.csv");
    Thermophysical_Properties tp_rk;
    ASSERT_TRUE(tp_rk.initialize(&rk_DS));

    std::vector<double> tks           = {1080,1130,1180,1230};
    tp_rk.setComposition({"LiF","NaF","KF"},{0.465,0.115,0.42});
    std::vector<double> ref(tks.size());
    for( size_t i = 0; i < tks.size(); ++i)
    {
        double t_k = tks[i];
        ref[i] = tp_rk.rho(t_k);
    }

    tp_rk.setComposition({"NaF","LiF","KF"},{0.115,0.465,0.42});
    for( size_t i = 0; i < tks.size(); ++i)
    {
        double t_k = tks[i];
        EXPECT_NEAR(tp_rk.rho(t_k),ref[i],1e-6);
    }

    tp_rk.setComposition({"KF","NaF","LiF"},{0.42,0.115,0.465});
    for( size_t i = 0; i < tks.size(); ++i)
    {
        double t_k = tks[i];
        EXPECT_NEAR(tp_rk.rho(t_k),ref[i],1e-6);
    }

    // Set an incomplete data sets to test validity functions
    tp_rk.setComposition({"LiF","UF3","ZrF4"},{0.80,0.07,0.13});
    ASSERT_FALSE(tp_rk.valid_rho());
    ASSERT_FALSE(tp_rk.valid_k());
    ASSERT_FALSE(tp_rk.valid_cp());
    ASSERT_FALSE(tp_rk.valid_mu());
}