Commit 2d8911a1 authored by steffen.schotthoefer's avatar steffen.schotthoefer
Browse files

added MaxwellBoltzmann Entropy test case

parent ed03c9ae
Pipeline #102130 passed with stages
in 32 minutes and 30 seconds
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Linesource Benchmarking File MN %
% Author <Steffen Schotthöfer> %
% Date 01.07.2020 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% ---- File specifications ----
OUTPUT_DIR = ../../result
OUTPUT_FILE = rtsn_test_linesource_MN_MB
LOG_DIR = ../../result/logs
MESH_FILE = linesource.su2
% ---- Solver specifications ----
CFL_NUMBER = 0.7
TIME_FINAL = 0.3
PROBLEM = LINESOURCE
SOLVER = MN_SOLVER
MAX_MOMENT_SOLVER = 2
ENTROPY_FUNCTIONAL = MAXWELL_BOLZMANN
ENTROPY_OPTIMIZER = NEWTON
%
% ----- Newton Solver Specifications ----
%
NEWTON_FAST_MODE = NO
NEWTON_ITER = 1000
NEWTON_EPSILON = 0.01
NEWTON_STEP_SIZE = 0.7
NEWTON_LINE_SEARCH_ITER = 1000
%
% ---- Boundary Conditions ----
%
BC_DIRICHLET = ( void )
%
% ---- Quadrature ----
%
QUAD_TYPE = GAUSS_LEGENDRE_TENSORIZED
QUAD_ORDER = 8
This diff is collapsed.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Linesource Benchmarking File MN %
% Author <Steffen Schotthöfer> %
% Date 01.07.2020 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% ---- File specifications ----
OUTPUT_DIR = ../../result
OUTPUT_FILE = rtsn_test_linesource_MN_Quad
LOG_DIR = ../../result/logs
MESH_FILE = linesource.su2
% ---- Solver specifications ----
CFL_NUMBER = 0.7
TIME_FINAL = 0.3
PROBLEM = LINESOURCE
SOLVER = MN_SOLVER
MAX_MOMENT_SOLVER = 2
ENTROPY_FUNCTIONAL = QUADRATIC
ENTROPY_OPTIMIZER = NEWTON
%% Skip Newton Solver
NEWTON_FAST_MODE = YES
%
% ---- Boundary Conditions ----
BC_DIRICHLET = ( void )
QUAD_TYPE = GAUSS_LEGENDRE_TENSORIZED
QUAD_ORDER = 4
This diff is collapsed.
......@@ -85,19 +85,40 @@ TEST_CASE( "linesource_PN", "[validation_tests]" ) {
}
TEST_CASE( "linesource_MN", "[validation_tests]" ) {
char config_file_name[MAX_STRING_SIZE] = "../tests/input/linesource_MN.cfg";
Config* config = new Config( config_file_name );
Solver* solver = Solver::Create( config );
solver->Solve();
solver->Save();
SECTION( "Quadratic Entropy" ) {
char config_file_name[MAX_STRING_SIZE] = "../tests/input/linesource_MN_Quad.cfg";
auto test = readVTKFile( "../result/rtsn_test_linesource_MN.vtk" );
auto reference = readVTKFile( "../tests/input/linesource_MN_reference.vtk" );
Config* config = new Config( config_file_name );
Solver* solver = Solver::Create( config );
solver->Solve();
solver->Save();
double eps = 1e-3;
REQUIRE( test.size() == reference.size() );
for( unsigned i = 0; i < test.size(); ++i ) {
REQUIRE( std::fabs( test[i] - reference[i] ) < eps );
auto test = readVTKFile( "../result/rtsn_test_linesource_MN_Quad.vtk" );
auto reference = readVTKFile( "../tests/input/linesource_MN_Quad_reference.vtk" );
double eps = 1e-3;
REQUIRE( test.size() == reference.size() );
for( unsigned i = 0; i < test.size(); ++i ) {
REQUIRE( std::fabs( test[i] - reference[i] ) < eps );
}
}
SECTION( "Maxwell Boltzmann Entropy" ) {
char config_file_name[MAX_STRING_SIZE] = "../tests/input/linesource_MN_MB.cfg";
Config* config = new Config( config_file_name );
Solver* solver = Solver::Create( config );
solver->Solve();
solver->Save();
auto test = readVTKFile( "../result/rtsn_test_linesource_MN_MB.vtk" );
auto reference = readVTKFile( "../tests/input/linesource_MN_MB_reference.vtk" );
double eps = 1e-3;
REQUIRE( test.size() == reference.size() );
for( unsigned i = 0; i < test.size(); ++i ) {
REQUIRE( std::fabs( test[i] - reference[i] ) < eps );
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment