COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
utest-physics-navierstokes-cons2d.cpp
Go to the documentation of this file.
1 // Copyright (C) 2010-2013 von Karman Institute for Fluid Dynamics, Belgium
2 //
3 // This software is distributed under the terms of the
4 // GNU Lesser General Public License version 3 (LGPLv3).
5 // See doc/lgpl.txt and doc/gpl.txt for the license text.
6 
7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test module for cf3::physics::NavierStokes::Cons2D"
9 
10 #include <boost/test/unit_test.hpp>
11 
12 #include "cf3/common/Log.hpp"
13 #include "cf3/common/Core.hpp"
15 
17 
18 using namespace cf3;
19 using namespace cf3::common;
21 
23 
24 BOOST_AUTO_TEST_SUITE( NavierStokes_Cons2D_Suite )
25 
26 
28 BOOST_AUTO_TEST_CASE( test_navierstokes2d )
29 {
30  Data p;
31 
32  p.mu = 4.;
33  p.kappa = 0.5;
34  p.U[0] = 2.;
35  p.U[1] = 2.;
36  p.grad_u << 3., 2.;
37  p.grad_v << 2., 3.;
38  p.grad_T << 3., 3.;
39 
40  RowVector_NEQS flux;
42  normal << 1., 1.;
43  compute_diffusive_flux(p,normal,flux);
44  RowVector_NEQS check; check << 0, 24, 24, 99;
45  BOOST_CHECK(flux == check);
46 }
47 
49 
50 BOOST_AUTO_TEST_SUITE_END()
51 
52 
boost::proto::terminal< SFOp< NormalOp > >::type const normal
void compute_diffusive_flux(const Data &p, const ColVector_NDIM &normal, RowVector_NEQS &flux, Real &wave_speed)
Diffusive flux in conservative form.
Definition: Functions.cpp:18
ColVector_NDIM grad_T
gradient of temperature
Definition: Data.hpp:33
MatrixTypes< NDIM, NEQS >::RowVector_NEQS RowVector_NEQS
Definition: Types.hpp:22
ColVector_NDIM grad_v
gradient of y velocity
Definition: Data.hpp:32
MatrixTypes< NDIM, NEQS >::ColVector_NDIM ColVector_NDIM
Definition: Types.hpp:23
Definition: check.py:1
ColVector_NDIM U
velocity
Definition: Data.hpp:38
ColVector_NDIM grad_u
gradient of x velocity
Definition: Data.hpp:31
BOOST_AUTO_TEST_CASE(test_navierstokes2d)
Top-level namespace for coolfluid.
Definition: Action.cpp:18
Real kappa
Thermal conductivity.
Definition: Data.hpp:27
Most basic kernel library.
Definition: Action.cpp:19
Send comments to:
COOLFluiD Web Admin