pyrolysisChemistryModelI.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) 2013-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
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/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "volFields.H"
29 
30 
31 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
32 
33 template<class CompType, class SolidThermo, class GasThermo>
36 {
37  return RRg_;
38 }
39 
40 
41 template<class CompType, class SolidThermo, class GasThermo>
42 inline const Foam::PtrList<GasThermo>&
44 gasThermo() const
45 {
46  return gasThermo_;
47 }
48 
49 
50 template<class CompType, class SolidThermo, class GasThermo>
51 inline const Foam::speciesTable&
53 gasTable() const
54 {
55  return pyrolisisGases_;
56 }
57 
58 
59 template<class CompType, class SolidThermo, class GasThermo>
60 inline Foam::label
62 nSpecie() const
63 {
64  return nSpecie_;
65 }
66 
67 
68 template<class CompType, class SolidThermo, class GasThermo>
71 (
72  const label i
73 ) const
74 {
75  return RRg_[i];
76 }
77 
78 
79 template<class CompType, class SolidThermo, class GasThermo>
82 RRg() const
83 {
85  (
87  (
88  IOobject
89  (
90  "RRg",
91  this->time().timeName(),
92  this->mesh(),
93  IOobject::NO_READ,
94  IOobject::NO_WRITE
95  ),
96  this->mesh(),
98  )
99  );
100 
101  if (this->chemistry_)
102  {
103  volScalarField::Internal& RRg = tRRg.ref();
104  for (label i=0; i < nGases_; i++)
105  {
106  RRg += RRg_[i];
107  }
108  }
109 
110  return tRRg;
111 }
112 
113 
114 // ************************************************************************* //
volFields.H
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::pyrolysisChemistryModel::nSpecie
label nSpecie() const
The number of solids.
Definition: pyrolysisChemistryModelI.H:62
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:53
Foam::tmp::ref
T & ref() const
Definition: tmpI.H:227
Foam::hashedWordList
A wordList with hashed named lookup, which can be faster in some situations than using the normal lis...
Definition: hashedWordList.H:54
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
timeName
word timeName
Definition: getTimeIndex.H:3
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::dimMass
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:51
Foam::pyrolysisChemistryModel::gasTable
const speciesTable & gasTable() const
Gases table.
Definition: pyrolysisChemistryModelI.H:53
Foam::pyrolysisChemistryModel::gasThermo
const PtrList< GasThermo > & gasThermo() const
Thermodynamic data of gases.
Definition: pyrolysisChemistryModelI.H:44
Foam::dimVolume
const dimensionSet dimVolume(pow3(dimLength))
Definition: dimensionSets.H:60
Foam::pyrolysisChemistryModel::RRg
PtrList< volScalarField::Internal > & RRg()
Write access to source terms for gases.
Definition: pyrolysisChemistryModelI.H:35
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54