TDACChemistryModelI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2016-2017 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 CompType, class ThermoType>
29 inline bool
31 {
32  return variableTimeStep_;
33 }
34 
35 
36 template<class CompType, class ThermoType>
37 inline Foam::label
39 {
40  return timeSteps_;
41 }
42 
43 
44 template<class CompType, class ThermoType>
47 {
48  mkDir(this->mesh().time().path()/"TDAC");
49  return autoPtr<OFstream>
50  (
51  new OFstream
52  (
53  this->mesh().time().path()/"TDAC"/name
54  )
55  );
56 }
57 
58 
59 template<class CompType, class ThermoType>
62 {
63  return this->Y_;
64 }
65 
66 
67 template<class CompType, class ThermoType>
70 {
71  return mechRed_;
72 }
73 
74 
75 template<class CompType, class ThermoType>
77 (
78  const label i
79 )
80 {
81  this->thermo().composition().setActive(i);
82 }
83 
84 
85 template<class CompType, class ThermoType>
87 (
88  const label i
89 ) const
90 {
91  return this->thermo().composition().active(i);
92 }
93 
94 
95 template<class CompType, class ThermoType>
96 inline void
98 {
99  NsDAC_ = newNsDAC;
100 }
101 
102 
103 template<class CompType, class ThermoType>
104 inline void
106 {
107  this->nSpecie_ = newNs;
108 }
109 
110 
111 template<class CompType, class ThermoType>
114 {
115  return simplifiedToCompleteIndex_;
116 }
117 
118 
119 template<class CompType, class ThermoType>
122 {
123  return completeToSimplifiedIndex_;
124 }
125 
126 
127 template<class CompType, class ThermoType>
128 inline const Foam::Field<Foam::label>&
131 {
132  return completeToSimplifiedIndex_;
133 }
134 
135 
136 template<class CompType, class ThermoType>
137 inline Foam::Field<bool>&
139 {
140  return reactionsDisabled_;
141 }
142 
143 
144 template<class CompType, class ThermoType>
145 inline Foam::scalarField&
147 {
148  return completeC_;
149 }
150 
151 
152 template<class CompType, class ThermoType>
153 inline Foam::scalarField&
155 {
156  return simplifiedC_;
157 }
158 
159 
160 template<class CompType, class ThermoType>
163 {
164  return specieComp_;
165 }
166 
167 
168 template<class CompType, class ThermoType>
170 {
171  forAll(tabulationResults_, tabi)
172  {
173  tabulationResults_[tabi] = 2;
174  }
175 }
176 
177 
178 // ************************************************************************* //
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:428
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:60
Output to file stream.
Definition: OFstream.H:82
Field< label > & completeToSimplifiedIndex()
DynamicList< label > & simplifiedToCompleteIndex()
Field< bool > & reactionsDisabled()
void setNsDAC(const label newNsDAC)
psiReactionThermo & thermo
Definition: createFields.H:31
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:57
A class for handling words, derived from string.
Definition: word.H:59
label timeSteps() const
Return the number of chemistry evaluations (used by ISAT)
autoPtr< chemistryReductionMethod< CompType, ThermoType > > & mechRed()
List< List< specieElement > > & specieComp()
void setNSpecie(const label newNs)
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
Definition: POSIX.C:297
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:63
autoPtr< OFstream > logFile(const word &name) const
Create and return a TDAC log file of the given name.
void setActive(const label i)