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 {
37  defineTypeNameAndDebug(basicChemistryModel, 0);
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 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:77
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::basicThermo
Abstract base-class for fluid and solid thermodynamic properties.
Definition: basicThermo.H:63
basicChemistryModel.H
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:53
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::dimensioned< scalar >
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::basicChemistryModel::correct
void correct()
Correct function - updates due to mesh changes.
Definition: basicChemistryModel.C:42
Time.H
Foam::basicChemistryModel::~basicChemistryModel
virtual ~basicChemistryModel()
Destructor.
Definition: basicChemistryModel.C:83
Foam::PtrListOps::get
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
constant
constant condensation/saturation model.
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)