VertexCFD  0.0-dev
VertexCFD_BoundaryState_IncompressibleNoSlip.hpp
1 #ifndef VERTEXCFD_BOUNDARYSTATE_INCOMPRESSIBLENOSLIP_HPP
2 #define VERTEXCFD_BOUNDARYSTATE_INCOMPRESSIBLENOSLIP_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 <Teuchos_ParameterList.hpp>
13 
14 #include <Kokkos_Core.hpp>
15 
16 namespace VertexCFD
17 {
18 namespace BoundaryCondition
19 {
20 //---------------------------------------------------------------------------//
21 template<class EvalType, class Traits, int NumSpaceDim>
22 class IncompressibleNoSlip : 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  IncompressibleNoSlip(const panzer::IntegrationRule& ir,
30  const Teuchos::ParameterList& fluid_params,
31  const Teuchos::ParameterList& bc_params,
32  const bool is_edac);
33 
34  void evaluateFields(typename Traits::EvalData workset) override;
35 
36  KOKKOS_INLINE_FUNCTION
37  void operator()(
38  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
39 
40  public:
41  PHX::MDField<scalar_type, panzer::Cell, panzer::Point>
42  _boundary_lagrange_pressure;
43  PHX::MDField<scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
44  _boundary_grad_lagrange_pressure;
45  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _boundary_temperature;
46  Kokkos::Array<PHX::MDField<scalar_type, panzer::Cell, panzer::Point>,
47  num_space_dim>
48  _boundary_velocity;
49 
50  Kokkos::Array<
51  PHX::MDField<scalar_type, panzer::Cell, panzer::Point, panzer::Dim>,
52  num_space_dim>
53  _boundary_grad_velocity;
54  PHX::MDField<scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
55  _boundary_grad_temperature;
56 
57  private:
58  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _lagrange_pressure;
59  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _temperature;
60  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
61  _grad_lagrange_pressure;
62  Kokkos::Array<
63  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>,
64  num_space_dim>
65  _grad_velocity;
66  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
67  _grad_temperature;
68  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
69  _normals;
70  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _kappa;
71 
72  bool _solve_temp;
73  bool _set_lagrange_pressure;
74  double _lp_wall;
75  bool _is_edac;
76  double _T_wall;
77  double _wall_flux;
78 
79  enum TempProfile
80  {
81  isothermal,
82  adiabatic,
83  flux
84  };
85 
86  TempProfile _temperature_profile;
87 };
88 
89 //---------------------------------------------------------------------------//
90 
91 } // end namespace BoundaryCondition
92 } // end namespace VertexCFD
93 
94 #endif // VERTEXCFD_BOUNDARYSTATE_INCOMPRESSIBLENOSLIP_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::BoundaryCondition::IncompressibleNoSlip
Definition: VertexCFD_BoundaryState_IncompressibleNoSlip.hpp:24