[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
strong_dg_les.hpp
1 #ifndef PHILIP_DG_STRONG_LES_HPP
2 #define PHILIP_DG_STRONG_LES_HPP
3 
4 #include "strong_dg.hpp"
5 #include "physics/large_eddy_simulation.h"
6 #include "physics/navier_stokes_model.h"
7 
8 namespace PHiLiP {
9 
11 /* Contains the functions that need to be templated on the number of state variables.
12  */
13 #if PHILIP_DIM==1 // dealii::parallel::distributed::Triangulation<dim> does not work for 1D
14 template <int dim, int nspecies, int nstate, typename real, typename MeshType = dealii::Triangulation<dim>>
15 #else
16 template <int dim, int nspecies, int nstate, typename real, typename MeshType = dealii::parallel::distributed::Triangulation<dim>>
17 #endif
18 class DGStrongLES: public DGStrong<dim, nspecies, nstate, real, MeshType>
19 {
20 protected:
23 
24 public:
27  const Parameters::AllParameters *const parameters_input,
28  const unsigned int degree,
29  const unsigned int max_degree_input,
30  const unsigned int grid_degree_input,
31  const std::shared_ptr<Triangulation> triangulation_input);
32 
34  ~DGStrongLES();
35 
37  std::shared_ptr < Physics::LargeEddySimulationBase<dim, nspecies, nstate, real > > pde_model_les_double;
38 
40  virtual void allocate_model_variables() override;
41 
43  void update_model_variables() override;
44 
45 protected:
48 
50  virtual void update_cellwise_mean_quantities();
51 
53 
54 }; // end of DGStrongLES class
55 
57 /* Contains the functions that need to be templated on the number of state variables.
58  */
59 #if PHILIP_DIM==1 // dealii::parallel::distributed::Triangulation<dim> does not work for 1D
60 template <int dim, int nspecies, int nstate, typename real, typename MeshType = dealii::Triangulation<dim>>
61 #else
62 template <int dim, int nspecies, int nstate, typename real, typename MeshType = dealii::parallel::distributed::Triangulation<dim>>
63 #endif
64 class DGStrongLES_ShearImproved: public DGStrongLES<dim, nspecies, nstate, real, MeshType>
65 {
66 protected:
69 
70 public:
73  const Parameters::AllParameters *const parameters_input,
74  const unsigned int degree,
75  const unsigned int max_degree_input,
76  const unsigned int grid_degree_input,
77  const std::shared_ptr<Triangulation> triangulation_input);
78 
81 
83  void allocate_model_variables() override;
84 
85 protected:
87  void update_cellwise_mean_quantities() override;
88 
90 
91 }; // end of DGStrongLES class
92 
94 /* Contains the functions that need to be templated on the number of state variables.
95  */
96 #if PHILIP_DIM==1 // dealii::parallel::distributed::Triangulation<dim> does not work for 1D
97 template <int dim, int nspecies, int nstate, typename real, typename MeshType = dealii::Triangulation<dim>>
98 #else
99 template <int dim, int nspecies, int nstate, typename real, typename MeshType = dealii::parallel::distributed::Triangulation<dim>>
100 #endif
101 class DGStrongLES_DynamicSmagorinsky: public DGStrongLES<dim, nspecies, nstate, real, MeshType>
102 {
103 protected:
106 
107 public:
110  const Parameters::AllParameters *const parameters_input,
111  const unsigned int degree,
112  const unsigned int max_degree_input,
113  const unsigned int grid_degree_input,
114  const std::shared_ptr<Triangulation> triangulation_input);
115 
118 
121 
123  void allocate_model_variables() override;
124 
125 protected:
127  void update_cellwise_mean_quantities() override;
128 
130 
131 }; // end of DGStrongLES_ShearImproved class
132 
134 /* Contains the functions that need to be templated on the number of state variables.
135  */
136 #if PHILIP_DIM==1 // dealii::parallel::distributed::Triangulation<dim> does not work for 1D
137 template <int dim, int nspecies, int nstate, typename real, typename MeshType = dealii::Triangulation<dim>>
138 #else
139 template <int dim, int nspecies, int nstate, typename real, typename MeshType = dealii::parallel::distributed::Triangulation<dim>>
140 #endif
141 class DGStrong_ChannelFlow: public DGStrong<dim, nspecies, nstate, real, MeshType>
142 {
143 protected:
146 
147 public:
150  const Parameters::AllParameters *const parameters_input,
151  const unsigned int degree,
152  const unsigned int max_degree_input,
153  const unsigned int grid_degree_input,
154  const std::shared_ptr<Triangulation> triangulation_input);
155 
158 
159 protected:
160  const double channel_height;
161  const double half_channel_height;
166  const double pi_val;
167  const double domain_length_x;
168  const double domain_length_y;
169  const double domain_length_z;
170  const double domain_volume;
171 
180 
189 
190  const double total_wall_area;
191 public:
193  std::shared_ptr < Physics::NavierStokesWithModelSourceTerms<dim, nspecies, nstate, real > > pde_model_navier_stokes_double;
194 
196  void allocate_model_variables() override;
197 
199  void update_model_variables() override;
200 
201 protected:
203 
204  void set_bulk_flow_quantities();
205  double get_average_wall_shear_stress() const;
206 
207 }; // end of DGStrong_ChannelFlow class
208 
209 } // PHiLiP namespace
210 
211 #endif
~DGStrongLES()
Destructor.
virtual void update_cellwise_mean_quantities()
Update the cellwise mean quantities.
const double channel_friction_velocity_reynolds_number
Channel Reynolds number based on wall friction velocity.
DGStrongLES_DynamicSmagorinsky class templated on the number of state variables.
typename DGBaseState< dim, nspecies, nstate, real, MeshType >::Triangulation Triangulation
Alias to base class Triangulation.
Definition: strong_dg.hpp:20
typename DGStrong< dim, nspecies, nstate, real, MeshType >::Triangulation Triangulation
Alias to base class Triangulation.
const double domain_volume
Domain volume.
std::shared_ptr< Physics::NavierStokesWithModelSourceTerms< dim, nspecies, nstate, real > > pde_model_navier_stokes_double
Contains the Navier-Stokes with model source terms object.
Files for the baseline physics.
Definition: ADTypes.hpp:10
DGStrong_ChannelFlow class templated on the number of state variables.
const double channel_centerline_velocity_reynolds_number
const double channel_bulk_velocity_reynolds_number
Main parameter class that contains the various other sub-parameter classes.
const double domain_length_y
Domain length in y-direction.
DGStrong class templated on the number of state variables.
Definition: strong_dg.hpp:16
DGStrongLES class templated on the number of state variables.
const double domain_length_z
Domain length in z-direction.
MeshType Triangulation
Definition: dg_base.hpp:89
const double domain_length_x
Domain length in x-direction.
DGStrongLES_ShearImproved class templated on the number of state variables.
const double dynamic_smagorinsky_model_constant_clipping_limit
Clipping limit for the Dynamic Smagorinsky model constant.
const double half_channel_height
Half channel height.
const double total_wall_area
Total wall area.
const int number_of_cells_z_direction
Number of cells in z-direction.
void update_model_variables() override
Update the necessary variables declared in src/physics/model.h.
DGStrongLES(const Parameters::AllParameters *const parameters_input, const unsigned int degree, const unsigned int max_degree_input, const unsigned int grid_degree_input, const std::shared_ptr< Triangulation > triangulation_input)
Constructor.
virtual void allocate_model_variables() override
Allocate the necessary variables declared in src/physics/model.h.
void update_cellwise_volume_and_poly_degree()
Update the cellwise volume and polynomial degree.
const int number_of_cells_x_direction
Number of cells in x-direction.
DGBase is independent of the number of state variables.
Definition: dg_base.hpp:82
const double channel_height
Channel height.
const double pi_val
Value of pi.
std::shared_ptr< Physics::LargeEddySimulationBase< dim, nspecies, nstate, real > > pde_model_les_double
Contains the large eddy simulation object.
const int number_of_cells_y_direction
Number of cells in y-direction.