TDACChemistryModelI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
27 
28 template<class ReactionThermo, class ThermoType>
29 inline bool
31 {
32  return variableTimeStep_;
33 }
34 
35 
36 template<class ReactionThermo, class ThermoType>
37 inline Foam::label
39 {
40  return timeSteps_;
41 }
42 
43 
44 template<class ReactionThermo, class ThermoType>
47 logFile(const word& name) const
48 {
49  mkDir(this->mesh().time().path()/"TDAC"/this->group());
50  return autoPtr<OFstream>
51  (
52  new OFstream
53  (
54  this->mesh().time().path()/"TDAC"/this->group()/name
55  )
56  );
57 }
58 
59 
60 template<class ReactionThermo, class ThermoType>
63 {
64  return this->Y_;
65 }
66 
67 
68 template<class ReactionThermo, class ThermoType>
69 inline
72 {
73  return mechRed_;
74 }
75 
76 
77 template<class ReactionThermo, class ThermoType>
79 (
80  const label i
81 )
82 {
83  this->thermo().composition().setActive(i);
84 }
85 
86 
87 template<class ReactionThermo, class ThermoType>
89 (
90  const label i
91 ) const
92 {
93  return this->thermo().composition().active(i);
94 }
95 
96 
97 template<class ReactionThermo, class ThermoType>
99 setNsDAC(const label newNsDAC)
100 {
101  NsDAC_ = newNsDAC;
102 }
103 
104 
105 template<class ReactionThermo, class ThermoType>
107 setNSpecie(const label newNs)
108 {
109  this->nSpecie_ = newNs;
110 }
111 
112 
113 template<class ReactionThermo, class ThermoType>
117 {
118  return simplifiedToCompleteIndex_;
119 }
120 
121 
122 template<class ReactionThermo, class ThermoType>
126 {
127  return completeToSimplifiedIndex_;
128 }
129 
130 
131 template<class ReactionThermo, class ThermoType>
132 inline const Foam::Field<Foam::label>&
135 {
136  return completeToSimplifiedIndex_;
137 }
138 
139 
140 template<class ReactionThermo, class ThermoType>
141 inline Foam::Field<bool>&
143 {
144  return reactionsDisabled_;
145 }
146 
147 
148 template<class ReactionThermo, class ThermoType>
149 inline Foam::scalarField&
151 {
152  return completeC_;
153 }
154 
155 
156 template<class ReactionThermo, class ThermoType>
157 inline Foam::scalarField&
159 {
160  return simplifiedC_;
161 }
162 
163 
164 template<class ReactionThermo, class ThermoType>
167 {
168  return specieComp_;
169 }
170 
171 
172 template<class ReactionThermo, class ThermoType>
175 {
176  forAll(tabulationResults_, tabi)
177  {
178  tabulationResults_[tabi] = 2;
179  }
180 }
181 
182 
183 // ************************************************************************* //
const char *const group
Group name for atomic constants.
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
PtrList< volScalarField > & Y()
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Output to file stream.
Definition: OFstream.H:82
autoPtr< chemistryReductionMethod< ReactionThermo, ThermoType > > & mechRed()
Field< label > & completeToSimplifiedIndex()
rhoReactionThermo & thermo
Definition: createFields.H:28
DynamicList< label > & simplifiedToCompleteIndex()
Field< bool > & reactionsDisabled()
void setNsDAC(const label newNsDAC)
dynamicFvMesh & mesh
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
Definition: DynamicList.H:56
Pre-declare SubField and related Field type.
Definition: Field.H:56
A class for handling words, derived from string.
Definition: word.H:59
label timeSteps() const
Return the number of chemistry evaluations (used by ISAT)
List< List< specieElement > > & specieComp()
void setNSpecie(const label newNs)
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
Definition: POSIX.C:290
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
bool variableTimeStep() const
Return true if the time-step is variable and/or non-uniform.
bool active(const label i) const
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
autoPtr< OFstream > logFile(const word &name) const
Create and return a TDAC log file of the given name.
void setActive(const label i)
fileName path(UMean.rootPath()/UMean.caseName()/functionObjects::writeFile::outputPrefix/"graphs"/UMean.instance())