Forward compatibility: flex
[foam-extend-3.2.git] / src / thermophysicalModels / laminarFlameSpeed / constant / constant.C
blob9e8231899f8f64fb326abac222906c1e780461d0
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation, either version 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "constant.H"
27 #include "addToRunTimeSelectionTable.H"
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 namespace Foam
33 namespace laminarFlameSpeedModels
35     defineTypeNameAndDebug(constant, 0);
37     addToRunTimeSelectionTable
38     (
39         laminarFlameSpeed,
40         constant,
41         dictionary
42     );
47 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
49 Foam::laminarFlameSpeedModels::constant::constant
51     const dictionary& dict,
52     const hhuCombustionThermo& ct
55     laminarFlameSpeed(dict, ct),
57     Su_(dict.lookup("Su"))
61 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
63 Foam::laminarFlameSpeedModels::constant::~constant()
67 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
69 Foam::tmp<Foam::volScalarField>
70 Foam::laminarFlameSpeedModels::constant::operator()() const
72     return tmp<volScalarField>
73     (
74         new volScalarField
75         (
76             IOobject
77             (
78                 "Su0",
79                 hhuCombustionThermo_.T().time().timeName(),
80                 hhuCombustionThermo_.T().db(),
81                 IOobject::NO_READ,
82                 IOobject::NO_WRITE
83             ),
84             hhuCombustionThermo_.T().mesh(),
85             Su_
86         )
87     );
91 // ************************************************************************* //