Loading...
Searching...
No Matches
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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2016-2017 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26\*---------------------------------------------------------------------------*/
27
28// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
29
30template<class ReactionThermo, class ThermoType>
31inline bool
34 return variableTimeStep_;
35}
36
37
38template<class ReactionThermo, class ThermoType>
39inline Foam::label
42 return timeSteps_;
43}
44
45
46template<class ReactionThermo, class ThermoType>
49logFile(const word& name) const
50{
51 mkDir(this->mesh().time().path()/"TDAC"/this->group());
53 (
54 new OFstream
55 (
56 this->mesh().time().path()/"TDAC"/this->group()/name
57 )
58 );
59}
60
61
62template<class ReactionThermo, class ThermoType>
65{
66 return this->Y_;
67}
68
69
70template<class ReactionThermo, class ThermoType>
71inline
74{
75 return mechRed_;
76}
77
78
79template<class ReactionThermo, class ThermoType>
81(
82 const label i
84{
85 this->thermo().composition().setActive(i);
86}
87
88
89template<class ReactionThermo, class ThermoType>
91(
92 const label i
93) const
94{
95 return this->thermo().composition().active(i);
96}
97
98
99template<class ReactionThermo, class ThermoType>
101setNsDAC(const label newNsDAC)
102{
103 NsDAC_ = newNsDAC;
104}
105
106
107template<class ReactionThermo, class ThermoType>
109setNSpecie(const label newNs)
111 this->nSpecie_ = newNs;
112}
113
114
115template<class ReactionThermo, class ThermoType>
120 return simplifiedToCompleteIndex_;
121}
122
123
124template<class ReactionThermo, class ThermoType>
129 return completeToSimplifiedIndex_;
130}
131
132
133template<class ReactionThermo, class ThermoType>
134inline const Foam::Field<Foam::label>&
138 return completeToSimplifiedIndex_;
139}
140
141
142template<class ReactionThermo, class ThermoType>
143inline Foam::Field<bool>&
146 return reactionsDisabled_;
147}
148
149
150template<class ReactionThermo, class ThermoType>
151inline Foam::scalarField&
154 return completeC_;
155}
156
157
158template<class ReactionThermo, class ThermoType>
159inline Foam::scalarField&
162 return simplifiedC_;
163}
164
165
166template<class ReactionThermo, class ThermoType>
169{
170 return specieComp_;
171}
172
173
174template<class ReactionThermo, class ThermoType>
177{
178 for (auto& res : tabulationResults_)
179 {
180 res = 2;
181 }
182}
183
184
185// ************************************************************************* //
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition DynamicList.H:68
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Definition Field.H:172
const Time & time() const noexcept
Return Time associated with the objectRegistry.
Definition IOobject.C:456
static word group(const word &name)
Return group (extension part of name).
Definition IOobject.C:300
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
Output to file stream as an OSstream, normally using std::ofstream for the actual output.
Definition OFstream.H:75
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition PtrList.H:67
PtrList< volScalarField > & Y_
Reference to the field of specie mass fractions.
bool active(const label i) const
void setNsDAC(const label newNsDAC)
autoPtr< chemistryReductionMethod< ReactionThermo, ThermoType > > & mechRed()
autoPtr< OFstream > logFile(const word &name) const
Create and return a TDAC log file of the given name.
void setNSpecie(const label newNs)
DynamicList< label > & simplifiedToCompleteIndex()
List< List< specieElement > > & specieComp()
PtrList< volScalarField > & Y()
label timeSteps() const
Return the number of chemistry evaluations (used by ISAT).
Field< label > & completeToSimplifiedIndex()
bool variableTimeStep() const
Return true if the time-step is variable and/or non-uniform.
Field< bool > & reactionsDisabled()
void setActive(const label i)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A class for handling words, derived from Foam::string.
Definition word.H:66
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
dynamicFvMesh & mesh
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
psiReactionThermo & thermo
mkDir(pdfPath)