interpolatingSolidBodyMotionSolver.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) 2018-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::interpolatingSolidBodyMotionSolver
26 
27 Description
28  Solid-body motion of the mesh specified by a run-time selectable motion
29  function. Applies SLERP interpolation of movement as function of
30  distance to the object surface to move the mesh points.
31 
32 SourceFiles
33  interpolatingSolidBodyMotionSolver.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef interpolatingSolidBodyMotionSolver_H
38 #define interpolatingSolidBodyMotionSolver_H
39 
40 #include "points0MotionSolver.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class interpolatingSolidBodyMotionSolver Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
54  public points0MotionSolver
55 {
56  // Private Data
57 
58  //- The motion control function
60 
61  wordReList patches_;
62 
63  //- Patches to integrate forces
64  const labelHashSet patchSet_;
65 
66  //- Center of gravity read from dictionary
67  vector CofG_;
68 
69  //- Inner morphing distance (limit of solid-body region)
70  const scalar di_;
71 
72  //- Outer morphing distance (limit of linear interpolation region)
73  const scalar do_;
74 
75  //- Current interpolation scale (1 at patches, 0 at distance_)
76  pointScalarField scale_;
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("interpolatingSolidBody");
83 
84 
85  // Constructors
86 
87  //- Construct from polyMesh and dictionary
89  (
90  const word& name,
91  const polyMesh&,
92  const dictionary& dict
93  );
94 
95  //- Disallow default bitwise copy construction
97  (
99  );
100 
101 
102  //- Destructor
104 
105 
106  // Member Functions
107 
108  //- Return point location obtained from the current motion field
109  virtual tmp<pointField> curPoints() const;
110 
111  //- Solve for motion
112  virtual void solve()
113  {}
114 
115 
116  // Member Operators
117 
118  //- Disallow default bitwise assignment
119  void operator=(const interpolatingSolidBodyMotionSolver&) = delete;
120 };
121 
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 } // End namespace Foam
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
TypeName("interpolatingSolidBody")
Runtime type information.
interpolatingSolidBodyMotionSolver(const word &name, const polyMesh &, const dictionary &dict)
Construct from polyMesh and dictionary.
A class for handling words, derived from string.
Definition: word.H:59
void operator=(const interpolatingSolidBodyMotionSolver &)=delete
Disallow default bitwise assignment.
Solid-body motion of the mesh specified by a run-time selectable motion function. Applies SLERP inter...
const word & name() const
Return name.
Definition: motionSolver.H:125
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
Virtual base class for displacement motion solvers.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:76
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.