1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
29 #include "volFields.H"
32 #include "fvmLaplacian.H"
33 #include "addToRunTimeSelectionTable.H"
36 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 namespace compressible
43 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
45 defineTypeNameAndDebug(laminar, 0);
46 addToRunTimeSelectionTable(turbulenceModel, laminar, turbulenceModel);
48 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
52 const volScalarField& rho,
53 const volVectorField& U,
54 const surfaceScalarField& phi,
55 const basicThermo& thermophysicalModel
58 turbulenceModel(rho, U, phi, thermophysicalModel)
62 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
64 autoPtr<laminar> laminar::New
66 const volScalarField& rho,
67 const volVectorField& U,
68 const surfaceScalarField& phi,
69 const basicThermo& thermophysicalModel
72 return autoPtr<laminar>(new laminar(rho, U, phi, thermophysicalModel));
76 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
78 tmp<volScalarField> laminar::mut() const
80 return tmp<volScalarField>
93 dimensionedScalar("mut", mu().dimensions(), 0.0)
99 tmp<volScalarField> laminar::k() const
101 return tmp<volScalarField>
114 dimensionedScalar("k", sqr(U_.dimensions()), 0.0)
120 tmp<volScalarField> laminar::epsilon() const
122 return tmp<volScalarField>
137 "epsilon", sqr(U_.dimensions())/dimTime, 0.0
144 tmp<volSymmTensorField> laminar::R() const
146 return tmp<volSymmTensorField>
148 new volSymmTensorField
159 dimensionedSymmTensor
161 "R", sqr(U_.dimensions()), symmTensor::zero
168 tmp<volSymmTensorField> laminar::devRhoReff() const
170 return tmp<volSymmTensorField>
172 new volSymmTensorField
182 -mu()*dev(twoSymm(fvc::grad(U_)))
188 tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const
192 - fvm::laplacian(muEff(), U)
193 - fvc::div(muEff()*dev2(fvc::grad(U)().T()))
204 void laminar::correct()
206 turbulenceModel::correct();
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212 } // End namespace incompressible
213 } // End namespace Foam
215 // ************************************************************************* //