1 #include "turbulent_channel_flow_unsteady_quantity_check.h" 2 #include "flow_solver/flow_solver_factory.h" 3 #include "flow_solver/flow_solver_cases/channel_flow.h" 8 template <
int dim,
int nspecies,
int nstate>
11 const dealii::ParameterHandler ¶meter_handler_input)
13 , parameter_handler(parameter_handler_input)
14 , average_wall_shear_stress_expected(parameters_input->flow_solver_param.expected_average_wall_shear_stress_at_final_time)
15 , skin_friction_coefficient_expected(parameters_input->flow_solver_param.expected_skin_friction_coefficient_at_final_time)
16 , using_wall_model(parameters_input->using_wall_model)
19 template <
int dim,
int nspecies,
int nstate>
24 static_cast<void>(flow_solver->run());
27 std::unique_ptr<FlowSolver::ChannelFlow<dim, nspecies, nstate>> flow_solver_case = std::make_unique<FlowSolver::ChannelFlow<dim,nspecies,nstate>>(this->
all_parameters);
28 flow_solver_case->compute_and_update_integrated_quantities(*(flow_solver->dg));
30 double average_wall_shear_stress = 0.0;
31 if(
using_wall_model) average_wall_shear_stress = flow_solver_case->get_average_wall_shear_stress_from_wall_model(*(flow_solver->dg));
32 else average_wall_shear_stress = flow_solver_case->get_average_wall_shear_stress(*(flow_solver->dg));
33 flow_solver_case->set_bulk_flow_quantities(*(flow_solver->dg));
34 const double skin_friction_coefficient = flow_solver_case->get_skin_friction_coefficient_from_average_wall_shear_stress(average_wall_shear_stress);
39 if (relative_error_average_wall_shear_stress > 1.0e-10) {
40 pcout <<
"Computed average wall shear stress is not within specified tolerance with respect to expected value." << std::endl;
43 if (relative_error_skin_friction_coefficient > 1.0e-10) {
44 pcout <<
"Computed skin friction coefficient is not within specified tolerance with respect to expected value." << std::endl;
47 pcout <<
" Test passed, computed average wall shear stress, and skin friction coefficient are within specified tolerance." << std::endl;
const dealii::ParameterHandler & parameter_handler
Parameter handler for storing the .prm file being ran.
const double skin_friction_coefficient_expected
Expected skin friction coefficient at final time.
Turbulent Channel Flow Unsteady Quantity Check.
const double average_wall_shear_stress_expected
Expected average wall shear stress 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.
int run_test() const override
Run test.
const Parameters::AllParameters *const all_parameters
Pointer to all parameters.
TurbulentChannelFlowUnsteadyQuantityCheck(const Parameters::AllParameters *const parameters_input, const dealii::ParameterHandler ¶meter_handler_input)
Constructor.
dealii::ConditionalOStream pcout
ConditionalOStream.
const bool using_wall_model
Flag for using wall model.
Base class of all the tests.