1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 "mixedSmagorinsky.H"
28 #include "addToRunTimeSelectionTable.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 namespace incompressible
39 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41 defineTypeNameAndDebug(mixedSmagorinsky, 0);
42 addToRunTimeSelectionTable(LESModel, mixedSmagorinsky, dictionary);
44 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
46 mixedSmagorinsky::mixedSmagorinsky
48 const volVectorField& U,
49 const surfaceScalarField& phi,
50 transportModel& transport
53 LESModel(typeName, U, phi, transport),
54 scaleSimilarity(U, phi, transport),
55 Smagorinsky(U, phi, transport)
61 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
63 tmp<volScalarField> mixedSmagorinsky::k() const
73 tmp<volScalarField> mixedSmagorinsky::epsilon() const
77 scaleSimilarity::epsilon()
78 + Smagorinsky::epsilon()
83 tmp<volSymmTensorField> mixedSmagorinsky::B() const
93 tmp<volSymmTensorField> mixedSmagorinsky::devBeff() const
97 scaleSimilarity::devBeff()
98 + Smagorinsky::devBeff()
103 tmp<fvVectorMatrix> mixedSmagorinsky::divDevBeff
110 scaleSimilarity::divDevBeff(U)
111 + Smagorinsky::divDevBeff(U)
116 void mixedSmagorinsky::correct(const tmp<volTensorField>& gradU)
118 scaleSimilarity::correct(gradU);
119 Smagorinsky::correct(gradU);
123 bool mixedSmagorinsky::read()
125 if (LESModel::read())
127 scaleSimilarity::read();
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace LESModels
142 } // End namespace incompressible
143 } // End namespace Foam
145 // ************************************************************************* //