1 #ifndef __PERIODIC_TURBULENCE_H__ 2 #define __PERIODIC_TURBULENCE_H__ 4 #include <deal.II/base/table.h> 6 #include "dg/dg_base.hpp" 7 #include "periodic_cube_flow.h" 8 #include "physics/navier_stokes.h" 11 namespace FlowSolver {
13 template <
int dim,
int nspecies,
int nstate>
27 const double current_time,
96 const unsigned int output_file_index,
97 const double current_time)
const;
105 const double FR_entropy_contribution_RRK_solver,
106 const unsigned int current_iteration,
164 double compute_angular_momentum(
const dealii::Point<dim> position,
const dealii::Tensor<1,3,double> vorticity)
const;
171 const std::shared_ptr<dealii::TableHandler> unsteady_data_table,
172 const bool do_write_unsteady_data_table_file)
override;
180 viscosity_times_deviatoric_strain_rate_tensor_magnitude_sqr,
181 viscosity_times_strain_rate_tensor_magnitude_sqr,
182 incompressible_kinetic_energy,
183 incompressible_enstrophy,
184 incompressible_palinstrophy,
void update_maximum_local_wave_speed(DGBase< dim, nspecies, double > &dg) override
Updates the maximum local wave speed.
const bool output_vorticity_magnitude_field_in_addition_to_velocity
Flag for outputting vorticity magnitude field in addition to velocity field at fixed times...
void compute_and_update_integrated_quantities(DGBase< dim, nspecies, double > &dg)
const bool output_viscosity_field_in_addition_to_velocity
Flag for outputting viscosity field in addition to velocity field at fixed times. ...
const bool do_compute_angular_momentum
Flag to compute angular momentum.
virtual void display_additional_flow_case_specific_parameters() const override
Display additional more specific flow case parameters.
const unsigned int output_velocity_number_of_subvisions
Number of subdivisions to apply when writting the velocity field at equidistant nodes.
Files for the baseline physics.
double get_adaptive_time_step(std::shared_ptr< DGBase< dim, nspecies, double >> dg) const override
Function to compute the adaptive time step.
double cumulative_numerical_entropy_change_FRcorrected
Cumulative change in numerical entropy.
std::array< double, NUMBER_OF_INTEGRATED_QUANTITIES > integrated_quantities
Array for storing the integrated quantities; done for computational efficiency.
std::shared_ptr< Physics::NavierStokes< dim, nspecies, dim+2, double > > navier_stokes_physics
Pointer to Navier-Stokes physics object for computing things on the fly.
bool is_viscous_flow
Identifies if viscous flow; initialized as true.
std::string flow_field_quantity_filename_prefix
Flow field quantity filename prefix.
double get_strain_rate_tensor_based_dissipation_rate() const
Main parameter class that contains the various other sub-parameter classes.
bool do_calculate_numerical_entropy
Identifies if numerical entropy should be calculated; initialized as false.
dealii::Table< 1, double > output_velocity_field_times
Times at which to output the velocity field.
double initial_numerical_entropy_abs
Numerical entropy at initial time.
const std::string unsteady_data_table_filename_with_extension
Filename (with extension) for the unsteady data table.
double previous_numerical_entropy
Numerical entropy at previous timestep.
double get_integrated_incompressible_enstrophy() const
Gets the nondimensional integrated incompressible enstrophy given a DG object from dg->solution...
double compute_angular_momentum(const dealii::Point< dim > position, const dealii::Tensor< 1, 3, double > vorticity) const
Function to compute the angular momentum.
const bool output_solution_at_exact_fixed_times
Flag for outputting the solution at exact fixed times by decreasing the time step on the fly...
PeriodicTurbulence(const Parameters::AllParameters *const parameters_input)
Constructor.
double get_integrated_kinetic_energy() const
double get_numerical_entropy(const std::shared_ptr< DGBase< dim, nspecies, double >>) const
Retrieves cumulative_numerical_entropy_change_FRcorrected.
double get_integrated_incompressible_kinetic_energy() const
Gets the nondimensional integrated incompressible kinetic energy given a DG object from dg->solution...
void update_numerical_entropy(const double FR_entropy_contribution_RRK_solver, const unsigned int current_iteration, const std::shared_ptr< DGBase< dim, nspecies, double >> dg)
Update numerical entropy variables.
double integrated_kinetic_energy_at_previous_time_step
Integrated kinetic energy over the domain at previous time step; used for ensuring a physically consi...
const std::string output_flow_field_files_directory_name
Directory for writting flow field files.
double get_integrated_angular_momentum() const
Gets the nondimensional integrated angular momentum given a DG object from dg->solution.
const unsigned int number_of_times_to_output_velocity_field
Number of times to output the velocity field.
void output_velocity_field(std::shared_ptr< DGBase< dim, nspecies, double >> dg, const unsigned int output_file_index, const double current_time) const
Output the velocity field to file.
const bool output_density_field_in_addition_to_velocity
Flag for outputting density field in addition to velocity field at fixed times.
void output_velocity_field_if_current_time_is_output_time(const double current_time, const std::shared_ptr< DGBase< dim, nspecies, double >> dg)
Outputs the velocity field if the current time is an output time for the velocity field...
IntegratedQuantitiesEnum
List of possible integrated quantities over the domain.
virtual void compute_unsteady_data_and_write_to_table(const std::shared_ptr< ODE::ODESolverBase< dim, nspecies, double >> ode_solver, const std::shared_ptr< DGBase< dim, nspecies, double >> dg, const std::shared_ptr< dealii::TableHandler > unsteady_data_table, const bool do_write_unsteady_data_table_file) override
Compute the desired unsteady data and write it to a table.
static const int NUMBER_OF_INTEGRATED_QUANTITIES
bool is_taylor_green_vortex
Identifies if taylor green vortex case; initialized as false.
std::shared_ptr< dealii::TableHandler > exact_output_times_of_velocity_field_files_table
Data table storing the exact output times for the velocity field files.
double get_integrated_incompressible_palinstrophy() const
Gets the nondimensional integrated incompressible palinstrophy given a DG object from dg->solution...
double get_integrated_enstrophy() const
DGBase is independent of the number of state variables.
double get_constant_time_step(std::shared_ptr< DGBase< dim, nspecies, double >> dg) const override
Function to compute the constant time step.
double get_vorticity_based_dissipation_rate() const
bool is_decaying_homogeneous_isotropic_turbulence
Identified if DHIT case; initialized as false.
virtual unsigned int get_number_of_degrees_of_freedom_per_state_from_poly_degree(const unsigned int poly_degree_input) const
Get the number of degrees of freedom per state from a given poly degree.
double get_deviatoric_strain_rate_tensor_based_dissipation_rate() const
unsigned int index_of_current_desired_time_to_output_velocity_field
Index of current desired time to output velocity field.
double get_pressure_dilatation_based_dissipation_rate() const
double compute_current_integrated_numerical_entropy(const std::shared_ptr< DGBase< dim, nspecies, double >> dg) const
Calculate numerical entropy by matrix-vector product.
const bool output_velocity_field_at_fixed_times
Flag for outputting velocity field at fixed times.