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-2021 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 ThermoType>
30 {
31  return timeSteps_;
32 }
33 
34 
35 template<class ThermoType>
38 {
39  mkDir(this->mesh().time().path()/"TDAC"/this->group());
40  return autoPtr<OFstream>
41  (
42  new OFstream
43  (
44  this->mesh().time().path()/"TDAC"/this->group()/name
45  )
46  );
47 }
48 
49 
50 template<class ThermoType>
53 {
54  return this->Y_;
55 }
56 
57 
58 template<class ThermoType>
61 {
62  return mechRed_;
63 }
64 
65 
66 template<class ThermoType>
69 {
70  return tabulationResults_;
71 }
72 
73 
74 template<class ThermoType>
76 {
77  this->thermo().composition().setActive(i);
78 }
79 
80 
81 template<class ThermoType>
83 {
84  return this->thermo().composition().active(i);
85 }
86 
87 
88 template<class ThermoType>
90 {
91  NsDAC_ = newNsDAC;
92 }
93 
94 
95 template<class ThermoType>
97 {
98  this->nSpecie_ = newNs;
99 }
100 
101 
102 template<class ThermoType>
105 {
106  return simplifiedToCompleteIndex_;
107 }
108 
109 
110 template<class ThermoType>
113 {
114  return completeToSimplifiedIndex_;
115 }
116 
117 
118 template<class ThermoType>
119 inline const Foam::Field<Foam::label>&
121 {
122  return completeToSimplifiedIndex_;
123 }
124 
125 
126 template<class ThermoType>
127 inline Foam::Field<bool>&
129 {
130  return reactionsDisabled_;
131 }
132 
133 
134 template<class ThermoType>
136 {
137  return completeC_;
138 }
139 
140 
141 template<class ThermoType>
143 {
144  return simplifiedC_;
145 }
146 
147 
148 template<class ThermoType>
150 {
151  forAll(tabulationResults_, tabi)
152  {
153  tabulationResults_[tabi] = 2;
154  }
155 }
156 
157 
158 // ************************************************************************* //
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
fluidReactionThermo & thermo
Definition: createFields.H:28
Output to file stream.
Definition: OFstream.H:82
Field< label > & completeToSimplifiedIndex()
const PtrList< volScalarField > & Y()
Return a reference to the list of mass fraction fields.
autoPtr< chemistryReductionMethod< ThermoType > > & mechRed()
DynamicList< label > & simplifiedToCompleteIndex()
Field< bool > & reactionsDisabled()
void setNsDAC(const label newNsDAC)
tmp< volScalarField > tabulationResults() const
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)
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 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)
A class for managing temporary objects.
Definition: PtrList.H:53
fileName path(UMean.rootPath()/UMean.caseName()/functionObjects::writeFile::outputPrefix/"graphs"/UMean.instance())