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 \*---------------------------------------------------------------------------*/
27 #include "GenEddyVisc.H"
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 namespace incompressible
38 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
40 GenEddyVisc::GenEddyVisc
42 const volVectorField& U,
43 const surfaceScalarField& phi,
44 transportModel& transport
47 LESModel(word("GenEddyVisc"), U, phi, transport),
51 dimensioned<scalar>::lookupOrAddToDict
76 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
78 tmp<volSymmTensorField> GenEddyVisc::B() const
80 return ((2.0/3.0)*I)*k() - nuSgs_*twoSymm(fvc::grad(U()));
84 tmp<volSymmTensorField> GenEddyVisc::devBeff() const
86 return -nuEff()*dev(twoSymm(fvc::grad(U())));
90 tmp<fvVectorMatrix> GenEddyVisc::divDevBeff(volVectorField& U) const
94 - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(fvc::grad(U)().T()))
99 void GenEddyVisc::correct(const tmp<volTensorField>& gradU)
101 LESModel::correct(gradU);
105 bool GenEddyVisc::read()
107 if (LESModel::read())
109 ce_.readIfPresent(coeffDict());
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 } // End namespace LESModels
123 } // End namespace incompressible
124 } // End namespace Foam
126 // ************************************************************************* //