[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
PHiLiP::FlowSolver::ChannelFlow< dim, nspecies, nstate > Class Template Reference
Inheritance diagram for PHiLiP::FlowSolver::ChannelFlow< dim, nspecies, nstate >:
Collaboration diagram for PHiLiP::FlowSolver::ChannelFlow< dim, nspecies, nstate >:

Public Member Functions

 ChannelFlow (const Parameters::AllParameters *const parameters_input)
 Constructor.
 
 ~ChannelFlow ()
 Destructor.
 
std::shared_ptr< Triangulation > generate_grid () const override
 Function to generate the grid.
 
void set_higher_order_grid (std::shared_ptr< DGBase< dim, nspecies, double >> dg) const override
 Function to set the higher order grid.
 
double get_adaptive_time_step (std::shared_ptr< DGBase< dim, nspecies, double >> dg) const override
 Function to compute the adaptive time step.
 
double get_adaptive_time_step_initial (std::shared_ptr< DGBase< dim, nspecies, double >> dg) override
 Function to compute the initial adaptive time step.
 
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.
 
unsigned int get_number_of_degrees_of_freedom_per_state_from_poly_degree (const unsigned int poly_degree_input) const override
 Get the number of degrees of freedom per state from a given poly degree.
 
double get_average_wall_shear_stress (DGBase< dim, nspecies, double > &dg) const
 Get the average wall shear stress. More...
 
double get_average_wall_shear_stress_from_wall_model (DGBase< dim, nspecies, double > &dg) const
 Get the average wall shear stress from wall model. More...
 
double get_bulk_density () const
 Getter for the bulk density.
 
double get_bulk_velocity () const
 Getter for the bulk velocity.
 
double get_bulk_mass_flow_rate () const
 Getter for the bulk mass flow rate.
 
double get_skin_friction_coefficient_from_average_wall_shear_stress (const double avg_wall_shear_stress) const
 Get the skin friction coefficient from the average wall shear stress.
 
void set_bulk_flow_quantities (DGBase< dim, nspecies, double > &dg)
 Set the bulk flow quantities. More...
 
- Public Member Functions inherited from PHiLiP::FlowSolver::PeriodicTurbulence< dim, nspecies, nstate >
 PeriodicTurbulence (const Parameters::AllParameters *const parameters_input)
 Constructor. More...
 
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.
 
void compute_and_update_integrated_quantities (DGBase< dim, nspecies, double > &dg)
 
double get_integrated_kinetic_energy () const
 
double get_integrated_enstrophy () const
 
double get_integrated_incompressible_kinetic_energy () const
 Gets the nondimensional integrated incompressible kinetic energy given a DG object from dg->solution.
 
double get_integrated_incompressible_enstrophy () const
 Gets the nondimensional integrated incompressible enstrophy given a DG object from dg->solution.
 
double get_integrated_incompressible_palinstrophy () const
 Gets the nondimensional integrated incompressible palinstrophy given a DG object from dg->solution.
 
double get_integrated_angular_momentum () const
 Gets the nondimensional integrated angular momentum given a DG object from dg->solution.
 
double get_vorticity_based_dissipation_rate () const
 
double get_pressure_dilatation_based_dissipation_rate () const
 
double get_deviatoric_strain_rate_tensor_based_dissipation_rate () const
 
double get_strain_rate_tensor_based_dissipation_rate () const
 
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.
 
double compute_current_integrated_numerical_entropy (const std::shared_ptr< DGBase< dim, nspecies, double >> dg) const
 Calculate numerical entropy by matrix-vector product.
 
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 get_numerical_entropy (const std::shared_ptr< DGBase< dim, nspecies, double >>) const
 Retrieves cumulative_numerical_entropy_change_FRcorrected.
 
double get_constant_time_step (std::shared_ptr< DGBase< dim, nspecies, double >> dg) const override
 Function to compute the constant time step.
 
- Public Member Functions inherited from PHiLiP::FlowSolver::PeriodicCubeFlow< dim, nspecies, nstate >
 PeriodicCubeFlow (const Parameters::AllParameters *const parameters_input)
 Constructor.
 
- Public Member Functions inherited from PHiLiP::FlowSolver::CubeFlow_UniformGrid< dim, nspecies, nstate >
 CubeFlow_UniformGrid (const Parameters::AllParameters *const parameters_input)
 
- Public Member Functions inherited from PHiLiP::FlowSolver::FlowSolverCaseBase< dim, nspecies, nstate >
 FlowSolverCaseBase (const Parameters::AllParameters *const parameters_input)
 Constructor.
 
virtual ~FlowSolverCaseBase ()=default
 Destructor.
 
void display_flow_solver_setup (std::shared_ptr< DGBase< dim, nspecies, double >> dg) const
 Displays the flow setup parameters.
 
virtual void steady_state_postprocessing (std::shared_ptr< DGBase< dim, nspecies, double >> dg) const
 Virtual function for postprocessing when solving for steady state.
 
virtual void compute_time_averaged_solution (const std::shared_ptr< ODE::ODESolverBase< dim, nspecies, double >> ode_solver, const std::shared_ptr< DGBase< dim, nspecies, double >> dg, const double time_step)
 Virtual function for computing time-averaged solution for turbulent cases.
 
virtual void compute_Reynolds_stress (const std::shared_ptr< ODE::ODESolverBase< dim, nspecies, double >> ode_solver, const std::shared_ptr< DGBase< dim, nspecies, double >> dg, const double time_step)
 Virtual function for computing time-averaged Reynolds Stresses for turbulent cases.
 
void set_time_step (const double time_step_input)
 Setter for time step.
 
virtual void modify_dg_object (std::shared_ptr< DGBase< dim, nspecies, double >> dg) const
 Allows user to modify DG object during flow solver routines.
 
void add_value_to_data_table (const double value, const std::string value_string, const std::shared_ptr< dealii::TableHandler > data_table) const
 Add a value to a given data table with scientific format.
 

Protected Member Functions

void display_additional_flow_case_specific_parameters () const override
 Display additional more specific flow case parameters.
 
void display_grid_parameters () const override
 Display grid parameters.
 
std::vector< double > get_mesh_step_size_y_direction () const
 Return a vector of mesh step sizes in the y-direction based on the desired stretching function.
 
std::vector< double > get_mesh_step_size_y_direction_HOPW () const
 
std::vector< double > get_mesh_step_size_y_direction_Gullbrand () const
 
std::vector< double > get_mesh_step_size_y_direction_carton_de_wiart_et_al () const
 
- Protected Member Functions inherited from PHiLiP::FlowSolver::PeriodicTurbulence< dim, nspecies, nstate >
double get_adaptive_time_step (std::shared_ptr< DGBase< dim, nspecies, double >> dg) const override
 Function to compute the adaptive time step.
 
void update_maximum_local_wave_speed (DGBase< dim, nspecies, double > &dg) override
 Updates the maximum local wave speed.
 
double compute_angular_momentum (const dealii::Point< dim > position, const dealii::Tensor< 1, 3, double > vorticity) const
 Function to compute the angular momentum.
 
- Protected Member Functions inherited from PHiLiP::FlowSolver::FlowSolverCaseBase< dim, nspecies, nstate >
double get_time_step () const
 Getter for time step.
 

Protected Attributes

const double channel_height
 Channel height.
 
const double half_channel_height
 Half channel height.
 
const double channel_friction_velocity_reynolds_number
 Channel Reynolds number based on wall friction velocity.
 
const int number_of_cells_x_direction
 Number of cells in x-direction.
 
const int number_of_cells_y_direction
 Number of cells in y-direction.
 
const int number_of_cells_z_direction
 Number of cells in z-direction.
 
const double pi_val
 Value of pi.
 
const double domain_length_x
 Domain length in x-direction.
 
const double domain_length_y
 Domain length in y-direction.
 
const double domain_length_z
 Domain length in z-direction.
 
const double domain_volume
 Domain volume.
 
const double channel_bulk_velocity_reynolds_number
 
const double channel_centerline_velocity_reynolds_number
 
double minimum_approximate_grid_spacing
 Minimum approximate grid spacing.
 
dealii::Tensor< 2, dim, double > zero_tensor
 Tensor of zeros.
 
std::shared_ptr< Physics::NavierStokes_ChannelFlowConstantSourceTerm_WallModel< dim, nspecies, dim+2, double > > navier_stokes_channel_flow_constant_source_term_wall_model_physics
 Pointer to Navier-Stokes physics object for computing things on the fly.
 
- Protected Attributes inherited from PHiLiP::FlowSolver::PeriodicTurbulence< dim, nspecies, nstate >
const std::string unsteady_data_table_filename_with_extension
 Filename (with extension) for the unsteady data table.
 
const unsigned int number_of_times_to_output_velocity_field
 Number of times to output the velocity field.
 
const bool output_velocity_field_at_fixed_times
 Flag for outputting velocity field at fixed times.
 
const bool output_vorticity_magnitude_field_in_addition_to_velocity
 Flag for outputting vorticity magnitude field in addition to velocity field at fixed times.
 
const bool output_density_field_in_addition_to_velocity
 Flag for outputting density field in addition to velocity field at fixed times.
 
const bool output_viscosity_field_in_addition_to_velocity
 Flag for outputting viscosity field in addition to velocity field at fixed times.
 
const std::string output_flow_field_files_directory_name
 Directory for writting flow field files.
 
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.
 
const unsigned int output_velocity_number_of_subvisions
 Number of subdivisions to apply when writting the velocity field at equidistant nodes.
 
const bool do_compute_angular_momentum
 Flag to compute angular momentum.
 
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_taylor_green_vortex = false
 Identifies if taylor green vortex case; initialized as false.
 
bool is_decaying_homogeneous_isotropic_turbulence = false
 Identified if DHIT case; initialized as false.
 
bool is_viscous_flow = true
 Identifies if viscous flow; initialized as true.
 
bool do_calculate_numerical_entropy = false
 Identifies if numerical entropy should be calculated; initialized as false.
 
std::array< double, NUMBER_OF_INTEGRATED_QUANTITIES > integrated_quantities
 Array for storing the integrated quantities; done for computational efficiency.
 
double integrated_kinetic_energy_at_previous_time_step
 Integrated kinetic energy over the domain at previous time step; used for ensuring a physically consistent simulation.
 
double previous_numerical_entropy = 0
 Numerical entropy at previous timestep.
 
double cumulative_numerical_entropy_change_FRcorrected = 0
 Cumulative change in numerical entropy.
 
double initial_numerical_entropy_abs = 0
 Numerical entropy at initial time.
 
dealii::Table< 1, double > output_velocity_field_times
 Times at which to output the velocity field.
 
unsigned int index_of_current_desired_time_to_output_velocity_field
 Index of current desired time to output velocity field.
 
std::string flow_field_quantity_filename_prefix
 Flow field quantity filename prefix.
 
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.
 
- Protected Attributes inherited from PHiLiP::FlowSolver::PeriodicCubeFlow< dim, nspecies, nstate >
const int number_of_cells_per_direction
 Number of cells per direction for the grid.
 
const double domain_left
 Domain left-boundary value for generating the grid.
 
const double domain_right
 Domain right-boundary value for generating the grid.
 
const double domain_size
 Domain size (length in 1D, area in 2D, and volume in 3D)
 
const double domain_size_per_element
 Domain size per element (length in 1D, area in 2D, and volume in 3D)
 
- Protected Attributes inherited from PHiLiP::FlowSolver::CubeFlow_UniformGrid< dim, nspecies, nstate >
double maximum_local_wave_speed
 Maximum local wave speed (i.e. convective eigenvalue)
 
std::shared_ptr< Physics::PhysicsBase< dim, nspecies, nstate, double > > pde_physics
 Pointer to Physics object for computing things on the fly.
 
- Protected Attributes inherited from PHiLiP::FlowSolver::FlowSolverCaseBase< dim, nspecies, nstate >
const Parameters::AllParameters all_param
 All parameters.
 
const MPI_Comm mpi_communicator
 MPI communicator.
 
const int mpi_rank
 MPI rank.
 
const int n_mpi
 Number of MPI processes.
 
dealii::ConditionalOStream pcout
 ConditionalOStream. More...
 

Private Member Functions

double get_stretched_mesh_size (const int i) const
 Get the stretched mesh size.
 

Private Attributes

double bulk_density
 Bulk density.
 
double bulk_mass_flow_rate
 Bulk mass flow rate.
 
double bulk_velocity
 Bulk velocity.
 

Additional Inherited Members

- Public Attributes inherited from PHiLiP::FlowSolver::FlowSolverCaseBase< dim, nspecies, nstate >
std::shared_ptr< InitialConditionFunction< dim, nspecies, nstate, double > > initial_condition_function
 Initial condition function.
 
- Protected Types inherited from PHiLiP::FlowSolver::PeriodicTurbulence< dim, nspecies, nstate >
enum  IntegratedQuantitiesEnum {
  kinetic_energy, enstrophy, pressure_dilatation, viscosity_times_deviatoric_strain_rate_tensor_magnitude_sqr,
  viscosity_times_strain_rate_tensor_magnitude_sqr, incompressible_kinetic_energy, incompressible_enstrophy, incompressible_palinstrophy,
  angular_momentum
}
 List of possible integrated quantities over the domain.
 

Detailed Description

template<int dim, int nspecies, int nstate>
class PHiLiP::FlowSolver::ChannelFlow< dim, nspecies, nstate >

Definition at line 17 of file channel_flow.h.

Member Function Documentation

◆ get_average_wall_shear_stress()

template<int dim, int nspecies, int nstate>
double PHiLiP::FlowSolver::ChannelFlow< dim, nspecies, nstate >::get_average_wall_shear_stress ( DGBase< dim, nspecies, double > &  dg) const

Get the average wall shear stress.

Update flags needed at face points.

Definition at line 373 of file channel_flow.cpp.

◆ get_average_wall_shear_stress_from_wall_model()

template<int dim, int nspecies, int nstate>
double PHiLiP::FlowSolver::ChannelFlow< dim, nspecies, nstate >::get_average_wall_shear_stress_from_wall_model ( DGBase< dim, nspecies, double > &  dg) const

Get the average wall shear stress from wall model.

Update flags needed at face points.

Definition at line 433 of file channel_flow.cpp.

◆ get_mesh_step_size_y_direction_carton_de_wiart_et_al()

template<int dim, int nspecies, int nstate>
std::vector< double > PHiLiP::FlowSolver::ChannelFlow< dim, nspecies, nstate >::get_mesh_step_size_y_direction_carton_de_wiart_et_al ( ) const
protected

Return a vector of mesh step sizes in the y-direction based on C. CARTON DE WIARTET. AL's stretching function Reference: C. CARTON DE WIARTET. AL, "Implicit LES of free and wall-bounded turbulent flows based onthe discontinuous Galerkin/symmetric interior penalty method", 2015.

Reference: C. CARTON DE WIARTET. AL, "Implicit LES of free and wall-bounded turbulent flows based onthe discontinuous Galerkin/symmetric interior penalty method", 2015.

Definition at line 264 of file channel_flow.cpp.

◆ get_mesh_step_size_y_direction_Gullbrand()

template<int dim, int nspecies, int nstate>
std::vector< double > PHiLiP::FlowSolver::ChannelFlow< dim, nspecies, nstate >::get_mesh_step_size_y_direction_Gullbrand ( ) const
protected

Return a vector of mesh step sizes in the y-direction based on Gullbrand's stretching function Reference: Gullbrand, "Grid-independent large-eddy simulation in turbulent channel flow using three-dimensional explicit filtering", 2003.

Reference: Gullbrand, "Grid-independent large-eddy simulation in turbulent channel flow using three-dimensional explicit filtering", 2003.

Definition at line 231 of file channel_flow.cpp.

◆ get_mesh_step_size_y_direction_HOPW()

template<int dim, int nspecies, int nstate>
std::vector< double > PHiLiP::FlowSolver::ChannelFlow< dim, nspecies, nstate >::get_mesh_step_size_y_direction_HOPW ( ) const
protected

Return a vector of mesh step sizes in the y-direction based on the High-Order Prediction Workshop (HOPW) case Reference: This stretching function comes from the structured GMSH .geo file obtained from https://how5.cenaero.be/content/ws2-les-plane-channel-ret550

Definition at line 199 of file channel_flow.cpp.

◆ set_bulk_flow_quantities()

template<int dim, int nspecies, int nstate>
void PHiLiP::FlowSolver::ChannelFlow< dim, nspecies, nstate >::set_bulk_flow_quantities ( DGBase< dim, nspecies, double > &  dg)

Set the bulk flow quantities.

List of possible integrated quantities over the domain

Definition at line 558 of file channel_flow.cpp.

Member Data Documentation

◆ channel_bulk_velocity_reynolds_number

template<int dim, int nspecies, int nstate>
const double PHiLiP::FlowSolver::ChannelFlow< dim, nspecies, nstate >::channel_bulk_velocity_reynolds_number
protected

Bulk velocity Reynolds number computed from friction velocity based Reynolds numbers (Empirical relation) Reference:

  • R. B. Dean, "Reynolds Number Dependence of Skin Friction and Other Bulk Flow Variables in Two-Dimensional Rectangular Duct Flow", Journal of Fluids Engineering, 1978

Definition at line 52 of file channel_flow.h.

◆ channel_centerline_velocity_reynolds_number

template<int dim, int nspecies, int nstate>
const double PHiLiP::FlowSolver::ChannelFlow< dim, nspecies, nstate >::channel_centerline_velocity_reynolds_number
protected

Centerline velocity Reynolds number computed from friction velocity based Reynolds numbers (Empirical relation) Reference:

  • R. B. Dean, "Reynolds Number Dependence of Skin Friction and Other Bulk Flow Variables in Two-Dimensional Rectangular Duct Flow", Journal of Fluids Engineering, 1978

Definition at line 61 of file channel_flow.h.


The documentation for this class was generated from the following files: