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
TurbulenceAveragingPostProcessing.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 TurbulenceAveragingPostProcessing_h
10 #define TurbulenceAveragingPostProcessing_h
11 
12 #include <NaluParsing.h>
13 
14 #include <string>
15 #include <vector>
16 #include <utility>
17 
18 // stk forwards
19 namespace stk {
20  namespace mesh {
21  class BulkData;
22  class FieldBase;
23  class MetaData;
24  class Part;
25  typedef std::vector<Part*> PartVector;
26  class Selector;
27  }
28 }
29 
30 namespace sierra{
31 namespace nalu{
32 
33 class Realm;
34 class AveragingInfo;
35 
37 {
38 public:
39 
41  Realm &realm,
42  const YAML::Node &node);
44 
45  // load all of the options
46  void load(
47  const YAML::Node & node);
48 
49  // setup nodal field registration; parts, fields, etc
50  void setup();
51 
52  void register_field_from_primitive(
53  const std::string primitiveName,
54  const std::string averagedName,
55  stk::mesh::MetaData &metaData,
56  stk::mesh::Part *part);
57 
58  void construct_pair(
59  const std::string primitiveName,
60  const std::string averagedName,
61  std::vector<std::pair<stk::mesh::FieldBase *, stk::mesh::FieldBase *> > &fieldVecPair,
62  std::vector<unsigned> &fieldSizeVec_,
63  stk::mesh::MetaData &metaData);
64 
65  void register_field(
66  const std::string fieldName,
67  const int fieldSize,
68  stk::mesh::MetaData &metaData,
69  stk::mesh::Part *targetPart);
70 
71  void review(
72  const AveragingInfo *avInfo);
73 
74  // populate nodal field and output norms (if appropriate)
75  void execute();
76 
77  // compute tke and stress for each type of operation
78  void compute_tke(
79  const bool isReynolds,
80  const std::string &averageBlockName,
81  stk::mesh::Selector s_all_nodes);
82 
83  void compute_reynolds_stress(
84  const std::string &averageBlockName,
85  const double &oldTimeFilter,
86  const double &zeroCurrent,
87  const double &dt,
88  stk::mesh::Selector s_all_nodes);
89 
90  void compute_favre_stress(
91  const std::string &averageBlockName,
92  const double &oldTimeFilter,
93  const double &zeroCurrent,
94  const double &dt,
95  stk::mesh::Selector s_all_nodes);
96 
97  void compute_vorticity(
98  const std::string &averageBlockName,
99  stk::mesh::Selector s_all_nodes);
100 
101  void compute_q_criterion(
102  const std::string &averageBlockName,
103  stk::mesh::Selector s_all_nodes);
104 
105  void compute_lambda_ci(
106  const std::string &averageBlockName,
107  stk::mesh::Selector s_all_nodes);
108 
109  // hold the realm
111 
112  double currentTimeFilter_; /* provided by restart */
113  double timeFilterInterval_; /* user supplied */
114  bool forcedReset_; /* allows forhard reset */
115 
116  // vector of averaging information
117  std::vector<AveragingInfo *> averageInfoVec_;
118 };
119 
120 } // namespace nalu
121 } // namespace Sierra
122 
123 #endif
std::vector< AveragingInfo * > averageInfoVec_
Definition: TurbulenceAveragingPostProcessing.h:117
std::vector< Part * > PartVector
Definition: Algorithm.h:16
Definition: ABLForcingAlgorithm.C:26
double timeFilterInterval_
Definition: TurbulenceAveragingPostProcessing.h:113
double currentTimeFilter_
Definition: TurbulenceAveragingPostProcessing.h:112
Definition: TurbulenceAveragingPostProcessing.h:36
Definition: Algorithm.h:14
bool forcedReset_
Definition: TurbulenceAveragingPostProcessing.h:114
Realm & realm_
Definition: TurbulenceAveragingPostProcessing.h:110
Definition: AveragingInfo.h:28
Tpetra::Map< LocalOrdinal, GlobalOrdinal >::node_type Node
Definition: LinearSolver.h:32
Definition: Realm.h:82