[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
large_eddy_simulation.h
1 #ifndef __LARGE_EDDY_SIMULATION__
2 #define __LARGE_EDDY_SIMULATION__
3 
4 #include "model.h"
5 #include "navier_stokes.h"
6 #include "euler.h"
7 
8 namespace PHiLiP {
9 namespace Physics {
10 
12 template <int dim, int nspecies, int nstate, typename real>
13 class LargeEddySimulationBase : public ModelBase <dim, nspecies, nstate, real>
14 {
15 public:
20  const Parameters::AllParameters *const parameters_input,
21  const double ref_length,
22  const double gamma_gas,
23  const double mach_inf,
24  const double angle_of_attack,
25  const double side_slip_angle,
26  const double prandtl_number,
27  const double reynolds_number_inf,
28  const bool use_constant_viscosity,
29  const double constant_viscosity,
30  const double temperature_inf,
31  const double turbulent_prandtl_number,
33  const double isothermal_wall_temperature = 1.0,
34  const thermal_boundary_condition_enum thermal_boundary_condition_type = thermal_boundary_condition_enum::adiabatic,
36  const two_point_num_flux_enum two_point_num_flux_type = two_point_num_flux_enum::KG);
37 
40 
43 
45  std::unique_ptr< NavierStokes<dim,nspecies,nstate,real> > navier_stokes_physics;
46 
48  std::array<dealii::Tensor<1,dim,real>,nstate> convective_flux (
49  const std::array<real,nstate> &conservative_soln) const;
50 
52  std::array<dealii::Tensor<1,dim,real>,nstate> dissipative_flux (
53  const std::array<real,nstate> &conservative_soln,
54  const std::array<dealii::Tensor<1,dim,real>,nstate> &solution_gradient,
55  const dealii::types::global_dof_index cell_index) const;
56 
58  std::array<real,nstate> dissipative_flux_dot_normal (
59  const std::array<real,nstate> &solution,
60  const std::array<dealii::Tensor<1,dim,real>,nstate> &solution_gradient,
61  const std::array<real,nstate> &filtered_solution,
62  const std::array<dealii::Tensor<1,dim,real>,nstate> &filtered_solution_gradient,
63  const bool on_boundary,
64  const dealii::types::global_dof_index cell_index,
65  const dealii::Tensor<1,dim,real> &normal,
66  const int boundary_type) const;
67 
69 
70  std::array<real,nstate> convective_eigenvalues (
71  const std::array<real,nstate> &/*conservative_soln*/,
72  const dealii::Tensor<1,dim,real> &/*normal*/) const override;
73 
75 
76  real max_convective_eigenvalue (const std::array<real,nstate> &soln) const;
77 
79 
81  const std::array<real,nstate> &soln,
82  const dealii::Tensor<1,dim,real> &normal) const;
83 
85  std::array<real,nstate> source_term (
86  const dealii::Point<dim,real> &pos,
87  const std::array<real,nstate> &solution,
88  const real current_time,
89  const dealii::types::global_dof_index cell_index) const;
90 
92  std::array<real,nstate> physical_source_term (
93  const dealii::Point<dim,real> &pos,
94  const std::array<real,nstate> &conservative_solution,
95  const std::array<dealii::Tensor<1,dim,real>,nstate> &solution_gradient,
96  const dealii::types::global_dof_index cell_index) const override;
97 
99  double get_filter_width (const dealii::types::global_dof_index cell_index) const;
100 
103  const dealii::types::global_dof_index cell_index,
104  const int cell_poly_degree) const;
105 
107  virtual dealii::Tensor<2,dim,real> compute_SGS_stress_tensor (
108  const std::array<real,nstate> &primitive_soln,
109  const std::array<dealii::Tensor<1,dim,real>,nstate> &primitive_soln_gradient,
110  const dealii::types::global_dof_index cell_index) const = 0;
111 
113  virtual dealii::Tensor<1,dim,real> compute_SGS_heat_flux (
114  const std::array<real,nstate> &primitive_soln,
115  const std::array<dealii::Tensor<1,dim,real>,nstate> &primitive_soln_gradient,
116  const dealii::types::global_dof_index cell_index) const = 0;
117 
119  virtual dealii::Tensor<2,dim,FadType> compute_SGS_stress_tensor_fad (
120  const std::array<FadType,nstate> &primitive_soln,
121  const std::array<dealii::Tensor<1,dim,FadType>,nstate> &primitive_soln_gradient,
122  const dealii::types::global_dof_index cell_index) const = 0;
123 
125  virtual dealii::Tensor<1,dim,FadType> compute_SGS_heat_flux_fad (
126  const std::array<FadType,nstate> &primitive_soln,
127  const std::array<dealii::Tensor<1,dim,FadType>,nstate> &primitive_soln_gradient,
128  const dealii::types::global_dof_index cell_index) const = 0;
129 
131  template<typename real2>
132  real2 get_tensor_magnitude (const dealii::Tensor<2,dim,real2> &tensor) const;
133 
134 protected:
136  template<typename real2>
137  real2 get_tensor_magnitude_sqr (const dealii::Tensor<2,dim,real2> &tensor) const;
138 
140  template<typename real2>
141  std::array<dealii::Tensor<1,dim,real2>,nstate> dissipative_flux_templated (
142  const std::array<real2,nstate> &conservative_soln,
143  const std::array<dealii::Tensor<1,dim,real2>,nstate> &solution_gradient,
144  const dealii::types::global_dof_index cell_index) const;
145 
150  dealii::Tensor<2,nstate,real> dissipative_flux_directional_jacobian (
151  const std::array<real,nstate> &conservative_soln,
152  const std::array<dealii::Tensor<1,dim,real>,nstate> &solution_gradient,
153  const dealii::Tensor<1,dim,real> &normal,
154  const dealii::types::global_dof_index cell_index) const;
155 
161  const std::array<real,nstate> &conservative_soln,
162  const std::array<dealii::Tensor<1,dim,real>,nstate> &solution_gradient,
163  const dealii::Tensor<1,dim,real> &normal,
164  const int d_gradient,
165  const dealii::types::global_dof_index cell_index) const;
166 
168  std::array<real,nstate> get_manufactured_solution_value (
169  const dealii::Point<dim,real> &pos) const;
170 
172  std::array<dealii::Tensor<1,dim,real>,nstate> get_manufactured_solution_gradient (
173  const dealii::Point<dim,real> &pos) const;
174 
176  std::array<real,nstate> dissipative_source_term (
177  const dealii::Point<dim,real> &pos,
178  const dealii::types::global_dof_index cell_index) const;
179 
181 
184  std::array<real,nstate> channel_flow_source_term (
185  const std::array<real,nstate> &conservative_soln) const;
186 };
187 
189 template <int dim, int nspecies, int nstate, typename real>
190 class LargeEddySimulation_Smagorinsky : public LargeEddySimulationBase <dim, nspecies, nstate, real>
191 {
192 public:
199  const Parameters::AllParameters *const parameters_input,
200  const double ref_length,
201  const double gamma_gas,
202  const double mach_inf,
203  const double angle_of_attack,
204  const double side_slip_angle,
205  const double prandtl_number,
206  const double reynolds_number_inf,
207  const bool use_constant_viscosity,
208  const double constant_viscosity,
209  const double temperature_inf,
210  const double turbulent_prandtl_number,
212  const double model_constant,
213  const double isothermal_wall_temperature = 1.0,
214  const thermal_boundary_condition_enum thermal_boundary_condition_type = thermal_boundary_condition_enum::adiabatic,
216  const two_point_num_flux_enum two_point_num_flux_type = two_point_num_flux_enum::KG,
217  const bool apply_low_reynolds_number_eddy_viscosity_correction = false);
218 
219  const double model_constant;
221 
224 
226  void set_unfiltered_conservative_solution(const std::array<real,nstate> &unfiltered_conservative_solution_) override;
227 
229  virtual double get_model_constant_times_filter_width (const dealii::types::global_dof_index cell_index) const;
230 
232  virtual double get_model_constant_times_filter_width_squared (const dealii::types::global_dof_index cell_index) const;
233 
235  real get_corrected_eddy_viscosity_low_reynolds_number(
236  const real uncorrected_eddy_viscosity) const;
237 
239  FadType get_corrected_eddy_viscosity_low_reynolds_number_fad(
240  const FadType uncorrected_eddy_viscosity) const;
241 
243  real get_scaled_fluid_kinematic_viscosity_from_unfiltered_solution() const;
244 
246  dealii::Tensor<2,dim,real> compute_SGS_stress_tensor (
247  const std::array<real,nstate> &primitive_soln,
248  const std::array<dealii::Tensor<1,dim,real>,nstate> &primitive_soln_gradient,
249  const dealii::types::global_dof_index cell_index) const;
250 
252  dealii::Tensor<1,dim,real> compute_SGS_heat_flux (
253  const std::array<real,nstate> &primitive_soln,
254  const std::array<dealii::Tensor<1,dim,real>,nstate> &primitive_soln_gradient,
255  const dealii::types::global_dof_index cell_index) const;
256 
258  dealii::Tensor<2,dim,FadType> compute_SGS_stress_tensor_fad (
259  const std::array<FadType,nstate> &primitive_soln,
260  const std::array<dealii::Tensor<1,dim,FadType>,nstate> &primitive_soln_gradient,
261  const dealii::types::global_dof_index cell_index) const;
262 
264  dealii::Tensor<1,dim,FadType> compute_SGS_heat_flux_fad (
265  const std::array<FadType,nstate> &primitive_soln,
266  const std::array<dealii::Tensor<1,dim,FadType>,nstate> &primitive_soln_gradient,
267  const dealii::types::global_dof_index cell_index) const;
268 
270  virtual real compute_eddy_viscosity(
271  const std::array<real,nstate> &primitive_soln,
272  const std::array<dealii::Tensor<1,dim,real>,nstate> &primitive_soln_gradient,
273  const dealii::types::global_dof_index cell_index) const;
274 
276  virtual FadType compute_eddy_viscosity_fad(
277  const std::array<FadType,nstate> &primitive_soln,
278  const std::array<dealii::Tensor<1,dim,FadType>,nstate> &primitive_soln_gradient,
279  const dealii::types::global_dof_index cell_index) const;
280 
281 protected:
283  template<typename real2> dealii::Tensor<2,dim,real2> compute_SGS_stress_tensor_templated (
284  const std::array<real2,nstate> &primitive_soln,
285  const std::array<dealii::Tensor<1,dim,real2>,nstate> &primitive_soln_gradient,
286  const dealii::types::global_dof_index cell_index) const;
287 
289  template<typename real2>
290  dealii::Tensor<1,dim,real2> compute_SGS_heat_flux_templated (
291  const std::array<real2,nstate> &primitive_soln,
292  const std::array<dealii::Tensor<1,dim,real2>,nstate> &primitive_soln_gradient,
293  const dealii::types::global_dof_index cell_index) const;
294 
296  template<typename real2> real2 scale_eddy_viscosity_templated(
297  const std::array<real2,nstate> &primitive_soln,
298  const real2 eddy_viscosity) const;
299 
302 
303 private:
305  template<typename real2> real2 compute_eddy_viscosity_templated(
306  const std::array<real2,nstate> &primitive_soln,
307  const std::array<dealii::Tensor<1,dim,real2>,nstate> &primitive_soln_gradient,
308  const dealii::types::global_dof_index cell_index) const;
309 
315  template<typename real2> real2 get_corrected_eddy_viscosity_low_reynolds_number_templated(
316  const real2 uncorrected_eddy_viscosity) const;
317 };
318 
320 template <int dim, int nspecies, int nstate, typename real>
321 class LargeEddySimulation_WALE : public LargeEddySimulation_Smagorinsky <dim, nspecies, nstate, real>
322 {
323 public:
331  const Parameters::AllParameters *const parameters_input,
332  const double ref_length,
333  const double gamma_gas,
334  const double mach_inf,
335  const double angle_of_attack,
336  const double side_slip_angle,
337  const double prandtl_number,
338  const double reynolds_number_inf,
339  const bool use_constant_viscosity,
340  const double constant_viscosity,
341  const double temperature_inf,
342  const double turbulent_prandtl_number,
344  const double model_constant,
345  const double isothermal_wall_temperature = 1.0,
346  const thermal_boundary_condition_enum thermal_boundary_condition_type = thermal_boundary_condition_enum::adiabatic,
348  const two_point_num_flux_enum two_point_num_flux_type = two_point_num_flux_enum::KG,
349  const bool apply_low_reynolds_number_eddy_viscosity_correction = false);
350 
354  real compute_eddy_viscosity(
355  const std::array<real,nstate> &primitive_soln,
356  const std::array<dealii::Tensor<1,dim,real>,nstate> &primitive_soln_gradient,
357  const dealii::types::global_dof_index cell_index) const override;
358 
362  FadType compute_eddy_viscosity_fad(
363  const std::array<FadType,nstate> &primitive_soln,
364  const std::array<dealii::Tensor<1,dim,FadType>,nstate> &primitive_soln_gradient,
365  const dealii::types::global_dof_index cell_index) const override;
366 
367 private:
371  template<typename real2> real2 compute_eddy_viscosity_templated(
372  const std::array<real2,nstate> &primitive_soln,
373  const std::array<dealii::Tensor<1,dim,real2>,nstate> &primitive_soln_gradient,
374  const dealii::types::global_dof_index cell_index) const;
375 };
376 
378 template <int dim, int nspecies, int nstate, typename real>
379 class LargeEddySimulation_Vreman : public LargeEddySimulation_Smagorinsky <dim, nspecies, nstate, real>
380 {
381 public:
388  const Parameters::AllParameters *const parameters_input,
389  const double ref_length,
390  const double gamma_gas,
391  const double mach_inf,
392  const double angle_of_attack,
393  const double side_slip_angle,
394  const double prandtl_number,
395  const double reynolds_number_inf,
396  const bool use_constant_viscosity,
397  const double constant_viscosity,
398  const double temperature_inf,
399  const double turbulent_prandtl_number,
401  const double model_constant,
402  const double isothermal_wall_temperature = 1.0,
403  const thermal_boundary_condition_enum thermal_boundary_condition_type = thermal_boundary_condition_enum::adiabatic,
405  const two_point_num_flux_enum two_point_num_flux_type = two_point_num_flux_enum::KG,
406  const bool apply_low_reynolds_number_eddy_viscosity_correction = false);
407 
411  real compute_eddy_viscosity(
412  const std::array<real,nstate> &primitive_soln,
413  const std::array<dealii::Tensor<1,dim,real>,nstate> &primitive_soln_gradient,
414  const dealii::types::global_dof_index cell_index) const override;
415 
419  FadType compute_eddy_viscosity_fad(
420  const std::array<FadType,nstate> &primitive_soln,
421  const std::array<dealii::Tensor<1,dim,FadType>,nstate> &primitive_soln_gradient,
422  const dealii::types::global_dof_index cell_index) const override;
423 
424 private:
428  template<typename real2> real2 compute_eddy_viscosity_templated(
429  const std::array<real2,nstate> &primitive_soln,
430  const std::array<dealii::Tensor<1,dim,real2>,nstate> &primitive_soln_gradient,
431  const dealii::types::global_dof_index cell_index) const;
432 };
433 
435 template <int dim, int nspecies, int nstate, typename real>
437 {
438 public:
446  const Parameters::AllParameters *const parameters_input,
447  const double ref_length,
448  const double gamma_gas,
449  const double mach_inf,
450  const double angle_of_attack,
451  const double side_slip_angle,
452  const double prandtl_number,
453  const double reynolds_number_inf,
454  const bool use_constant_viscosity,
455  const double constant_viscosity,
456  const double temperature_inf,
457  const double turbulent_prandtl_number,
459  const double model_constant,
460  const double isothermal_wall_temperature = 1.0,
461  const thermal_boundary_condition_enum thermal_boundary_condition_type = thermal_boundary_condition_enum::adiabatic,
463  const two_point_num_flux_enum two_point_num_flux_type = two_point_num_flux_enum::KG,
464  const bool apply_low_reynolds_number_eddy_viscosity_correction = false);
465 
468 
473  real compute_eddy_viscosity(
474  const std::array<real,nstate> &primitive_soln,
475  const std::array<dealii::Tensor<1,dim,real>,nstate> &primitive_soln_gradient,
476  const dealii::types::global_dof_index cell_index) const override;
477 
482  FadType compute_eddy_viscosity_fad(
483  const std::array<FadType,nstate> &primitive_soln,
484  const std::array<dealii::Tensor<1,dim,FadType>,nstate> &primitive_soln_gradient,
485  const dealii::types::global_dof_index cell_index) const override;
486 
487 private:
493  template<typename real2> real2 compute_eddy_viscosity_templated(
494  const std::array<real2,nstate> &primitive_soln,
495  const std::array<dealii::Tensor<1,dim,real2>,nstate> &primitive_soln_gradient,
496  const dealii::types::global_dof_index cell_index) const;
497 };
498 
500 template <int dim, int nspecies, int nstate, typename real>
501 class LargeEddySimulation_VMS : public LargeEddySimulation_Smagorinsky <dim, nspecies, nstate, real>
502 {
503 public:
510  const Parameters::AllParameters *const parameters_input,
511  const double ref_length,
512  const double gamma_gas,
513  const double mach_inf,
514  const double angle_of_attack,
515  const double side_slip_angle,
516  const double prandtl_number,
517  const double reynolds_number_inf,
518  const bool use_constant_viscosity,
519  const double constant_viscosity,
520  const double temperature_inf,
521  const double turbulent_prandtl_number,
523  const double model_constant,
524  const unsigned int poly_degree,
525  const unsigned int poly_degree_large_scales,
526  const double mesh_size,
527  const double curve_fit_constant,
528  const double isothermal_wall_temperature = 1.0,
529  const thermal_boundary_condition_enum thermal_boundary_condition_type = thermal_boundary_condition_enum::adiabatic,
531  const two_point_num_flux_enum two_point_num_flux_type = two_point_num_flux_enum::KG,
532  const bool apply_low_reynolds_number_eddy_viscosity_correction = false);
533 
536 
537  const double poly_degree;
539  const double mesh_size;
540  const double curve_fit_constant;
541 
545  double get_model_constant_times_filter_width (const dealii::types::global_dof_index cell_index) const override;
546 };
547 
549 template <int dim, int nspecies, int nstate, typename real>
550 class LargeEddySimulation_SmallSmallVMS : public LargeEddySimulation_VMS <dim, nspecies, nstate, real>
551 {
552 public:
559  const Parameters::AllParameters *const parameters_input,
560  const double ref_length,
561  const double gamma_gas,
562  const double mach_inf,
563  const double angle_of_attack,
564  const double side_slip_angle,
565  const double prandtl_number,
566  const double reynolds_number_inf,
567  const bool use_constant_viscosity,
568  const double constant_viscosity,
569  const double temperature_inf,
570  const double turbulent_prandtl_number,
572  const double model_constant,
573  const unsigned int poly_degree,
574  const unsigned int poly_degree_large_scales,
575  const double mesh_size,
576  const double isothermal_wall_temperature = 1.0,
577  const thermal_boundary_condition_enum thermal_boundary_condition_type = thermal_boundary_condition_enum::adiabatic,
579  const two_point_num_flux_enum two_point_num_flux_type = two_point_num_flux_enum::KG,
580  const bool apply_low_reynolds_number_eddy_viscosity_correction = false);
581 
584 };
585 
587 template <int dim, int nspecies, int nstate, typename real>
588 class LargeEddySimulation_AllAllVMS : public LargeEddySimulation_VMS <dim, nspecies, nstate, real>
589 {
590 public:
597  const Parameters::AllParameters *const parameters_input,
598  const double ref_length,
599  const double gamma_gas,
600  const double mach_inf,
601  const double angle_of_attack,
602  const double side_slip_angle,
603  const double prandtl_number,
604  const double reynolds_number_inf,
605  const bool use_constant_viscosity,
606  const double constant_viscosity,
607  const double temperature_inf,
608  const double turbulent_prandtl_number,
610  const double model_constant,
611  const unsigned int poly_degree,
612  const unsigned int poly_degree_large_scales,
613  const double mesh_size,
614  const double isothermal_wall_temperature = 1.0,
615  const thermal_boundary_condition_enum thermal_boundary_condition_type = thermal_boundary_condition_enum::adiabatic,
617  const two_point_num_flux_enum two_point_num_flux_type = two_point_num_flux_enum::KG,
618  const bool apply_low_reynolds_number_eddy_viscosity_correction = false);
619 
622 };
623 
625 template <int dim, int nspecies, int nstate, typename real>
627 {
628 public:
635  const Parameters::AllParameters *const parameters_input,
636  const double ref_length,
637  const double gamma_gas,
638  const double mach_inf,
639  const double angle_of_attack,
640  const double side_slip_angle,
641  const double prandtl_number,
642  const double reynolds_number_inf,
643  const bool use_constant_viscosity,
644  const double constant_viscosity,
645  const double temperature_inf,
646  const double turbulent_prandtl_number,
648  const double model_constant,
649  const double isothermal_wall_temperature = 1.0,
650  const thermal_boundary_condition_enum thermal_boundary_condition_type = thermal_boundary_condition_enum::adiabatic,
652  const two_point_num_flux_enum two_point_num_flux_type = two_point_num_flux_enum::KG,
653  const bool apply_low_reynolds_number_eddy_viscosity_correction = false);
654 
657 
661  double get_model_constant_times_filter_width_squared (const dealii::types::global_dof_index cell_index) const override;
662 };
663 
664 } // Physics namespace
665 } // PHiLiP namespace
666 
667 #endif
double get_filter_width_from_poly_degree(const dealii::types::global_dof_index cell_index, const int cell_poly_degree) const
Compute the nondimensionalized filter width used by the SGS model given a cell index.
virtual void set_unfiltered_conservative_solution(const std::array< real, nstate > &unfiltered_conservative_solution_)
Setter for the unfiltered conservative solution.
Definition: model.cpp:38
Dynamic Smagorinsky Model (DSM) eddy viscosity model. Derived from LargeEddySimulation_Smagorinsky fo...
Variational multiscale (VMS) eddy viscosity model. Derived from LargeEddySimulation_Smagorinsky for o...
Smagorinsky eddy viscosity model. Derived from Large Eddy Simulation.
real max_convective_eigenvalue(const std::array< real, nstate > &soln) const
Maximum convective eigenvalue of the additional models&#39; PDEs.
virtual dealii::Tensor< 1, dim, real > compute_SGS_heat_flux(const std::array< real, nstate > &primitive_soln, const std::array< dealii::Tensor< 1, dim, real >, nstate > &primitive_soln_gradient, const dealii::types::global_dof_index cell_index) const =0
Nondimensionalized sub-grid scale (SGS) heat flux, (q^sgs)*.
Sacado::Fad::DFad< double > FadType
Sacado AD type for first derivatives.
Definition: ADTypes.hpp:11
Manufactured solution used for grid studies to check convergence orders.
WALE (Wall-Adapting Local Eddy-viscosity) eddy viscosity model. Derived from LargeEddySimulation_Smag...
const double ratio_of_filter_width_to_cell_size
Ratio of filter width to cell size.
real2 get_tensor_magnitude(const dealii::Tensor< 2, dim, real2 > &tensor) const
Returns the magnitude of the tensor.
Files for the baseline physics.
Definition: ADTypes.hpp:10
std::array< dealii::Tensor< 1, dim, real >, nstate > get_manufactured_solution_gradient(const dealii::Point< dim, real > &pos) const
Get manufactured solution value (repeated from Euler)
Shear-improved Smagorinsky eddy viscosity model. Derived from LargeEddySimulation_Smagorinsky for onl...
const double curve_fit_constant
Curve fit constant for computing the model constant times filter width expresion. ...
Physics model additional terms and equations to the baseline physics.
Definition: model.h:18
dealii::Tensor< 2, nstate, real > dissipative_flux_directional_jacobian(const std::array< real, nstate > &conservative_soln, const std::array< dealii::Tensor< 1, dim, real >, nstate > &solution_gradient, const dealii::Tensor< 1, dim, real > &normal, const dealii::types::global_dof_index cell_index) const
Main parameter class that contains the various other sub-parameter classes.
std::array< real, nstate > convective_eigenvalues(const std::array< real, nstate > &, const dealii::Tensor< 1, dim, real > &) const override
Convective eigenvalues of the additional models&#39; PDEs.
LargeEddySimulationBase(const Parameters::AllParameters *const parameters_input, const double ref_length, const double gamma_gas, const double mach_inf, const double angle_of_attack, const double side_slip_angle, const double prandtl_number, const double reynolds_number_inf, const bool use_constant_viscosity, const double constant_viscosity, const double temperature_inf, const double turbulent_prandtl_number, const double ratio_of_filter_width_to_cell_size, const double isothermal_wall_temperature=1.0, const thermal_boundary_condition_enum thermal_boundary_condition_type=thermal_boundary_condition_enum::adiabatic, std::shared_ptr< ManufacturedSolutionFunction< dim, nspecies, real > > manufactured_solution_function=nullptr, const two_point_num_flux_enum two_point_num_flux_type=two_point_num_flux_enum::KG)
Constructor.
TwoPointNumericalFlux
Two point numerical flux type for split form.
virtual dealii::Tensor< 1, dim, FadType > compute_SGS_heat_flux_fad(const std::array< FadType, nstate > &primitive_soln, const std::array< dealii::Tensor< 1, dim, FadType >, nstate > &primitive_soln_gradient, const dealii::types::global_dof_index cell_index) const =0
Nondimensionalized sub-grid scale (SGS) heat flux, (q^sgs)* (Automatic Differentiation Type: FadType)...
std::array< real, nstate > dissipative_flux_dot_normal(const std::array< real, nstate > &solution, const std::array< dealii::Tensor< 1, dim, real >, nstate > &solution_gradient, const std::array< real, nstate > &filtered_solution, const std::array< dealii::Tensor< 1, dim, real >, nstate > &filtered_solution_gradient, const bool on_boundary, const dealii::types::global_dof_index cell_index, const dealii::Tensor< 1, dim, real > &normal, const int boundary_type) const
Dissipative (i.e. viscous) flux: dot normal vector.
std::array< dealii::Tensor< 1, dim, real2 >, nstate > dissipative_flux_templated(const std::array< real2, nstate > &conservative_soln, const std::array< dealii::Tensor< 1, dim, real2 >, nstate > &solution_gradient, const dealii::types::global_dof_index cell_index) const
Templated dissipative (i.e. viscous) flux: .
All-All Variational multiscale (VMS) eddy viscosity model. Derived from LargeEddySimulation_VMS for o...
std::unique_ptr< NavierStokes< dim, nspecies, nstate, real > > navier_stokes_physics
Pointer to Navier-Stokes physics object.
virtual dealii::Tensor< 2, dim, real > compute_SGS_stress_tensor(const std::array< real, nstate > &primitive_soln, const std::array< dealii::Tensor< 1, dim, real >, nstate > &primitive_soln_gradient, const dealii::types::global_dof_index cell_index) const =0
Nondimensionalized sub-grid scale (SGS) stress tensor, (tau^sgs)*.
Large Eddy Simulation equations. Derived from Navier-Stokes for modifying the stress tensor and heat ...
std::array< real, nstate > physical_source_term(const dealii::Point< dim, real > &pos, const std::array< real, nstate > &conservative_solution, const std::array< dealii::Tensor< 1, dim, real >, nstate > &solution_gradient, const dealii::types::global_dof_index cell_index) const override
Physical source term.
std::array< real, nstate > source_term(const dealii::Point< dim, real > &pos, const std::array< real, nstate > &solution, const real current_time, const dealii::types::global_dof_index cell_index) const
Source term for manufactured solution functions.
std::array< real, nstate > dissipative_source_term(const dealii::Point< dim, real > &pos, const dealii::types::global_dof_index cell_index) const
Dissipative flux contribution to the source term (repeated from NavierStokes)
const double turbulent_prandtl_number
Turbulent Prandtl number.
Vreman eddy viscosity model. Derived from LargeEddySimulation_Smagorinsky for only modifying compute_...
const bool apply_low_reynolds_number_eddy_viscosity_correction
Flag for applying the low Reynolds number eddy viscosity correction.
double scaled_fluid_kinematic_viscosity_from_unfiltered_solution
Scaled fluid kinematic viscosity based on the unfiltered solution.
const double poly_degree_large_scales
Polynomial degree of large scale partition of solution.
virtual dealii::Tensor< 2, dim, FadType > compute_SGS_stress_tensor_fad(const std::array< FadType, nstate > &primitive_soln, const std::array< dealii::Tensor< 1, dim, FadType >, nstate > &primitive_soln_gradient, const dealii::types::global_dof_index cell_index) const =0
Nondimensionalized sub-grid scale (SGS) stress tensor, (tau^sgs)* (Automatic Differentiation Type: Fa...
std::array< real, nstate > get_manufactured_solution_value(const dealii::Point< dim, real > &pos) const
Get manufactured solution value (repeated from Euler)
real max_convective_normal_eigenvalue(const std::array< real, nstate > &soln, const dealii::Tensor< 1, dim, real > &normal) const
Maximum convective normal eigenvalue (used in Lax-Friedrichs) of the additional models&#39; PDEs...
std::array< dealii::Tensor< 1, dim, real >, nstate > dissipative_flux(const std::array< real, nstate > &conservative_soln, const std::array< dealii::Tensor< 1, dim, real >, nstate > &solution_gradient, const dealii::types::global_dof_index cell_index) const
Dissipative (i.e. viscous) flux: .
double get_filter_width(const dealii::types::global_dof_index cell_index) const
Compute the nondimensionalized filter width used by the SGS model given a cell index.
ThermalBoundaryCondition
Types of thermal boundary conditions available.
std::array< dealii::Tensor< 1, dim, real >, nstate > convective_flux(const std::array< real, nstate > &conservative_soln) const
Convective flux: .
Small-Small Variational multiscale (VMS) eddy viscosity model. Derived from LargeEddySimulation_VMS f...
std::array< real, nstate > channel_flow_source_term(const std::array< real, nstate > &conservative_soln) const
Channel flow source term.
real2 get_tensor_magnitude_sqr(const dealii::Tensor< 2, dim, real2 > &tensor) const
Returns the square of the magnitude of the tensor (i.e. the double dot product of a tensor with itsel...
std::shared_ptr< ManufacturedSolutionFunction< dim, nspecies, real > > manufactured_solution_function
Manufactured solution function.
Definition: model.h:29
dealii::Tensor< 2, nstate, real > dissipative_flux_directional_jacobian_wrt_gradient_component(const std::array< real, nstate > &conservative_soln, const std::array< dealii::Tensor< 1, dim, real >, nstate > &solution_gradient, const dealii::Tensor< 1, dim, real > &normal, const int d_gradient, const dealii::types::global_dof_index cell_index) const