1 /*---------------------------------------------------------------------------*\
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 -------------------------------------------------------------------------------
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 "turbulenceModel.H"
27 #include "volFields.H"
28 #include "surfaceFields.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 namespace compressible
37 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
39 defineTypeNameAndDebug(turbulenceModel, 0);
40 defineRunTimeSelectionTable(turbulenceModel, turbulenceModel);
42 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
44 turbulenceModel::turbulenceModel
46 const volScalarField& rho,
47 const volVectorField& U,
48 const surfaceScalarField& phi,
49 const basicThermo& thermophysicalModel
58 thermophysicalModel_(thermophysicalModel)
62 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
64 autoPtr<turbulenceModel> turbulenceModel::New
66 const volScalarField& rho,
67 const volVectorField& U,
68 const surfaceScalarField& phi,
69 const basicThermo& thermophysicalModel
74 // Enclose the creation of the dictionary to ensure it is deleted
75 // before the turbulenceModel is created otherwise the dictionary is
76 // entered in the database twice
82 "turbulenceProperties",
90 dict.lookup("simulationType") >> modelName;
93 Info<< "Selecting turbulence model type " << modelName << endl;
95 turbulenceModelConstructorTable::iterator cstrIter =
96 turbulenceModelConstructorTablePtr_->find(modelName);
98 if (cstrIter == turbulenceModelConstructorTablePtr_->end())
102 "turbulenceModel::New(const volScalarField&, "
103 "const volVectorField&, const surfaceScalarField&, "
105 ) << "Unknown turbulenceModel type " << modelName
107 << "Valid turbulenceModel types are :" << endl
108 << turbulenceModelConstructorTablePtr_->sortedToc()
112 return autoPtr<turbulenceModel>
114 cstrIter()(rho, U, phi, thermophysicalModel)
119 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
121 void turbulenceModel::correct()
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 } // End namespace compressible
128 } // End namespace Foam
130 // ************************************************************************* //