basicChemistryModel.C
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-2021 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 "basicChemistryModel.H"
27 
28 /* * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * */
29 
30 namespace Foam
31 {
32  template<>
34  {
35  "fast",
36  "exact"
37  };
38 }
39 
40 
41 const Foam::NamedEnum
42 <
44  2
46 
47 
48 namespace Foam
49 {
52 }
53 
54 
55 // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
56 
58 {}
59 
60 
61 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
62 
64 (
65  const fluidReactionThermo& thermo
66 )
67 :
69  (
70  IOobject
71  (
72  thermo.phasePropertyName("chemistryProperties"),
73  thermo.T().mesh().time().constant(),
74  thermo.T().mesh(),
77  )
78  ),
79  mesh_(thermo.T().mesh()),
80  thermo_(thermo),
81  chemistry_(lookup("chemistry")),
82  deltaTChemIni_(lookup<scalar>("initialChemicalTimeStep")),
83  deltaTChemMax_(lookupOrDefault("maxChemicalTimeStep", great)),
84  deltaTChem_
85  (
86  IOobject
87  (
88  thermo.phasePropertyName("deltaTChem"),
89  mesh().time().constant(),
90  mesh(),
93  ),
94  mesh(),
95  dimensionedScalar(dimTime, deltaTChemIni_)
96  )
97 {}
98 
99 
100 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
101 
103 {}
104 
105 
106 // ************************************************************************* //
static word phasePropertyName(const word &name, const word &phaseName)
Name of a property for a given phase.
Definition: basicThermo.H:150
jacobianType
Enumeration for the type of Jacobian to be calculated by the.
Base-class for multi-component fluid thermodynamic properties.
void correct()
Correct function - updates due to mesh changes.
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:372
fvMesh & mesh
Initialise the NamedEnum HashTable from the static list of names.
Definition: NamedEnum.H:51
static const NamedEnum< jacobianType, 2 > jacobianTypeNames_
Jacobian type names.
basicChemistryModel(const fluidReactionThermo &thermo)
Construct from thermo.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
virtual ~basicChemistryModel()
Destructor.
const dimensionSet dimTime
stressControl lookup("compactNormalStress") >> compactNormalStress
const word & constant() const
Return constant name.
Definition: TimePaths.H:123
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
const Mesh & mesh() const
Return mesh.
defineTypeNameAndDebug(combustionModel, 0)
virtual const volScalarField & T() const =0
Temperature [K].
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:98
Namespace for OpenFOAM.
Base class for chemistry models.