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
MassFractionEquationSystem.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 MassFractionEquationSystem_h
10 #define MassFractionEquationSystem_h
11 
12 #include <EquationSystem.h>
13 #include <FieldTypeDef.h>
14 #include <NaluParsing.h>
15 
16 // c++
17 #include <set>
18 
19 namespace stk{
20 struct topology;
21 }
22 
23 namespace sierra{
24 namespace nalu{
25 
26 class AlgorithmDriver;
27 class Realm;
28 class AssembleNodalGradAlgorithmDriver;
29 class LinearSystem;
30 class EquationSystems;
31 
33 
34 public:
35 
37  EquationSystems& equationSystems,
38  const int numMassFraction);
39  virtual ~MassFractionEquationSystem();
40 
41  void register_nodal_fields(
42  stk::mesh::Part *part);
43 
44  void register_interior_algorithm(
45  stk::mesh::Part *part);
46 
47  void register_inflow_bc(
48  stk::mesh::Part *part,
49  const stk::topology &theTopo,
50  const InflowBoundaryConditionData &inflowBCData);
51 
52  void register_open_bc(
53  stk::mesh::Part *part,
54  const stk::topology &theTopo,
55  const OpenBoundaryConditionData &openBCData);
56 
57  void register_wall_bc(
58  stk::mesh::Part *part,
59  const stk::topology &theTopo,
60  const WallBoundaryConditionData &wallBCData);
61 
62  virtual void register_symmetry_bc(
63  stk::mesh::Part *part,
64  const stk::topology &theTopo,
65  const SymmetryBoundaryConditionData &symmetryBCData);
66 
67  virtual void register_non_conformal_bc(
68  stk::mesh::Part *part,
69  const stk::topology &theTopo);
70 
71  virtual void register_overset_bc();
72 
73  void initialize();
74 
75  void predict_state();
76 
77  void set_current_mass_fraction(
78  const int k);
79 
80  void copy_mass_fraction(
81  const stk::mesh::FieldBase &fromField,
82  const int fromFieldIndex,
83  const stk::mesh::FieldBase &toField,
84  const int toFieldIndex);
85 
86  void solve_and_update();
87  void compute_nth_mass_fraction();
88 
89  bool system_is_converged();
90  double provide_scaled_norm();
91  double provide_norm();
92 
93  const bool managePNG_;
94 
95  const int numMassFraction_;
96 
104 
107 
108  bool isInit_;
109 
112 
113  // hold all of the pairs of boundary condition data
114  std::set<std::pair<stk::mesh::FieldBase *, stk::mesh::FieldBase *> > bcMassFractionSet_;
115 };
116 
117 } // namespace nalu
118 } // namespace Sierra
119 
120 #endif
GenericFieldType * massFraction_
Definition: MassFractionEquationSystem.h:97
ScalarFieldType * visc_
Definition: MassFractionEquationSystem.h:101
Definition: ABLForcingAlgorithm.C:26
ScalarFieldType * yTmp_
Definition: MassFractionEquationSystem.h:100
void initialize(int N, aligned_vector &x, aligned_vector &y)
Definition: UnitTestSimdBasic.C:37
std::set< std::pair< stk::mesh::FieldBase *, stk::mesh::FieldBase * > > bcMassFractionSet_
Definition: MassFractionEquationSystem.h:114
stk::mesh::Field< double, stk::mesh::SimpleArrayTag > GenericFieldType
Definition: FieldTypeDef.h:27
VectorFieldType * dydx_
Definition: MassFractionEquationSystem.h:99
const int numMassFraction_
Definition: MassFractionEquationSystem.h:95
AssembleNodalGradAlgorithmDriver * assembleNodalGradAlgDriver_
Definition: MassFractionEquationSystem.h:105
AlgorithmDriver * diffFluxCoeffAlgDriver_
Definition: MassFractionEquationSystem.h:106
Definition: AssembleNodalGradAlgorithmDriver.h:20
const bool managePNG_
Definition: MassFractionEquationSystem.h:93
Definition: MassFractionEquationSystem.h:32
ScalarFieldType * currentMassFraction_
Definition: MassFractionEquationSystem.h:98
double firstNonLinearResidualSum_
Definition: MassFractionEquationSystem.h:111
Definition: Algorithm.h:14
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
Definition: FieldTypeDef.h:24
A collection of Equations to be solved on a Realm.
Definition: EquationSystems.h:56
Definition: NaluParsing.h:325
double nonLinearResidualSum_
Definition: MassFractionEquationSystem.h:110
Definition: NaluParsing.h:305
Base class representation of a PDE.
Definition: EquationSystem.h:46
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
Definition: NaluParsing.h:310
ScalarFieldType * evisc_
Definition: MassFractionEquationSystem.h:103
Definition: NaluParsing.h:315
bool isInit_
Definition: MassFractionEquationSystem.h:108
Definition: AlgorithmDriver.h:22
ScalarFieldType * tvisc_
Definition: MassFractionEquationSystem.h:102