VertexCFD  0.0-dev
VertexCFD_Closure_IncompressibleChienKEpsilonSource.hpp
1 #ifndef VERTEXCFD_CLOSURE_INCOMPRESSIBLECHIENKEPSILONSOURCE_HPP
2 #define VERTEXCFD_CLOSURE_INCOMPRESSIBLECHIENKEPSILONSOURCE_HPP
3 
4 #include <Panzer_Dimension.hpp>
5 #include <Panzer_Evaluator_WithBaseImpl.hpp>
6 #include <Panzer_GlobalData.hpp>
7 
8 #include <Phalanx_Evaluator_Derived.hpp>
9 #include <Phalanx_Evaluator_WithBaseImpl.hpp>
10 #include <Phalanx_FieldManager.hpp>
11 #include <Phalanx_config.hpp>
12 
13 #include <Kokkos_Core.hpp>
14 
15 namespace VertexCFD
16 {
17 namespace ClosureModel
18 {
19 //---------------------------------------------------------------------------//
20 // Source term for Chien's low-Re K-Epsilon turbulence model
21 //---------------------------------------------------------------------------//
22 template<class EvalType, class Traits, int NumSpaceDim>
24  : public panzer::EvaluatorWithBaseImpl<Traits>,
25  public PHX::EvaluatorDerived<EvalType, Traits>
26 {
27  public:
28  using scalar_type = typename EvalType::ScalarT;
29  static constexpr int num_space_dim = NumSpaceDim;
30 
32  const panzer::IntegrationRule& ir,
33  const Teuchos::RCP<panzer::GlobalData>& global_data,
34  const Teuchos::ParameterList& user_params);
35 
36  void evaluateFields(typename Traits::EvalData workset) override;
37 
38  KOKKOS_INLINE_FUNCTION
39  void operator()(
40  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
41 
42  private:
43  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _nu;
44  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _nu_t;
45  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point>
46  _turb_kinetic_energy;
47  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point>
48  _turb_dissipation_rate;
49  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _distance;
50 
51  Kokkos::Array<
52  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>,
53  num_space_dim>
54  _grad_velocity;
55  Teuchos::RCP<panzer::GlobalData> _global_data;
56 
57  double _C_nu;
58  double _C_1;
59  double _C_2;
60  double _f_one;
61 
62  double _area;
63 
64  scalar_type _wall_shear_stress;
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> _e_source;
71  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _e_prod;
72  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _e_dest;
73 };
74 
75 //---------------------------------------------------------------------------//
76 
77 } // end namespace ClosureModel
78 } // end namespace VertexCFD
79 
80 #endif // end
81  // VERTEXCFD_CLOSURE_INCOMPRESSIBLECHIENKEPSILONSOURCE_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::ClosureModel::IncompressibleChienKEpsilonSource
Definition: VertexCFD_Closure_IncompressibleChienKEpsilonSource.hpp:26