VertexCFD  0.0-dev
VertexCFD_Closure_IncompressibleSSTSource.hpp
1 #ifndef VERTEXCFD_CLOSURE_INCOMPRESSIBLESSTSOURCE_HPP
2 #define VERTEXCFD_CLOSURE_INCOMPRESSIBLESSTSOURCE_HPP
3 
4 #include <Panzer_Dimension.hpp>
5 #include <Panzer_Evaluator_WithBaseImpl.hpp>
6 
7 #include <Phalanx_Evaluator_Derived.hpp>
8 #include <Phalanx_Evaluator_WithBaseImpl.hpp>
9 #include <Phalanx_FieldManager.hpp>
10 #include <Phalanx_config.hpp>
11 
12 #include <Kokkos_Core.hpp>
13 
14 namespace VertexCFD
15 {
16 namespace ClosureModel
17 {
18 //---------------------------------------------------------------------------//
19 // Source term for Menter's SST K-Omega turbulence model
20 //---------------------------------------------------------------------------//
21 template<class EvalType, class Traits, int NumSpaceDim>
22 class IncompressibleSSTSource : public panzer::EvaluatorWithBaseImpl<Traits>,
23  public PHX::EvaluatorDerived<EvalType, Traits>
24 {
25  public:
26  using scalar_type = typename EvalType::ScalarT;
27  static constexpr int num_space_dim = NumSpaceDim;
28 
29  IncompressibleSSTSource(const panzer::IntegrationRule& ir,
30  const Teuchos::ParameterList& user_params);
31 
32  void evaluateFields(typename Traits::EvalData workset) override;
33 
34  KOKKOS_INLINE_FUNCTION
35  void operator()(
36  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
37 
38  private:
39  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _nu_t;
40  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point>
41  _turb_kinetic_energy;
42  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point>
43  _turb_specific_dissipation_rate;
44  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
45  _grad_turb_kinetic_energy;
46  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
47  _grad_turb_specific_dissipation_rate;
48  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point>
49  _sst_blending_function;
50 
51  Kokkos::Array<
52  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>,
53  num_space_dim>
54  _grad_velocity;
55 
56  double _beta_star;
57  double _kappa;
58  double _beta_1;
59  double _beta_2;
60  double _sigma_w1;
61  double _sigma_w2;
62  double _gamma_1;
63  double _gamma_2;
64  bool _limit_production;
65 
66  public:
67  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _k_source;
68  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _k_prod;
69  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _k_dest;
70  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _w_source;
71  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _w_prod;
72  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _w_dest;
73  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _w_cross;
74 };
75 
76 //---------------------------------------------------------------------------//
77 
78 } // end namespace ClosureModel
79 } // end namespace VertexCFD
80 
81 #endif // end
82  // VERTEXCFD_CLOSURE_INCOMPRESSIBLESSTSOURCE_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::ClosureModel::IncompressibleSSTSource
Definition: VertexCFD_Closure_IncompressibleSSTSource.hpp:24