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 \*---------------------------------------------------------------------------*/
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
57 turbulenceModel(rho, U, phi, thermophysicalModel)
61 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
63 autoPtr<laminar> laminar::New
65 const volScalarField& rho,
66 const volVectorField& U,
67 const surfaceScalarField& phi,
68 const basicThermo& thermophysicalModel
71 return autoPtr<laminar>(new laminar(rho, U, phi, thermophysicalModel));
75 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
77 tmp<volScalarField> laminar::mut() const
79 return tmp<volScalarField>
92 dimensionedScalar("mut", mu().dimensions(), 0.0)
98 tmp<volScalarField> laminar::k() const
100 return tmp<volScalarField>
113 dimensionedScalar("k", sqr(U_.dimensions()), 0.0)
119 tmp<volScalarField> laminar::epsilon() const
121 return tmp<volScalarField>
136 "epsilon", sqr(U_.dimensions())/dimTime, 0.0
143 tmp<volSymmTensorField> laminar::R() const
145 return tmp<volSymmTensorField>
147 new volSymmTensorField
158 dimensionedSymmTensor
160 "R", sqr(U_.dimensions()), symmTensor::zero
167 tmp<volSymmTensorField> laminar::devRhoReff() const
169 return tmp<volSymmTensorField>
171 new volSymmTensorField
181 -mu()*dev(twoSymm(fvc::grad(U_)))
187 tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const
191 - fvm::laplacian(muEff(), U)
192 - fvc::div(muEff()*dev2(fvc::grad(U)().T()))
203 void laminar::correct()
205 turbulenceModel::correct();
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 } // End namespace incompressible
212 } // End namespace Foam
214 // ************************************************************************* //