1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
10 OpenFOAM is free software: you can redistribute it and/or modify it
11 under the terms of the GNU General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
15 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 You should have received a copy of the GNU General Public License
21 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 \*---------------------------------------------------------------------------*/
25 #include "combustionModel.H"
27 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
29 Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New
31 const dictionary& combustionProperties,
32 hsCombustionThermo& thermo,
33 const compressible::turbulenceModel& turbulence,
34 const surfaceScalarField& phi,
35 const volScalarField& rho
38 word combustionModelTypeName = combustionProperties.lookup
43 Info<< "Selecting combustion model " << combustionModelTypeName << endl;
45 dictionaryConstructorTable::iterator cstrIter =
46 dictionaryConstructorTablePtr_->find(combustionModelTypeName);
48 if (cstrIter == dictionaryConstructorTablePtr_->end())
52 "combustionModel::New"
53 ) << "Unknown combustionModel type "
54 << combustionModelTypeName << endl << endl
55 << "Valid combustionModels are : " << endl
56 << dictionaryConstructorTablePtr_->toc()
60 return autoPtr<combustionModel>
61 (cstrIter()(combustionProperties, thermo, turbulence, phi, rho));
65 // ************************************************************************* //