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
EnthalpyEquationSystem.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 EnthalpyEquationSystem_h
10 #define EnthalpyEquationSystem_h
11 
12 #include <EquationSystem.h>
13 #include <FieldTypeDef.h>
14 #include <NaluParsing.h>
15 
16 namespace stk{
17 struct topology;
18 }
19 
20 namespace sierra{
21 namespace nalu{
22 
23 class AlgorithmDriver;
24 class Realm;
25 class AssembleNodalGradAlgorithmDriver;
26 class AssembleWallHeatTransferAlgorithmDriver;
27 class LinearSystem;
28 class EquationSystems;
29 class ProjectedNodalGradientEquationSystem;
30 class TemperaturePropAlgorithm;
31 
33 
34 public:
35 
37  EquationSystems& equationSystems,
38  const double minT,
39  const double maxT,
40  const bool outputClippingDiag);
41  virtual ~EnthalpyEquationSystem();
42 
43  virtual void register_nodal_fields(
44  stk::mesh::Part *part);
45 
46  void register_interior_algorithm(
47  stk::mesh::Part *part);
48 
49  void register_inflow_bc(
50  stk::mesh::Part *part,
51  const stk::topology &theTopo,
52  const InflowBoundaryConditionData &inflowBCData);
53 
54  void register_open_bc(
55  stk::mesh::Part *part,
56  const stk::topology &theTopo,
57  const OpenBoundaryConditionData &openBCData);
58 
59  void register_wall_bc(
60  stk::mesh::Part *part,
61  const stk::topology &theTopo,
62  const WallBoundaryConditionData &wallBCData);
63 
64  virtual void register_symmetry_bc(
65  stk::mesh::Part *part,
66  const stk::topology &theTopo,
67  const SymmetryBoundaryConditionData &symmetryBCData);
68 
69  virtual void register_non_conformal_bc(
70  stk::mesh::Part *part,
71  const stk::topology &theTopo);
72 
73  virtual void register_overset_bc();
74 
75  void initialize();
76  void reinitialize_linear_system();
77 
78  virtual void register_initial_condition_fcn(
79  stk::mesh::Part *part,
80  const std::map<std::string, std::string> &theNames,
81  const std::map<std::string, std::vector<double> > &theParams);
82 
83  void predict_state();
84 
85  void solve_and_update();
86  void post_iter_work_dep();
87  void post_adapt_work();
88  void extract_temperature();
89  void post_converged_work();
90  void initial_work();
91 
92  void temperature_bc_setup(
93  UserData userData,
94  stk::mesh::Part *part,
95  ScalarFieldType *temperatureBc,
96  ScalarFieldType *enthalpyBc,
97  const bool isInterface = false,
98  const bool copyBcVal = true);
99 
100  void manage_projected_nodal_gradient(
101  EquationSystems& eqSystems);
102  void compute_projected_nodal_gradient();
103 
104  const double minimumT_;
105  const double maximumT_;
106 
107  const bool managePNG_;
109 
121 
125 
128 
130 
131  bool isInit_;
132 
133  std::vector<TemperaturePropAlgorithm *> enthalpyFromTemperatureAlg_;
134  std::vector<Algorithm *> bdf2CopyStateAlg_;
135 
136  // bc enthalpy
137  std::vector<TemperaturePropAlgorithm *> bcEnthalpyFromTemperatureAlg_;
138  std::vector<Algorithm *> bcCopyStateAlg_;
139 
140 };
141 
142 
143 } // namespace nalu
144 } // namespace Sierra
145 
146 #endif
std::vector< TemperaturePropAlgorithm * > bcEnthalpyFromTemperatureAlg_
Definition: EnthalpyEquationSystem.h:137
const bool managePNG_
Definition: EnthalpyEquationSystem.h:107
VectorFieldType * dhdx_
Definition: EnthalpyEquationSystem.h:112
AssembleNodalGradAlgorithmDriver * assembleNodalGradAlgDriver_
Definition: EnthalpyEquationSystem.h:122
const double minimumT_
Definition: EnthalpyEquationSystem.h:104
Definition: ABLForcingAlgorithm.C:26
AssembleWallHeatTransferAlgorithmDriver * assembleWallHeatTransferAlgDriver_
Definition: EnthalpyEquationSystem.h:124
void initialize(int N, aligned_vector &x, aligned_vector &y)
Definition: UnitTestSimdBasic.C:37
std::vector< Algorithm * > bdf2CopyStateAlg_
Definition: EnthalpyEquationSystem.h:134
ScalarFieldType * divQ_
Definition: EnthalpyEquationSystem.h:119
Definition: AssembleNodalGradAlgorithmDriver.h:20
Definition: AssembleWallHeatTransferAlgorithmDriver.h:20
ScalarFieldType * visc_
Definition: EnthalpyEquationSystem.h:114
std::vector< Algorithm * > bcCopyStateAlg_
Definition: EnthalpyEquationSystem.h:138
Definition: EnthalpyEquationSystem.h:32
Definition: Algorithm.h:14
ScalarFieldType * enthalpy_
Definition: EnthalpyEquationSystem.h:110
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
Definition: ProjectedNodalGradientEquationSystem.h:32
ScalarFieldType * specHeat_
Definition: EnthalpyEquationSystem.h:118
Definition: NaluParsing.h:305
Base class representation of a PDE.
Definition: EquationSystem.h:46
ProjectedNodalGradientEquationSystem * projectedNodalGradEqs_
Definition: EnthalpyEquationSystem.h:129
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
ScalarFieldType * hTmp_
Definition: EnthalpyEquationSystem.h:113
const bool outputClippingDiag_
Definition: EnthalpyEquationSystem.h:108
Definition: NaluParsing.h:310
ScalarFieldType * tvisc_
Definition: EnthalpyEquationSystem.h:115
Definition: NaluParsing.h:315
std::vector< TemperaturePropAlgorithm * > enthalpyFromTemperatureAlg_
Definition: EnthalpyEquationSystem.h:133
Definition: AlgorithmDriver.h:22
AlgorithmDriver * diffFluxCoeffAlgDriver_
Definition: EnthalpyEquationSystem.h:123
ScalarFieldType * evisc_
Definition: EnthalpyEquationSystem.h:116
ScalarFieldType * temperature_
Definition: EnthalpyEquationSystem.h:111
bool pmrCouplingActive_
Definition: EnthalpyEquationSystem.h:126
const double maximumT_
Definition: EnthalpyEquationSystem.h:105
Definition: NaluParsing.h:136
bool isInit_
Definition: EnthalpyEquationSystem.h:131
bool lowSpeedCompressActive_
Definition: EnthalpyEquationSystem.h:127
ScalarFieldType * thermalCond_
Definition: EnthalpyEquationSystem.h:117
ScalarFieldType * pOld_
Definition: EnthalpyEquationSystem.h:120