59 std::string data_file = std::string(GRINS_TEST_SRCDIR)+
"/test_data/CO2_data.dat";
60 std::string partition_file = std::string(GRINS_TEST_SRCDIR)+
"/test_data/CO2_partition_function.dat";
62 libMesh::Real T_min = 290;
63 libMesh::Real T_max = 310;
64 libMesh::Real T_step = 0.01;
66 GRINS::HITRAN hitran(data_file,partition_file,T_min,T_max,T_step);
68 libMesh::Real tolerance = 1.0e-9;
71 CPPUNIT_ASSERT_DOUBLES_EQUAL(0,hitran.isotopologue(0),tolerance);
72 CPPUNIT_ASSERT_DOUBLES_EQUAL(3,hitran.isotopologue(20),tolerance);
73 CPPUNIT_ASSERT_DOUBLES_EQUAL(3682.70083,hitran.nu0(0),tolerance);
74 CPPUNIT_ASSERT_DOUBLES_EQUAL(3682.761088,hitran.nu0(20),tolerance);
75 CPPUNIT_ASSERT_DOUBLES_EQUAL(1.062e-30,hitran.sw(0),tolerance);
76 CPPUNIT_ASSERT_DOUBLES_EQUAL(1.48e-30,hitran.sw(20),tolerance);
77 CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0685,hitran.gamma_air(0),tolerance);
78 CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0679,hitran.gamma_air(20),tolerance);
79 CPPUNIT_ASSERT_DOUBLES_EQUAL(0.084,hitran.gamma_self(0),tolerance);
80 CPPUNIT_ASSERT_DOUBLES_EQUAL(0.08,hitran.gamma_self(20),tolerance);
81 CPPUNIT_ASSERT_DOUBLES_EQUAL(3253.949,hitran.elower(0),tolerance);
82 CPPUNIT_ASSERT_DOUBLES_EQUAL(1349.8942,hitran.elower(20),tolerance);
83 CPPUNIT_ASSERT_DOUBLES_EQUAL(0.76,hitran.n_air(0),tolerance);
84 CPPUNIT_ASSERT_DOUBLES_EQUAL(0.75,hitran.n_air(20),tolerance);
85 CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.008269,hitran.delta_air(0),tolerance);
86 CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.004588,hitran.delta_air(20),tolerance);
90 CPPUNIT_ASSERT_DOUBLES_EQUAL(279.609573308,hitran.partition_function(290.02,0),tolerance);
91 CPPUNIT_ASSERT_DOUBLES_EQUAL(563.425588693,hitran.partition_function(290.02,1),tolerance);
92 CPPUNIT_ASSERT_DOUBLES_EQUAL(593.852717624,hitran.partition_function(290.02,2),tolerance);
93 CPPUNIT_ASSERT_DOUBLES_EQUAL(3461.78001223,hitran.partition_function(290.02,3),tolerance);
96 CPPUNIT_ASSERT_DOUBLES_EQUAL(279.585269287,hitran.partition_function(290.0,0),tolerance);
97 CPPUNIT_ASSERT_DOUBLES_EQUAL(563.375898926,hitran.partition_function(290.0,1),tolerance);
98 CPPUNIT_ASSERT_DOUBLES_EQUAL(593.800881348,hitran.partition_function(290.0,2),tolerance);
99 CPPUNIT_ASSERT_DOUBLES_EQUAL(3461.47846875,hitran.partition_function(290.0,3),tolerance);
101 CPPUNIT_ASSERT_DOUBLES_EQUAL(304.559997559,hitran.partition_function(310.0,0),tolerance);
102 CPPUNIT_ASSERT_DOUBLES_EQUAL(614.489990234,hitran.partition_function(310.0,1),tolerance);
103 CPPUNIT_ASSERT_DOUBLES_EQUAL(647.090026855,hitran.partition_function(310.0,2),tolerance);
104 CPPUNIT_ASSERT_DOUBLES_EQUAL(3771.39990234,hitran.partition_function(310.0,3),tolerance);
108 CPPUNIT_ASSERT_DOUBLES_EQUAL(286.935573058,hitran.partition_function(296,0),tolerance);
109 CPPUNIT_ASSERT_DOUBLES_EQUAL(578.408361459,hitran.partition_function(296,1),tolerance);
110 CPPUNIT_ASSERT_DOUBLES_EQUAL(609.479752969,hitran.partition_function(296,2),tolerance);
111 CPPUNIT_ASSERT_DOUBLES_EQUAL(3552.67876127,hitran.partition_function(296,3),tolerance);
114 CPPUNIT_ASSERT_DOUBLES_EQUAL(593.813840240,hitran.partition_function(290.005,2),tolerance);
115 CPPUNIT_ASSERT_DOUBLES_EQUAL(291.9025545935294,hitran.partition_function(300+1.0e-6,0),1.0e-13);
116 CPPUNIT_ASSERT_DOUBLES_EQUAL(291.9137901096000,hitran.partition_function(300.009,0),1.0e-13);