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 \*---------------------------------------------------------------------------*/
27 #include "addToRunTimeSelectionTable.H"
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 namespace incompressible
38 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
40 defineTypeNameAndDebug(laminar, 0);
41 addToRunTimeSelectionTable(RASModel, laminar, dictionary);
43 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
47 const volVectorField& U,
48 const surfaceScalarField& phi,
49 transportModel& transport,
50 const word& turbulenceModelName,
54 RASModel(modelName, U, phi, transport, turbulenceModelName)
58 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
60 tmp<volScalarField> laminar::nut() const
62 return tmp<volScalarField>
75 dimensionedScalar("nut", nu()().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::devReff() const
152 return tmp<volSymmTensorField>
154 new volSymmTensorField
164 -nu()*dev(twoSymm(fvc::grad(U_)))
170 tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const
174 - fvm::laplacian(nuEff(), U)
175 - fvc::div(nuEff()*dev(T(fvc::grad(U))))
182 return RASModel::read();
186 void laminar::correct()
188 turbulenceModel::correct();
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 } // End namespace RASModels
195 } // End namespace incompressible
196 } // End namespace Foam
198 // ************************************************************************* //