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 \*---------------------------------------------------------------------------*/
28 #include "volFields.H"
31 #include "fvmLaplacian.H"
32 #include "addToRunTimeSelectionTable.H"
35 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 namespace compressible
42 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
44 defineTypeNameAndDebug(laminar, 0);
45 addToRunTimeSelectionTable(turbulenceModel, laminar, turbulenceModel);
47 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
51 const volScalarField& rho,
52 const volVectorField& U,
53 const surfaceScalarField& phi,
54 const basicThermo& thermophysicalModel,
55 const word& turbulenceModelName
58 turbulenceModel(rho, U, phi, thermophysicalModel, turbulenceModelName)
62 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
64 autoPtr<laminar> laminar::New
66 const volScalarField& rho,
67 const volVectorField& U,
68 const surfaceScalarField& phi,
69 const basicThermo& thermophysicalModel,
70 const word& turbulenceModelName
73 return autoPtr<laminar>
75 new laminar(rho, U, phi, thermophysicalModel, turbulenceModelName)
80 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
82 tmp<volScalarField> laminar::mut() const
84 return tmp<volScalarField>
97 dimensionedScalar("mut", mu().dimensions(), 0.0)
103 tmp<volScalarField> laminar::alphat() const
105 return tmp<volScalarField>
118 dimensionedScalar("alphat", alpha().dimensions(), 0.0)
124 tmp<volScalarField> laminar::k() const
126 return tmp<volScalarField>
139 dimensionedScalar("k", sqr(U_.dimensions()), 0.0)
145 tmp<volScalarField> laminar::epsilon() const
147 return tmp<volScalarField>
162 "epsilon", sqr(U_.dimensions())/dimTime, 0.0
169 tmp<volSymmTensorField> laminar::R() const
171 return tmp<volSymmTensorField>
173 new volSymmTensorField
184 dimensionedSymmTensor
186 "R", sqr(U_.dimensions()), symmTensor::zero
193 tmp<volSymmTensorField> laminar::devRhoReff() const
195 return tmp<volSymmTensorField>
197 new volSymmTensorField
207 -mu()*dev(twoSymm(fvc::grad(U_)))
213 tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const
217 - fvm::laplacian(muEff(), U)
218 - fvc::div(muEff()*dev2(T(fvc::grad(U))))
223 void laminar::correct()
225 turbulenceModel::correct();
235 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
237 } // End namespace incompressible
238 } // End namespace Foam
240 // ************************************************************************* //