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