ode.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) 2011-2020 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 Class
25  Foam::ode
26 
27 Description
28  An ODE solver for chemistry
29 
30 SourceFiles
31  ode.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef ode_H
36 #define ode_H
37 
38 #include "chemistrySolver.H"
39 #include "ODESolver.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class ode Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class ChemistryModel>
51 class ode
52 :
53  public chemistrySolver<ChemistryModel>
54 {
55  // Private Data
56 
57  dictionary coeffsDict_;
58 
59  mutable autoPtr<ODESolver> odeSolver_;
60 
61  // Solver data
62  mutable scalarField cTp_;
63 
64 
65 public:
66 
67  //- Runtime type information
68  TypeName("ode");
69 
70 
71  // Constructors
72 
73  //- Construct from thermo
75 
76 
77  //- Destructor
78  virtual ~ode();
79 
80 
81  // Member Functions
82 
83  //- Update the concentrations and return the chemical time
84  virtual void solve
85  (
86  scalar& p,
87  scalar& T,
88  scalarField& c,
89  const label li,
90  scalar& deltaT,
91  scalar& subDeltaT
92  ) const;
93 };
94 
95 
96 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97 
98 } // End namespace Foam
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 #ifdef NoRepository
103  #include "ode.C"
104 #endif
105 
106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 
108 #endif
109 
110 // ************************************************************************* //
An abstract base class for solving chemistry.
fluidReactionThermo & thermo
Definition: createFields.H:28
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual void solve(scalar &p, scalar &T, scalarField &c, const label li, scalar &deltaT, scalar &subDeltaT) const
Update the concentrations and return the chemical time.
Definition: ode.C:51
Base-class for multi-component fluid thermodynamic properties.
An ODE solver for chemistry.
Definition: ode.H:50
const dimensionedScalar c
Speed of light in a vacuum.
ode(const fluidReactionThermo &thermo)
Construct from thermo.
Definition: ode.C:31
TypeName("ode")
Runtime type information.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
volScalarField & p
virtual ~ode()
Destructor.
Definition: ode.C:43
Namespace for OpenFOAM.