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 \*---------------------------------------------------------------------------*/
28 #include "addToRunTimeSelectionTable.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 namespace compressible
39 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41 defineTypeNameAndDebug(laminar, 0);
42 addToRunTimeSelectionTable(RASModel, laminar, dictionary);
44 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
48 const volScalarField& rho,
49 const volVectorField& U,
50 const surfaceScalarField& phi,
51 const basicThermo& thermophysicalModel
54 RASModel(typeName, rho, U, phi, thermophysicalModel)
58 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
60 tmp<volScalarField> laminar::mut() const
62 return tmp<volScalarField>
75 dimensionedScalar("mut", mu().dimensions(), 0.0)
81 tmp<volScalarField> laminar::k() const
83 return tmp<volScalarField>
96 dimensionedScalar("k", sqr(U_.dimensions()), 0.0)
102 tmp<volScalarField> laminar::epsilon() const
104 return tmp<volScalarField>
119 "epsilon", sqr(U_.dimensions())/dimTime, 0.0
126 tmp<volSymmTensorField> laminar::R() const
128 return tmp<volSymmTensorField>
130 new volSymmTensorField
141 dimensionedSymmTensor
143 "R", sqr(U_.dimensions()), symmTensor::zero
150 tmp<volSymmTensorField> laminar::devRhoReff() const
152 return tmp<volSymmTensorField>
154 new volSymmTensorField
164 -mu()*dev(twoSymm(fvc::grad(U_)))
170 tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const
174 - fvm::laplacian(muEff(), U)
175 - fvc::div(muEff()*dev2(fvc::grad(U)().T()))
182 return RASModel::read();
186 void laminar::correct()
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 } // End namespace RASModels
193 } // End namespace compressible
194 } // End namespace Foam
196 // ************************************************************************* //