FreeFOAM The Cross-Platform CFD Toolkit
dynOneEqEddy.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  Foam::compressible::LESModels::dynOneEqEddy
26 
27 Description
28  One Equation Eddy Viscosity Model for compressible flows.
29 
30  Eddy viscosity SGS model using a modeled balance equation to simulate
31  the behaviour of k.
32  Thus
33  @verbatim
34  d/dt(k) + div(U*k) - div(nuSgs*grad(k))
35  =
36  -rho*B*L - ce*rho*k^3/2/delta
37 
38  and
39 
40  B = 2/3*k*I - 2*nuSgs*dev(D)
41 
42  where
43 
44  D = symm(grad(U));
45  nuSgs = ck*sqrt(k)*delta
46  @endverbatim
47 
48 SourceFiles
49  dynOneEqEddy.C
50 
51 \*---------------------------------------------------------------------------*/
52 
53 #ifndef compressibleDynOneEqEddy_H
54 #define compressibleDynOneEqEddy_H
55 
57 #include <LESfilters/LESfilter.H>
58 
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 
61 namespace Foam
62 {
63 namespace compressible
64 {
65 namespace LESModels
66 {
67 
68 /*---------------------------------------------------------------------------*\
69  Class dynOneEqEddy Declaration
70 \*---------------------------------------------------------------------------*/
71 
73 :
74  public GenEddyVisc
75 {
76  // Private data
77 
78  autoPtr<LESfilter> filterPtr_;
79  LESfilter& filter_;
80 
81 
82  // Private Member Functions
83 
84  //- Update sub-grid scale fields
85  void updateSubGridScaleFields(const volSymmTensorField& D);
86 
87  //- Calculate ck, ce by filtering the velocity field U.
88  dimensionedScalar ck_(const volSymmTensorField& D) const;
89  dimensionedScalar ce_(const volSymmTensorField& D) const;
90 
91  // Disallow default bitwise copy construct and assignment
92  dynOneEqEddy(const dynOneEqEddy&);
93  dynOneEqEddy& operator=(const dynOneEqEddy&);
94 
95 
96 public:
97 
98  //- Runtime type information
99  TypeName("dynOneEqEddy");
100 
101 
102  // Constructors
103 
104  //- Constructor from components
106  (
107  const volScalarField& rho,
108  const volVectorField& U,
109  const surfaceScalarField& phi,
110  const basicThermo& thermoPhysicalModel
111  );
112 
113 
114  // Destructor
115  virtual ~dynOneEqEddy()
116  {}
117 
118 
119  // Member Functions
120 
121  //- Return the effective diffusivity for k
123  {
124  return tmp<volScalarField>
125  (
126  new volScalarField("DkEff", muSgs_ + mu())
127  );
128  }
129 
130  //- Correct Eddy-Viscosity and related properties
131  virtual void correct(const tmp<volTensorField>& gradU);
132 
133  //- Read LESProperties dictionary
134  virtual bool read();
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace LESModels
141 } // End namespace compressible
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************ vim: set sw=4 sts=4 et: ************************ //