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 \*---------------------------------------------------------------------------*/
26 #include "mixedSmagorinsky.H"
27 #include "addToRunTimeSelectionTable.H"
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 namespace incompressible
38 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
40 defineTypeNameAndDebug(mixedSmagorinsky, 0);
41 addToRunTimeSelectionTable(LESModel, mixedSmagorinsky, dictionary);
43 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
45 mixedSmagorinsky::mixedSmagorinsky
47 const volVectorField& U,
48 const surfaceScalarField& phi,
49 transportModel& transport,
50 const word& turbulenceModelName,
54 LESModel(modelName, U, phi, transport, turbulenceModelName),
55 scaleSimilarity(U, phi, transport),
56 Smagorinsky(U, phi, transport)
62 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
64 tmp<volScalarField> mixedSmagorinsky::k() const
74 tmp<volScalarField> mixedSmagorinsky::epsilon() const
78 scaleSimilarity::epsilon()
79 + Smagorinsky::epsilon()
84 tmp<volSymmTensorField> mixedSmagorinsky::B() const
94 tmp<volSymmTensorField> mixedSmagorinsky::devBeff() const
98 scaleSimilarity::devBeff()
99 + Smagorinsky::devBeff()
104 tmp<fvVectorMatrix> mixedSmagorinsky::divDevBeff
111 scaleSimilarity::divDevBeff(U)
112 + Smagorinsky::divDevBeff(U)
117 void mixedSmagorinsky::correct(const tmp<volTensorField>& gradU)
119 scaleSimilarity::correct(gradU);
120 Smagorinsky::correct(gradU);
124 bool mixedSmagorinsky::read()
126 if (LESModel::read())
128 scaleSimilarity::read();
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 } // End namespace LESModels
143 } // End namespace incompressible
144 } // End namespace Foam
146 // ************************************************************************* //