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
26 Foam::compressible::LESModels::dynOneEqEddy
29 One Equation Eddy Viscosity Model for compressible flows.
31 Eddy viscosity SGS model using a modeled balance equation to simulate
35 d/dt(k) + div(U*k) - div(nuSgs*grad(k))
37 -rho*B*L - ce*rho*k^3/2/delta
41 B = 2/3*k*I - 2*nuSgs*dev(D)
46 nuSgs = ck*sqrt(k)*delta
52 \*---------------------------------------------------------------------------*/
54 #ifndef compressibleDynOneEqEddy_H
55 #define compressibleDynOneEqEddy_H
57 #include "GenEddyVisc.H"
58 #include "LESfilter.H"
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 namespace compressible
69 /*---------------------------------------------------------------------------*\
70 Class dynOneEqEddy Declaration
71 \*---------------------------------------------------------------------------*/
79 autoPtr<LESfilter> filterPtr_;
83 // Private Member Functions
85 //- Update sub-grid scale fields
86 void updateSubGridScaleFields(const volSymmTensorField& D);
88 //- Calculate ck, ce by filtering the velocity field U.
89 dimensionedScalar ck_(const volSymmTensorField& D) const;
90 dimensionedScalar ce_(const volSymmTensorField& D) const;
92 // Disallow default bitwise copy construct and assignment
93 dynOneEqEddy(const dynOneEqEddy&);
94 dynOneEqEddy& operator=(const dynOneEqEddy&);
99 //- Runtime type information
100 TypeName("dynOneEqEddy");
105 //- Constructor from components
108 const volScalarField& rho,
109 const volVectorField& U,
110 const surfaceScalarField& phi,
111 const basicThermo& thermoPhysicalModel
116 virtual ~dynOneEqEddy()
122 //- Return the effective diffusivity for k
123 tmp<volScalarField> DkEff() const
125 return tmp<volScalarField>
127 new volScalarField("DkEff", muSgs_ + mu())
131 //- Correct Eddy-Viscosity and related properties
132 virtual void correct(const tmp<volTensorField>& gradU);
134 //- Read LESProperties dictionary
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace LESModels
142 } // End namespace compressible
143 } // End namespace Foam
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 // ************************************************************************* //