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-2019 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>
66  (
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  (
86  );
87 };
88 
89 
90 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91 
92 } // End namespace Foam
93 
94 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95 
96 #ifdef NoRepository
98 #endif
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 #endif
103 
104 // ************************************************************************* //
interpolationCellPointWallModified(const GeometricField< Type, fvPatchField, volMesh > &psi)
Construct from components.
Generic GeometricField class.
TypeName("cellPointWallModified")
Runtime type information.
const GeometricField< Type, fvPatchField, volMesh > & psi() const
Return the field to be interpolated.
As interpolationCellPoint, but with the point field modified on wall faces.
Given cell centre values and point (vertex) values decompose into tetrahedra and linear interpolate w...
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.