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
26 Foam::incompressible::LESModels::dynOneEqEddy
29 One Equation Eddy Viscosity Model for incompressible flows.
31 Eddy viscosity SGS model using a modeled balance equation to simulate
36 d/dt(k) + div(U*k) - div(nuSgs*grad(k))
42 B = 2/3*k*I - 2*nuSgs*dev(D)
43 Beff = 2/3*k*I - 2*nuEff*dev(D)
48 nuSgs = ck*sqrt(k)*delta
55 \*---------------------------------------------------------------------------*/
57 #ifndef dynOneEqEddy_H
58 #define dynOneEqEddy_H
60 #include "GenEddyVisc.H"
61 #include "LESfilter.H"
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 namespace incompressible
72 /*---------------------------------------------------------------------------*\
73 Class dynOneEqEddy Declaration
74 \*---------------------------------------------------------------------------*/
84 autoPtr<LESfilter> filterPtr_;
88 // Private Member Functions
90 //- Update sub-grid scale fields
91 void updateSubGridScaleFields(const volSymmTensorField& D);
93 //- Calculate ck, ce by filtering the velocity field U.
94 dimensionedScalar ck(const volSymmTensorField& D) const;
95 dimensionedScalar ce(const volSymmTensorField& D) const;
97 // Disallow default bitwise copy construct and assignment
98 dynOneEqEddy(const dynOneEqEddy&);
99 dynOneEqEddy& operator=(const dynOneEqEddy&);
104 //- Runtime type information
105 TypeName("dynOneEqEddy");
109 //- Construct from components
112 const volVectorField& U,
113 const surfaceScalarField& phi,
114 transportModel& transport
119 virtual ~dynOneEqEddy()
125 //- Return SGS kinetic energy
126 virtual tmp<volScalarField> k() const
131 //- Return the effective diffusivity for k
132 tmp<volScalarField> DkEff() const
134 return tmp<volScalarField>
136 new volScalarField("DkEff", nuSgs_ + nu())
140 //- Correct Eddy-Viscosity and related properties
141 virtual void correct(const tmp<volTensorField>& gradU);
143 //- Read LESProperties dictionary
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 } // End namespace LESModels
151 } // End namespace incompressible
152 } // End namespace Foam
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 // ************************************************************************* //