VertexCFD  0.0-dev
VertexCFD_Closure_IncompressibleConstantSource.hpp
1 #ifndef VERTEXCFD_CLOSURE_INCOMPRESSIBLECONSTANTSOURCE_HPP
2 #define VERTEXCFD_CLOSURE_INCOMPRESSIBLECONSTANTSOURCE_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 #include <string>
16 
17 namespace VertexCFD
18 {
19 namespace ClosureModel
20 {
21 //---------------------------------------------------------------------------//
22 // Multi-dimension constant source evaluation.
23 //---------------------------------------------------------------------------//
24 template<class EvalType, class Traits, int NumSpaceDim>
26  : public panzer::EvaluatorWithBaseImpl<Traits>,
27  public PHX::EvaluatorDerived<EvalType, Traits>
28 {
29  public:
30  using scalar_type = typename EvalType::ScalarT;
31  static constexpr int num_space_dim = NumSpaceDim;
32 
34  const panzer::IntegrationRule& ir,
35  const Teuchos::ParameterList& fluid_params,
36  const Teuchos::RCP<panzer::GlobalData>& global_data,
37  const Teuchos::ParameterList& closure_params);
38 
39  void evaluateFields(typename Traits::EvalData /* workset */) override;
40 
41  Kokkos::Array<PHX::MDField<scalar_type, panzer::Cell, panzer::Point>,
42  num_space_dim>
43  _momentum_source;
44  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _energy_source;
45  Teuchos::RCP<panzer::GlobalData> _global_data;
46 
47  private:
48  bool _solve_temp;
49  bool _solve_ind_less_mhd;
50  Kokkos::Array<scalar_type, num_space_dim> _mom_input_source;
51  double _energy_input_source;
52 
53  enum FlowDirection
54  {
55  x,
56  y,
57  z
58  };
59 
60  FlowDirection _flow_direction;
61  int _flow_direction_idx;
62 
63  bool _const_vol_flow;
64  scalar_type _m_target;
65  scalar_type _bottom_wall_area;
66  scalar_type _inlet_wall_area;
67  scalar_type _m_bc;
68  scalar_type _wall_shear_stress;
69  scalar_type _lorentz_force;
70 };
71 
72 //---------------------------------------------------------------------------//
73 
74 } // end namespace ClosureModel
75 } // end namespace VertexCFD
76 
77 #endif // end VERTEXCFD_CLOSURE_INCOMPRESSIBLECONSTANTSOURCE_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::ClosureModel::IncompressibleConstantSource
Definition: VertexCFD_Closure_IncompressibleConstantSource.hpp:28