FreeFOAM The Cross-Platform CFD Toolkit
ODEChemistryModelI.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) 2009-2010 OpenCFD Ltd.
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 <finiteVolume/volFields.H>
28 
29 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
30 
31 template<class CompType, class ThermoType>
34 {
35  return RR_;
36 }
37 
38 
39 template<class CompType, class ThermoType>
42 {
43  return reactions_;
44 }
45 
46 
47 template<class CompType, class ThermoType>
48 inline const Foam::PtrList<ThermoType>&
50 {
51  return specieThermo_;
52 }
53 
54 
55 template<class CompType, class ThermoType>
56 inline Foam::label
58 {
59  return nSpecie_;
60 }
61 
62 
63 template<class CompType, class ThermoType>
64 inline Foam::label
66 {
67  return nReaction_;
68 }
69 
70 
71 template<class CompType, class ThermoType>
74 {
75  return solver_;
76 }
77 
78 
79 template<class CompType, class ThermoType>
82 (
83  const label i
84 ) const
85 {
87  (
88  new volScalarField
89  (
90  IOobject
91  (
92  "RR(" + this->Y_[i].name() + ')',
93  this->time().timeName(),
94  this->mesh(),
95  IOobject::NO_READ,
96  IOobject::NO_WRITE
97  ),
98  this->mesh(),
100  zeroGradientFvPatchScalarField::typeName
101  )
102  );
103 
104  if (this->chemistry_)
105  {
106  tRR().internalField() = RR_[i];
107  tRR().correctBoundaryConditions();
108  }
109  return tRR;
110 }
111 
112 
113 // ************************ vim: set sw=4 sts=4 et: ************************ //