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
MomentumNSOElemSuppAlgDep.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 MomentumNSOElemSuppAlgDep_h
10 #define MomentumNSOElemSuppAlgDep_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  VectorFieldType *velocity,
31  GenericFieldType *Gju,
32  ScalarFieldType *viscosity,
33  const double fourthFac,
34  const double altResFac);
35 
37 
38  virtual void setup();
39 
40  virtual void elem_resize(
41  MasterElement *meSCS,
42  MasterElement *meSCV);
43 
44  virtual void elem_execute(
45  double *lhs,
46  double *rhs,
47  stk::mesh::Entity element,
48  MasterElement *meSCS,
49  MasterElement *meSCV);
50 
51  const stk::mesh::BulkData *bulkData_;
52 
64  double dt_;
65  const int nDim_;
66  double gamma1_;
67  double gamma2_;
68  double gamma3_;
69  const double Cupw_;
70  const double small_;
71  const double fourthFac_;
72  const double altResFac_;
73  const double om_altResFac_;
74  const double nonConservedForm_;
75  const double includeDivU_;
76  const bool useShiftedGradOp_;
77 
78  // fixed space
79  std::vector<double> ws_dukdxScs_;
80  std::vector<double> ws_rhoVrtmScs_;
81  std::vector<double> ws_dpdxScs_;
82  std::vector<double> ws_kd_;
83 
84  // scratch space; geometry
85  std::vector<double> ws_scs_areav_;
86  std::vector<double> ws_dndx_;
87  std::vector<double> ws_deriv_;
88  std::vector<double> ws_det_j_;
89  std::vector<double> ws_shape_function_;
90  std::vector<double> ws_gUpper_;
91  std::vector<double> ws_gLower_;
92 
93  // scratch space; fields
94  std::vector<double> ws_uNm1_;
95  std::vector<double> ws_uN_;
96  std::vector<double> ws_uNp1_;
97  std::vector<double> ws_rhoNm1_;
98  std::vector<double> ws_rhoN_;
99  std::vector<double> ws_rhoNp1_;
100  std::vector<double> ws_pressure_;
101  std::vector<double> ws_velocityRTM_;
102  std::vector<double> ws_coordinates_;
103  std::vector<double> ws_viscosity_;
104  std::vector<double> ws_Gju_;
105 };
106 
107 } // namespace nalu
108 } // namespace Sierra
109 
110 #endif
const double small_
Definition: MomentumNSOElemSuppAlgDep.h:70
std::vector< double > ws_rhoN_
Definition: MomentumNSOElemSuppAlgDep.h:98
double gamma2_
Definition: MomentumNSOElemSuppAlgDep.h:67
double dt_
Definition: MomentumNSOElemSuppAlgDep.h:64
virtual void elem_execute(double *lhs, double *rhs, stk::mesh::Entity element, MasterElement *meSCS, MasterElement *meSCV)
Definition: MomentumNSOElemSuppAlgDep.C:147
Definition: ABLForcingAlgorithm.C:26
Definition: MasterElement.h:53
const double nonConservedForm_
Definition: MomentumNSOElemSuppAlgDep.h:74
const stk::mesh::BulkData * bulkData_
Definition: MomentumNSOElemSuppAlgDep.h:51
stk::mesh::Field< double, stk::mesh::SimpleArrayTag > GenericFieldType
Definition: FieldTypeDef.h:27
ScalarFieldType * densityNp1_
Definition: MomentumNSOElemSuppAlgDep.h:58
virtual void setup()
Definition: MomentumNSOElemSuppAlgDep.C:135
std::vector< double > ws_uNm1_
Definition: MomentumNSOElemSuppAlgDep.h:94
const double includeDivU_
Definition: MomentumNSOElemSuppAlgDep.h:75
std::vector< double > ws_deriv_
Definition: MomentumNSOElemSuppAlgDep.h:87
std::vector< double > ws_rhoNm1_
Definition: MomentumNSOElemSuppAlgDep.h:97
const double fourthFac_
Definition: MomentumNSOElemSuppAlgDep.h:71
virtual void elem_resize(MasterElement *meSCS, MasterElement *meSCV)
Definition: MomentumNSOElemSuppAlgDep.C:98
double gamma3_
Definition: MomentumNSOElemSuppAlgDep.h:68
std::vector< double > ws_rhoNp1_
Definition: MomentumNSOElemSuppAlgDep.h:99
std::vector< double > ws_coordinates_
Definition: MomentumNSOElemSuppAlgDep.h:102
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
Definition: FieldTypeDef.h:24
GenericFieldType * Gju_
Definition: MomentumNSOElemSuppAlgDep.h:63
virtual ~MomentumNSOElemSuppAlgDep()
Definition: MomentumNSOElemSuppAlgDep.h:36
std::vector< double > ws_rhoVrtmScs_
Definition: MomentumNSOElemSuppAlgDep.h:80
const double Cupw_
Definition: MomentumNSOElemSuppAlgDep.h:69
static constexpr double lhs[8][8]
Definition: UnitTestContinuityAdvElem.C:25
std::vector< double > ws_dpdxScs_
Definition: MomentumNSOElemSuppAlgDep.h:81
std::vector< double > ws_viscosity_
Definition: MomentumNSOElemSuppAlgDep.h:103
const double om_altResFac_
Definition: MomentumNSOElemSuppAlgDep.h:73
std::vector< double > ws_det_j_
Definition: MomentumNSOElemSuppAlgDep.h:88
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
static constexpr double rhs[8]
Definition: UnitTestContinuityAdvElem.C:18
VectorFieldType * velocityNm1_
Definition: MomentumNSOElemSuppAlgDep.h:53
ScalarFieldType * densityNm1_
Definition: MomentumNSOElemSuppAlgDep.h:56
std::vector< double > ws_gUpper_
Definition: MomentumNSOElemSuppAlgDep.h:90
ScalarFieldType * viscosity_
Definition: MomentumNSOElemSuppAlgDep.h:62
std::vector< double > ws_uNp1_
Definition: MomentumNSOElemSuppAlgDep.h:96
std::vector< double > ws_gLower_
Definition: MomentumNSOElemSuppAlgDep.h:91
std::vector< double > ws_Gju_
Definition: MomentumNSOElemSuppAlgDep.h:104
ScalarFieldType * pressure_
Definition: MomentumNSOElemSuppAlgDep.h:59
std::vector< double > ws_shape_function_
Definition: MomentumNSOElemSuppAlgDep.h:89
VectorFieldType * velocityN_
Definition: MomentumNSOElemSuppAlgDep.h:54
const int nDim_
Definition: MomentumNSOElemSuppAlgDep.h:65
Definition: UnitTestMasterElements.C:367
VectorFieldType * velocityNp1_
Definition: MomentumNSOElemSuppAlgDep.h:55
ScalarFieldType * densityN_
Definition: MomentumNSOElemSuppAlgDep.h:57
std::vector< double > ws_pressure_
Definition: MomentumNSOElemSuppAlgDep.h:100
std::vector< double > ws_dukdxScs_
Definition: MomentumNSOElemSuppAlgDep.h:79
double gamma1_
Definition: MomentumNSOElemSuppAlgDep.h:66
VectorFieldType * velocityRTM_
Definition: MomentumNSOElemSuppAlgDep.h:60
VectorFieldType * coordinates_
Definition: MomentumNSOElemSuppAlgDep.h:61
const double altResFac_
Definition: MomentumNSOElemSuppAlgDep.h:72
Definition: Realm.h:82
const bool useShiftedGradOp_
Definition: MomentumNSOElemSuppAlgDep.h:76
Definition: SupplementalAlgorithm.h:24
std::vector< double > ws_dndx_
Definition: MomentumNSOElemSuppAlgDep.h:86
std::vector< double > ws_scs_areav_
Definition: MomentumNSOElemSuppAlgDep.h:85
std::vector< double > ws_kd_
Definition: MomentumNSOElemSuppAlgDep.h:82
MomentumNSOElemSuppAlgDep(Realm &realm, VectorFieldType *velocity, GenericFieldType *Gju, ScalarFieldType *viscosity, const double fourthFac, const double altResFac)
Definition: MomentumNSOElemSuppAlgDep.C:32
std::vector< double > ws_velocityRTM_
Definition: MomentumNSOElemSuppAlgDep.h:101
Definition: MomentumNSOElemSuppAlgDep.h:24
std::vector< double > ws_uN_
Definition: MomentumNSOElemSuppAlgDep.h:95