1 #include "taylor_green_vortex_energy_check.h" 2 #include "flow_solver/flow_solver_factory.h" 3 #include "flow_solver/flow_solver_cases/periodic_turbulence.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 , theoretical_dissipation_rate_expected(parameters_input->flow_solver_param.expected_theoretical_dissipation_rate_at_final_time)
18 template <
int dim,
int nspecies,
int nstate>
27 static_cast<void>(flow_solver->run());
30 std::unique_ptr<FlowSolver::PeriodicTurbulence<dim, nspecies, nstate>> flow_solver_case = std::make_unique<FlowSolver::PeriodicTurbulence<dim,nspecies,nstate>>(¶meters);
31 flow_solver_case->compute_and_update_integrated_quantities(*(flow_solver->dg));
32 const double kinetic_energy_computed = flow_solver_case->get_integrated_kinetic_energy();
33 const double theoretical_dissipation_rate_computed = flow_solver_case->get_vorticity_based_dissipation_rate();
37 if (relative_error_kinetic_energy > 1.0e-10) {
38 pcout <<
"Computed kinetic energy is not within specified tolerance with respect to expected value." << std::endl;
41 if (relative_error_theoretical_dissipation_rate > 1.0e-10) {
42 pcout <<
"Computed theoretical dissipation rate is not within specified tolerance with respect to expected value." << std::endl;
45 pcout <<
" Test passed, computed kinetic energy and theoretical dissipation rate are within specified tolerance." << std::endl;
49 #if PHILIP_DIM==3 && PHILIP_SPECIES==1 NonPhysicalBehaviorEnum non_physical_behavior_type
Specify behavior on nonphysical results.
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 Parameters::AllParameters *const all_parameters
Pointer to all parameters.
const double kinetic_energy_expected
Expected kinetic energy at final time.
const double theoretical_dissipation_rate_expected
Expected theoretical dissipation rate at final time.
int run_test() const override
Run test.
const dealii::ParameterHandler & parameter_handler
Parameter handler for storing the .prm file being ran.
TaylorGreenVortexEnergyCheck(const Parameters::AllParameters *const parameters_input, const dealii::ParameterHandler ¶meter_handler_input)
Constructor.
Taylor Green Vortex Energy Check.
dealii::ConditionalOStream pcout
ConditionalOStream.
Base class of all the tests.