EulerImplicit.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) 2011-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 Class
25  Foam::EulerImplicit
26 
27 Description
28  An Euler implicit solver for chemistry
29 
30 SourceFiles
31  EulerImplicit.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef EulerImplicit_H
36 #define EulerImplicit_H
37 
38 #include "chemistrySolver.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class EulerImplicit Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 template<class ChemistryModel>
50 class EulerImplicit
51 :
52  public chemistrySolver<ChemistryModel>
53 {
54  // Private data
55 
56  //- Coefficients dictionary
57  dictionary coeffsDict_;
58 
59 
60  // Model constants
61 
62  //- Chemistry timescale
63  scalar cTauChem_;
64 
65  //- Equilibrium rate limiter flag (on/off)
66  Switch eqRateLimiter_;
67 
68  // Solver data
69  mutable scalarField cTp_;
70 
71 
72 public:
73 
74  //- Runtime type information
75  TypeName("EulerImplicit");
76 
77 
78  // Constructors
79 
80  //- Construct from mesh and phase name
81  EulerImplicit(const fvMesh& mesh, const word& phaseName);
82 
83 
84  //- Destructor
85  virtual ~EulerImplicit();
86 
87 
88  // Member Functions
89 
91  (
92  const label index,
93  const scalar pr,
94  const scalar pf,
95  const scalar corr,
96  const label lRef,
97  const label rRef,
98  const scalar p,
99  const scalar T,
101  ) const;
102 
103  //- Update the concentrations and return the chemical time
104  virtual void solve
105  (
106  scalarField& c,
107  scalar& T,
108  scalar& p,
109  scalar& deltaT,
110  scalar& subDeltaT
111  ) const;
112 };
113 
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #ifdef NoRepository
122  #include "EulerImplicit.C"
123 #endif
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 #endif
128 
129 // ************************************************************************* //
An abstract base class for solving chemistry.
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
EulerImplicit(const fvMesh &mesh, const word &phaseName)
Construct from mesh and phase name.
Definition: EulerImplicit.C:34
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
Definition: Switch.H:60
TypeName("EulerImplicit")
Runtime type information.
dynamicFvMesh & mesh
A class for handling words, derived from string.
Definition: word.H:59
A simple square matrix solver with scalar coefficients.
Definition: simpleMatrix.H:47
virtual void solve(scalarField &c, scalar &T, scalar &p, scalar &deltaT, scalar &subDeltaT) const
Update the concentrations and return the chemical time.
Definition: EulerImplicit.C:93
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
const dimensionedScalar c
Speed of light in a vacuum.
const scalar RR
Universal gas constant (default in [J/(kmol K)])
An Euler implicit solver for chemistry.
Definition: EulerImplicit.H:49
volScalarField & p
void updateRRInReactionI(const label index, const scalar pr, const scalar pf, const scalar corr, const label lRef, const label rRef, const scalar p, const scalar T, simpleMatrix< scalar > &RR) const
Definition: EulerImplicit.C:58
virtual ~EulerImplicit()
Destructor.
Definition: EulerImplicit.C:50
Namespace for OpenFOAM.