GRINS-0.8.0
List of all members | Public Member Functions | Private Attributes
GRINSTesting::AntiochConstantTransportMixtureBuilderTest Class Reference
Inheritance diagram for GRINSTesting::AntiochConstantTransportMixtureBuilderTest:
Inheritance graph
[legend]
Collaboration diagram for GRINSTesting::AntiochConstantTransportMixtureBuilderTest:
Collaboration graph
[legend]

Public Member Functions

 CPPUNIT_TEST_SUITE (AntiochConstantTransportMixtureBuilderTest)
 
 CPPUNIT_TEST (test_build_constant_viscosity)
 
 CPPUNIT_TEST (test_build_constant_conductivity)
 
 CPPUNIT_TEST (test_build_constant_prandtl_conductivity)
 
 CPPUNIT_TEST (test_build_constant_lewis_diff)
 
 CPPUNIT_TEST (test_build_cea_constcond_mix)
 
 CPPUNIT_TEST (test_build_cea_constpr_mix)
 
 CPPUNIT_TEST_SUITE_END ()
 
void setUp ()
 
void test_build_constant_viscosity ()
 
void test_build_constant_conductivity ()
 
void test_build_constant_prandtl_conductivity ()
 
void test_build_constant_lewis_diff ()
 
void test_build_cea_constcond_mix ()
 
void test_build_cea_constpr_mix ()
 

Private Attributes

libMesh::UniquePtr< GetPot > _input
 

Detailed Description

Definition at line 133 of file antioch_mixture_builder_test.C.

Member Function Documentation

GRINSTesting::AntiochConstantTransportMixtureBuilderTest::CPPUNIT_TEST ( test_build_constant_viscosity  )
GRINSTesting::AntiochConstantTransportMixtureBuilderTest::CPPUNIT_TEST ( test_build_constant_conductivity  )
GRINSTesting::AntiochConstantTransportMixtureBuilderTest::CPPUNIT_TEST ( test_build_constant_prandtl_conductivity  )
GRINSTesting::AntiochConstantTransportMixtureBuilderTest::CPPUNIT_TEST ( test_build_constant_lewis_diff  )
GRINSTesting::AntiochConstantTransportMixtureBuilderTest::CPPUNIT_TEST ( test_build_cea_constcond_mix  )
GRINSTesting::AntiochConstantTransportMixtureBuilderTest::CPPUNIT_TEST ( test_build_cea_constpr_mix  )
GRINSTesting::AntiochConstantTransportMixtureBuilderTest::CPPUNIT_TEST_SUITE ( AntiochConstantTransportMixtureBuilderTest  )
GRINSTesting::AntiochConstantTransportMixtureBuilderTest::CPPUNIT_TEST_SUITE_END ( )
void GRINSTesting::AntiochConstantTransportMixtureBuilderTest::setUp ( )
inline

Definition at line 149 of file antioch_mixture_builder_test.C.

References _input.

150  {
151  std::string input_file = std::string(GRINS_TEST_SRCDIR)+"/input_files/antioch.in";
152  _input.reset( new GetPot(input_file) );
153  }
void GRINSTesting::AntiochConstantTransportMixtureBuilderTest::test_build_cea_constcond_mix ( )
inline

Definition at line 214 of file antioch_mixture_builder_test.C.

References _input, and GRINS::AntiochConstantTransportMixtureBuilder::build_mixture().

215  {
217 
218  libMesh::UniquePtr<GRINS::AntiochConstantTransportMixture<Antioch::CEACurveFit<libMesh::Real>,
220  mixture = builder.build_mixture<Antioch::CEACurveFit<libMesh::Real>,GRINS::ConstantConductivity>
221  (*_input, "TestMaterial");
222 
223  libMesh::Real mu = mixture->mu();
224  libMesh::Real k = (mixture->conductivity())();
225 
226  libMesh::Real rho = 1.2;
227  libMesh::Real cp = 2.3;
228 
229  libMesh::Real Le = 1.4;
230 
231  libMesh::Real D = mixture->diffusivity().D(rho,cp,k);
232 
233  libMesh::Real D_exact = k/rho/cp/Le;
234 
235  CPPUNIT_ASSERT_DOUBLES_EQUAL( 3.14, mu, std::numeric_limits<libMesh::Real>::epsilon() );
236  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.71, k, std::numeric_limits<libMesh::Real>::epsilon() );
237  CPPUNIT_ASSERT_DOUBLES_EQUAL( D_exact, D, std::numeric_limits<libMesh::Real>::epsilon() );
238  }
libMesh::UniquePtr< AntiochConstantTransportMixture< KineticsThermoCurveFit, Conductivity > > build_mixture(const GetPot &input, const std::string &material)
void GRINSTesting::AntiochConstantTransportMixtureBuilderTest::test_build_cea_constpr_mix ( )
inline

Definition at line 240 of file antioch_mixture_builder_test.C.

References _input, and GRINS::AntiochConstantTransportMixtureBuilder::build_mixture().

241  {
243 
244  libMesh::UniquePtr<GRINS::AntiochConstantTransportMixture<Antioch::CEACurveFit<libMesh::Real>,
246  mixture = builder.build_mixture<Antioch::CEACurveFit<libMesh::Real>,GRINS::ConstantPrandtlConductivity>
247  (*_input, "TestMaterial");
248 
249  libMesh::Real mu = mixture->mu();
250  libMesh::Real cp = 2.3;
251  libMesh::Real Pr = 0.7;
252  libMesh::Real k = (mixture->conductivity())(mu, cp);
253  libMesh::Real k_exact = mu*cp/Pr;
254 
255  libMesh::Real rho = 1.2;
256 
257  libMesh::Real Le = 1.4;
258 
259  libMesh::Real D = mixture->diffusivity().D(rho,cp,k);
260 
261  libMesh::Real D_exact = k/rho/cp/Le;
262 
263  CPPUNIT_ASSERT_DOUBLES_EQUAL( 3.14, mu, std::numeric_limits<libMesh::Real>::epsilon() );
264  CPPUNIT_ASSERT_DOUBLES_EQUAL( k_exact, k, std::numeric_limits<libMesh::Real>::epsilon() );
265  CPPUNIT_ASSERT_DOUBLES_EQUAL( D_exact, D, std::numeric_limits<libMesh::Real>::epsilon() );
266  }
libMesh::UniquePtr< AntiochConstantTransportMixture< KineticsThermoCurveFit, Conductivity > > build_mixture(const GetPot &input, const std::string &material)
void GRINSTesting::AntiochConstantTransportMixtureBuilderTest::test_build_constant_conductivity ( )
inline

Definition at line 167 of file antioch_mixture_builder_test.C.

References _input, and GRINS::AntiochConstantTransportMixtureBuilder::build_constant_conductivity().

168  {
170 
171  libMesh::UniquePtr<GRINS::ConstantConductivity> conductivity =
173 
174  libMesh::Real k = (*conductivity)();
175 
176  CPPUNIT_ASSERT_DOUBLES_EQUAL( 2.71, k, std::numeric_limits<libMesh::Real>::epsilon() );
177  }
libMesh::UniquePtr< Conductivity > build_constant_conductivity(const GetPot &input, const std::string &material)
void GRINSTesting::AntiochConstantTransportMixtureBuilderTest::test_build_constant_lewis_diff ( )
inline

Definition at line 195 of file antioch_mixture_builder_test.C.

References _input, and GRINS::AntiochConstantTransportMixtureBuilder::build_constant_lewis_diff().

196  {
198 
199  libMesh::UniquePtr<Antioch::ConstantLewisDiffusivity<libMesh::Real> > diff =
200  builder.build_constant_lewis_diff( *_input, "TestMaterial" );
201 
202  libMesh::Real rho = 1.2;
203  libMesh::Real cp = 2.3;
204  libMesh::Real k = 3.4;
205  libMesh::Real Le = 1.4;
206 
207  libMesh::Real D = diff->D(rho,cp,k);
208 
209  libMesh::Real D_exact = k/rho/cp/Le;
210 
211  CPPUNIT_ASSERT_DOUBLES_EQUAL( D_exact, D, std::numeric_limits<libMesh::Real>::epsilon() );
212  }
libMesh::UniquePtr< Antioch::ConstantLewisDiffusivity< libMesh::Real > > build_constant_lewis_diff(const GetPot &input, const std::string &material)
void GRINSTesting::AntiochConstantTransportMixtureBuilderTest::test_build_constant_prandtl_conductivity ( )
inline

Definition at line 179 of file antioch_mixture_builder_test.C.

References _input, and GRINS::AntiochConstantTransportMixtureBuilder::build_constant_conductivity().

180  {
182 
183  libMesh::UniquePtr<GRINS::ConstantPrandtlConductivity> conductivity =
185 
186  libMesh::Real mu = 1.2;
187  libMesh::Real cp = 2.3;
188  libMesh::Real Pr = 0.7;
189  libMesh::Real k = (*conductivity)( mu, cp );
190  libMesh::Real k_exact = mu*cp/Pr;
191 
192  CPPUNIT_ASSERT_DOUBLES_EQUAL( k_exact, k, std::numeric_limits<libMesh::Real>::epsilon() );
193  }
libMesh::UniquePtr< Conductivity > build_constant_conductivity(const GetPot &input, const std::string &material)
void GRINSTesting::AntiochConstantTransportMixtureBuilderTest::test_build_constant_viscosity ( )
inline

Definition at line 155 of file antioch_mixture_builder_test.C.

References _input, and GRINS::AntiochConstantTransportMixtureBuilder::build_constant_viscosity().

156  {
158 
159  libMesh::UniquePtr<GRINS::ConstantViscosity> visc =
160  builder.build_constant_viscosity( *_input, "TestMaterial" );
161 
162  libMesh::Real mu = (*visc)();
163 
164  CPPUNIT_ASSERT_DOUBLES_EQUAL( 3.14, mu, std::numeric_limits<libMesh::Real>::epsilon() );
165  }
libMesh::UniquePtr< ConstantViscosity > build_constant_viscosity(const GetPot &input, const std::string &material)

Member Data Documentation

libMesh::UniquePtr<GetPot> GRINSTesting::AntiochConstantTransportMixtureBuilderTest::_input
private

The documentation for this class was generated from the following file:

Generated on Tue Dec 19 2017 12:47:32 for GRINS-0.8.0 by  doxygen 1.8.9.1