1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "instabilityXiEq.H"
27 #include "addToRunTimeSelectionTable.H"
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
35 defineTypeNameAndDebug(instability, 0);
36 addToRunTimeSelectionTable(XiEqModel, instability, dictionary);
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
43 Foam::XiEqModels::instability::instability
45 const dictionary& XiEqProperties,
46 const hhuCombustionThermo& thermo,
47 const compressible::RASModel& turbulence,
48 const volScalarField& Su
51 XiEqModel(XiEqProperties, thermo, turbulence, Su),
52 XiEqIn(readScalar(XiEqModelCoeffs_.lookup("XiEqIn"))),
53 XiEqModel_(XiEqModel::New(XiEqModelCoeffs_, thermo, turbulence, Su))
57 // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
59 Foam::XiEqModels::instability::~instability()
63 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
65 Foam::tmp<Foam::volScalarField> Foam::XiEqModels::instability::XiEq() const
67 volScalarField turbXiEq(XiEqModel_->XiEq());
68 return XiEqIn/turbXiEq + turbXiEq;
72 bool Foam::XiEqModels::instability::read(const dictionary& XiEqProperties)
74 XiEqModel::read(XiEqProperties);
76 XiEqModelCoeffs_.lookup("XiEqIn") >> XiEqIn;
78 return XiEqModel_->read(XiEqModelCoeffs_);
82 // ************************************************************************* //