Nalu
Nalu: a generalized unstructured massively parallel low Mach flow code designed to support a variety of energy applications of interest (most notably Wind ECP) built on the Sierra Toolkit and Trilinos solver Tpetra/Epetra stack. The open source BSD, clause 3 license model has been chosen for the code base. See LICENSE for more information. http://NaluCFD.org
TurbKineticEnergyKsgsBuoyantElemSuppAlg.h
Go to the documentation of this file.
1 /*------------------------------------------------------------------------*/
2 /* Copyright 2014 Sandia Corporation. */
3 /* This software is released under the license detailed */
4 /* in the file, LICENSE, which is located in the top-level Nalu */
5 /* directory structure */
6 /*------------------------------------------------------------------------*/
7 
8 
9 #ifndef TurbKineticEnergyKsgsBuoyantElemSuppAlg_h
10 #define TurbKineticEnergyKsgsBuoyantElemSuppAlg_h
11 
12 #include <SupplementalAlgorithm.h>
13 #include <FieldTypeDef.h>
14 
15 #include <stk_mesh/base/BulkData.hpp>
16 #include <stk_mesh/base/Entity.hpp>
17 
18 namespace sierra{
19 namespace nalu{
20 
21 class Realm;
22 class MasterElement;
23 
25 {
26 public:
27 
29  Realm &realm);
30 
32 
33  virtual void setup();
34 
35  virtual void elem_resize(
36  MasterElement *meSCS,
37  MasterElement *meSCV);
38 
39  virtual void elem_execute(
40  double *lhs,
41  double *rhs,
42  stk::mesh::Entity element,
43  MasterElement *meSCS,
44  MasterElement *meSCV);
45 
46  double cross_product_magnitude();
47 
48  const stk::mesh::BulkData *bulkData_;
49 
54 
55  const double CbTwo_;
56  const int nDim_;
57 
58  // fixed space
59  std::vector<double> ws_gravity_;
60  std::vector<double> ws_drhodx_;
61 
62  // scratch space
63  std::vector<double> ws_dndx_;
64  std::vector<double> ws_deriv_;
65  std::vector<double> ws_det_j_;
66  std::vector<double> ws_shape_function_;
67 
68  std::vector<double> ws_tkeNp1_;
69  std::vector<double> ws_rhoNp1_;
70  std::vector<double> ws_dualNodalVolume_;
71  std::vector<double> ws_coordinates_;
72  std::vector<double> ws_scv_volume_;
73 };
74 
75 } // namespace nalu
76 } // namespace Sierra
77 
78 #endif
std::vector< double > ws_tkeNp1_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:68
std::vector< double > ws_rhoNp1_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:69
virtual void setup()
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.C:94
Definition: ABLForcingAlgorithm.C:26
Definition: MasterElement.h:53
std::vector< double > ws_deriv_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:64
std::vector< double > ws_dualNodalVolume_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:70
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:24
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
Definition: FieldTypeDef.h:24
VectorFieldType * coordinates_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:53
ScalarFieldType * densityNp1_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:51
std::vector< double > ws_drhodx_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:60
virtual void elem_execute(double *lhs, double *rhs, stk::mesh::Entity element, MasterElement *meSCS, MasterElement *meSCV)
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.C:103
TurbKineticEnergyKsgsBuoyantElemSuppAlg(Realm &realm)
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.C:33
static constexpr double lhs[8][8]
Definition: UnitTestContinuityAdvElem.C:25
std::vector< double > ws_dndx_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:63
std::vector< double > ws_gravity_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:59
ScalarFieldType * dualNodalVolume_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:52
std::vector< double > ws_det_j_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:65
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
virtual ~TurbKineticEnergyKsgsBuoyantElemSuppAlg()
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:31
static constexpr double rhs[8]
Definition: UnitTestContinuityAdvElem.C:18
const double CbTwo_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:55
double cross_product_magnitude()
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.C:191
Definition: UnitTestMasterElements.C:367
std::vector< double > ws_coordinates_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:71
const stk::mesh::BulkData * bulkData_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:48
std::vector< double > ws_shape_function_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:66
virtual void elem_resize(MasterElement *meSCS, MasterElement *meSCV)
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.C:67
Definition: Realm.h:82
Definition: SupplementalAlgorithm.h:24
std::vector< double > ws_scv_volume_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:72
const int nDim_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:56
ScalarFieldType * tkeNp1_
Definition: TurbKineticEnergyKsgsBuoyantElemSuppAlg.h:50