anisotropicFilter.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2025 OpenFOAM Foundation
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::anisotropicFilter
26 
27 Description
28  anisotropic filter
29 
30  \verbatim
31  Kernel as filter as Test filter with ratio 2
32  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33  Box filter: g = delta2/24 -> g = delta2/6
34  Spherical box filter: g = delta2/64 -> g = delta2/16
35  Gaussian filter: g = delta2/24 -> g = delta2/6
36  \endverbatim
37 
38 SourceFiles
39  anisotropicFilter.C
40 
41 \*---------------------------------------------------------------------------*/
42 
43 #ifndef anisotropicFilter_H
44 #define anisotropicFilter_H
45 
46 #include "LESfilter.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class anisotropicFilter Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 :
59  public LESfilter
60 {
61  // Private Data
62 
63  scalar widthCoeff_;
64  volVectorField coeff_;
65 
66 
67  // Private Member Functions
68 
69  template<class Type>
70  inline tmp<VolField<Type>> filter
71  (
72  const tmp<VolField<Type>>& unFilteredField
73  ) const;
74 
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("anisotropic");
80 
81  // Constructors
82 
83  //- Construct from components
84  anisotropicFilter(const fvMesh& mesh, scalar widthCoeff);
85 
86  //- Construct from IOdictionary
87  anisotropicFilter(const fvMesh& mesh, const dictionary&);
88 
89  //- Disallow default bitwise copy construction
90  anisotropicFilter(const anisotropicFilter&) = delete;
91 
92 
93  //- Destructor
94  virtual ~anisotropicFilter()
95  {}
96 
97 
98  // Member Functions
99 
100  //- Read the LESfilter dictionary
101  virtual void read(const dictionary&);
102 
103 
104  // Member Operators
105 
106  void operator=(const anisotropicFilter&) = delete;
107 
108  virtual tmp<volScalarField> operator()
109  (
110  const tmp<volScalarField>&
111  ) const;
112 
113  virtual tmp<volVectorField> operator()
114  (
115  const tmp<volVectorField>&
116  ) const;
117 
118  virtual tmp<volSymmTensorField> operator()
119  (
121  ) const;
122 
123  virtual tmp<volTensorField> operator()
124  (
125  const tmp<volTensorField>&
126  ) const;
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
Generic GeometricField class.
Abstract class for LES filters.
Definition: LESfilter.H:55
const fvMesh & mesh() const
Return mesh reference.
Definition: LESfilter.H:130
anisotropic filter
anisotropicFilter(const fvMesh &mesh, scalar widthCoeff)
Construct from components.
void operator=(const anisotropicFilter &)=delete
virtual void read(const dictionary &)
Read the LESfilter dictionary.
virtual ~anisotropicFilter()
Destructor.
TypeName("anisotropic")
Runtime type information.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:96
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.