1 #include "dipole_wall_collision_unsteady_quantity_check.h" 2 #include "flow_solver/flow_solver_factory.h" 3 #include "flow_solver/flow_solver_cases/dipole_wall_collision.h" 8 template <
int dim,
int nspecies,
int nstate>
11 const dealii::ParameterHandler ¶meter_handler_input)
13 , parameter_handler(parameter_handler_input)
14 , kinetic_energy_expected(parameters_input->flow_solver_param.expected_kinetic_energy_at_final_time)
15 , enstrophy_expected(parameters_input->flow_solver_param.expected_enstrophy_at_final_time)
16 , palinstrophy_expected(parameters_input->flow_solver_param.expected_palinstrophy_at_final_time)
19 template <
int dim,
int nspecies,
int nstate>
24 static_cast<void>(flow_solver->run());
27 std::unique_ptr<FlowSolver::DipoleWallCollision<dim, nspecies, nstate>> flow_solver_case = std::make_unique<FlowSolver::DipoleWallCollision<dim,nspecies,nstate>>(this->
all_parameters);
28 flow_solver_case->compute_and_update_integrated_quantities(*(flow_solver->dg));
29 const double kinetic_energy_computed = flow_solver_case->get_integrated_incompressible_kinetic_energy();
30 const double enstrophy_computed = flow_solver_case->get_integrated_incompressible_enstrophy();
31 const double palinstrophy_computed = flow_solver_case->get_integrated_incompressible_palinstrophy();
36 if (relative_error_kinetic_energy > 1.0e-10) {
37 pcout <<
"Computed kinetic energy is not within specified tolerance with respect to expected value." << std::endl;
40 if (relative_error_enstrophy > 1.0e-10) {
41 pcout <<
"Computed enstrophy is not within specified tolerance with respect to expected value." << std::endl;
44 if (relative_error_palinstrophy > 1.0e-10) {
45 pcout <<
"Computed palinstrophy is not within specified tolerance with respect to expected value." << std::endl;
48 pcout <<
" Test passed, computed kinetic energy, enstrophy, and palinstrophy are within specified tolerance." << std::endl;
const double palinstrophy_expected
Expected palinstrophy at final time.
const double kinetic_energy_expected
Expected kinetic energy at final time.
Files for the baseline physics.
static std::unique_ptr< FlowSolver< dim, nspecies, nstate > > select_flow_case(const Parameters::AllParameters *const parameters_input, const dealii::ParameterHandler ¶meter_handler_input)
Factory to return the correct flow solver given input file.
Main parameter class that contains the various other sub-parameter classes.
const dealii::ParameterHandler & parameter_handler
Parameter handler for storing the .prm file being ran.
const Parameters::AllParameters *const all_parameters
Pointer to all parameters.
const double enstrophy_expected
Expected enstrophy at final time.
Dipole Wall Collision Unsteady Quantity Check.
int run_test() const override
Run test.
DipoleWallCollisionUnsteadyQuantityCheck(const Parameters::AllParameters *const parameters_input, const dealii::ParameterHandler ¶meter_handler_input)
Constructor.
dealii::ConditionalOStream pcout
ConditionalOStream.
Base class of all the tests.