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
RadiativeTransportEquationSystem.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 RadiativeTransportEquationSystem_h
10 #define RadiativeTransportEquationSystem_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 LinearSystem;
26 class EquationSystems;
27 
28 
30 
31 public:
32 
34  EquationSystems& equationSystems,
35  const int quadratureOrder,
36  const bool activateScattering,
37  const bool activateUpwind,
38  const bool deactivateSucv,
39  const bool externalCoupling);
41 
42  void register_nodal_fields(
43  stk::mesh::Part *part);
44 
45  void register_edge_fields(
46  stk::mesh::Part *part);
47 
48  void register_element_fields(
49  stk::mesh::Part *part,
50  const stk::topology &theTopo);
51 
52  void register_interior_algorithm(
53  stk::mesh::Part *part);
54 
55  void register_wall_bc(
56  stk::mesh::Part *part,
57  const stk::topology &theTopo,
58  const WallBoundaryConditionData &wallBCData);
59 
60  void initialize();
61 
62  void predict_state();
63 
64  void solve_and_update();
65 
66  void set_current_ordinate_info(
67  const int k);
68 
69  void initialize_intensity();
70  void compute_bc_intensity();
71  void compute_radiation_source();
72 
73  bool system_is_converged();
74  double provide_scaled_norm();
75  double provide_norm();
76 
77  void zero_out_fields();
78  void zero_irradiation();
79 
80  void assemble_boundary_area();
81 
82  void assemble_fields();
83  void assemble_irradiation();
84  void normalize_irradiation();
85 
86  void compute_div_norm();
87 
88  void copy_ordinate_intensity(
89  const ScalarFieldType &fromField,
90  const ScalarFieldType &toField);
91 
92  void get_current_ordinate_info(
93  double &weight,
94  double *Sk) const;
95 
96  void get_current_ordinate(
97  double *Sk) const;
98 
99  double get_stefan_boltzmann() const;
100 
102  get_intensity() const;
103 
104  void create_quadrature_set();
105 
106  const int quadratureOrder_;
108  const bool activateUpwind_;
109  const bool deactivateSucv_;
110  const bool externalCoupling_;
111 
134 
135  bool isInit_;
137 
138  // total set
139  std::vector<double> Sn_;
140  std::vector<double> weights_;
141 
142  // current set
143  std::vector<double> currentSn_;
145  double stefanBoltz_;
149 
150  // saved of mesh parts for interior and boundary
151  std::vector<stk::mesh::Part *> interiorPartVec_;
152  std::vector<stk::mesh::Part *> bcPartVec_;
153 
154 };
155 
156 
157 } // namespace nalu
158 } // namespace Sierra
159 
160 #endif
const bool activateUpwind_
Definition: RadiativeTransportEquationSystem.h:108
ScalarFieldType * transmissivity_
Definition: RadiativeTransportEquationSystem.h:116
const int quadratureOrder_
Definition: RadiativeTransportEquationSystem.h:106
ScalarFieldType * temperature_
Definition: RadiativeTransportEquationSystem.h:121
Definition: ABLForcingAlgorithm.C:26
void initialize(int N, aligned_vector &x, aligned_vector &y)
Definition: UnitTestSimdBasic.C:37
ScalarFieldType * dualNodalVolume_
Definition: RadiativeTransportEquationSystem.h:119
std::vector< double > Sn_
Definition: RadiativeTransportEquationSystem.h:139
const bool externalCoupling_
Definition: RadiativeTransportEquationSystem.h:110
ScalarFieldType * bcTemperature_
Definition: RadiativeTransportEquationSystem.h:131
ScalarFieldType * currentIntensity_
Definition: RadiativeTransportEquationSystem.h:113
std::vector< stk::mesh::Part * > bcPartVec_
Definition: RadiativeTransportEquationSystem.h:152
double firstNonLinearResidualSum_
Definition: RadiativeTransportEquationSystem.h:148
const bool deactivateSucv_
Definition: RadiativeTransportEquationSystem.h:109
ScalarFieldType * environmentalT_
Definition: RadiativeTransportEquationSystem.h:117
ScalarFieldType * scatteringCoeff_
Definition: RadiativeTransportEquationSystem.h:128
ScalarFieldType * radiationSource_
Definition: RadiativeTransportEquationSystem.h:124
ScalarFieldType * scalarFlux_
Definition: RadiativeTransportEquationSystem.h:125
Definition: Algorithm.h:14
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
Definition: FieldTypeDef.h:24
ScalarFieldType * intensityBc_
Definition: RadiativeTransportEquationSystem.h:114
A collection of Equations to be solved on a Realm.
Definition: EquationSystems.h:56
double stefanBoltz_
Definition: RadiativeTransportEquationSystem.h:145
Definition: NaluParsing.h:305
double systemL2Norm_
Definition: RadiativeTransportEquationSystem.h:146
ScalarFieldType * scalarFluxOld_
Definition: RadiativeTransportEquationSystem.h:126
double currentWeight_
Definition: RadiativeTransportEquationSystem.h:144
Base class representation of a PDE.
Definition: EquationSystem.h:46
ScalarFieldType * irradiation_
Definition: RadiativeTransportEquationSystem.h:130
ScalarFieldType * divRadiativeHeatFlux_
Definition: RadiativeTransportEquationSystem.h:123
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
double nonLinearResidualSum_
Definition: RadiativeTransportEquationSystem.h:147
Definition: RadiativeTransportEquationSystem.h:29
AlgorithmDriver * bcIntensityAlgDriver_
Definition: RadiativeTransportEquationSystem.h:133
int ordinateDirections_
Definition: RadiativeTransportEquationSystem.h:136
std::vector< double > weights_
Definition: RadiativeTransportEquationSystem.h:140
std::vector< double > currentSn_
Definition: RadiativeTransportEquationSystem.h:143
ScalarFieldType * emissivity_
Definition: RadiativeTransportEquationSystem.h:115
Definition: AlgorithmDriver.h:22
ScalarFieldType * iTmp_
Definition: RadiativeTransportEquationSystem.h:118
const bool activateScattering_
Definition: RadiativeTransportEquationSystem.h:107
bool isInit_
Definition: RadiativeTransportEquationSystem.h:135
std::vector< stk::mesh::Part * > interiorPartVec_
Definition: RadiativeTransportEquationSystem.h:151
ScalarFieldType * intensity_
Definition: RadiativeTransportEquationSystem.h:112
VectorFieldType * edgeAreaVec_
Definition: RadiativeTransportEquationSystem.h:129
VectorFieldType * coordinates_
Definition: RadiativeTransportEquationSystem.h:120
VectorFieldType * radiativeHeatFlux_
Definition: RadiativeTransportEquationSystem.h:122
ScalarFieldType * assembledBoundaryArea_
Definition: RadiativeTransportEquationSystem.h:132
ScalarFieldType * absorptionCoeff_
Definition: RadiativeTransportEquationSystem.h:127