basicChemistryModel.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2018 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "basicChemistryModel.H"
30 #include "fvMesh.H"
31 #include "Time.H"
32 
33 /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
34 
35 namespace Foam
36 {
38 }
39 
40 // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
41 
43 {}
44 
45 
46 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
47 
48 Foam::basicChemistryModel::basicChemistryModel(basicThermo& thermo)
49 :
51  (
52  IOobject
53  (
54  thermo.phasePropertyName("chemistryProperties"),
55  thermo.db().time().constant(),
56  thermo.db(),
57  IOobject::MUST_READ_IF_MODIFIED,
58  IOobject::NO_WRITE
59  )
60  ),
61  mesh_(thermo.p().mesh()),
62  chemistry_(get<Switch>("chemistry")),
63  deltaTChemIni_(get<scalar>("initialChemicalTimeStep")),
64  deltaTChemMax_(getOrDefault<scalar>("maxChemicalTimeStep", GREAT)),
65  deltaTChem_
66  (
67  IOobject
68  (
69  thermo.phasePropertyName("deltaTChem"),
70  mesh().time().constant(),
71  mesh(),
72  IOobject::NO_READ,
73  IOobject::NO_WRITE
74  ),
75  mesh(),
76  dimensionedScalar("deltaTChem0", dimTime, deltaTChemIni_)
77  )
78 {}
79 
80 
81 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
82 
84 {}
85 
86 
87 // ************************************************************************* //
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
Abstract base-class for fluid and solid thermodynamic properties.
Definition: basicThermo.H:59
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
Definition: Switch.H:77
void correct()
Correct function - updates due to mesh changes.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:50
virtual ~basicChemistryModel()
Destructor.
dynamicFvMesh & mesh
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
defineTypeNameAndDebug(combustionModel, 0)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
volScalarField & p
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition: IOobject.H:172
Namespace for OpenFOAM.
Base class for chemistry models.