solidChemistryModelI.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) 2013-2016 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 #include "volFields.H"
27 
28 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
29 
30 template<class CompType, class SolidThermo>
33 {
34  return RRs_;
35 }
36 
37 template<class CompType, class SolidThermo>
40 {
41  return reactions_;
42 }
43 
44 
45 template<class CompType, class SolidThermo>
46 inline Foam::label
48 nReaction() const
49 {
50  return nReaction_;
51 }
52 
53 
54 template<class CompType, class SolidThermo>
57 (
58  const label i
59 ) const
60 {
61  return RRs_[i];
62 }
63 
64 
65 template<class CompType, class SolidThermo>
68 {
70  (
72  (
73  IOobject
74  (
75  "RRs",
76  this->time().timeName(),
77  this->mesh(),
78  IOobject::NO_READ,
79  IOobject::NO_WRITE
80  ),
81  this->mesh(),
83  )
84  );
85 
86  if (this->chemistry_)
87  {
88  volScalarField::Internal& RRs = tRRs.ref();
89  for (label i=0; i < nSolids_; i++)
90  {
91  RRs += RRs_[i];
92  }
93  }
94  return tRRs;
95 }
96 
97 
98 // ************************************************************************* //
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::Internal > & RRs()
Write access to source terms for solids.
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:174
const PtrList< Reaction< SolidThermo > > & reactions() const
The reactions.
const dimensionSet dimVolume(pow3(dimLength))
Definition: dimensionSets.H:58
dynamicFvMesh & mesh
word timeName
Definition: getTimeIndex.H:3
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
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
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
label nReaction() const
The number of reactions.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
A class for managing temporary objects.
Definition: PtrList.H:53
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92