interpolationCellPointWallModified.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-2022 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::interpolationCellPointWallModified
26 
27 Description
28  As interpolationCellPoint, but with the point field modified on wall faces.
29 
30  This method is defined only for vectors. The point field is extrapolated
31  from the cells to the wall faces, and then rotated towards the (reverse)
32  point normal so that the vectors do not point out of the domain. The result
33  is also scaled so so if the necessary rotation exceeds 90 degrees, it is
34  clamped to zero.
35 
36  This prevents unresolvable drag-rebound couplings when applied to the
37  velocity interpolation in a Lagrangian simulation.
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef interpolationCellPointWallModified_H
42 #define interpolationCellPointWallModified_H
43 
44 #include "interpolationCellPoint.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class interpolationCellPointWallModified Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class Type>
57 :
58  public interpolationCellPoint<Type>
59 {
60  // Private Member Functions
61 
62  //- Compute the point field for a type. This just throws an error. This
63  // interpolation method is only defined for vector fields.
64  template <class TYPE>
65  tmp<PointField<TYPE>> calcPointField
66  (
67  const VolField<TYPE>& psi
68  ) const;
69 
70  //- Compute the point field for a vector type
71  tmp<pointVectorField> calcPointField(const volVectorField& psi) const;
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("cellPointWallModified");
78 
79 
80  // Constructors
81 
82  //- Construct from components
84  (
85  const VolField<Type>& psi
86  );
87 
88  //- Copy construct
90  (
92  );
93 
94  //- Clone
95  virtual autoPtr<interpolation<Type>> clone() const
96  {
98  (
100  );
101  }
102 };
103 
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 } // End namespace Foam
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 #ifdef NoRepository
113 #endif
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************************************************************* //
Generic GeometricField class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
As interpolationCellPoint, but with the point field modified on wall faces.
interpolationCellPointWallModified(const VolField< Type > &psi)
Construct from components.
virtual autoPtr< interpolation< Type > > clone() const
Clone.
TypeName("cellPointWallModified")
Runtime type information.
Given cell centre values and point (vertex) values decompose into tetrahedra and linear interpolate w...
const VolField< Type > & psi() const
Return the field to be interpolated.
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.