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-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::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 polyMesh&,
91  const dictionary& dict
92  );
93 
94  //- Disallow default bitwise copy construction
96  (
98  );
99 
100 
101  //- Destructor
103 
104 
105  // Member Functions
106 
107  //- Return point location obtained from the current motion field
108  virtual tmp<pointField> curPoints() const;
109 
110  //- Solve for motion
111  virtual void solve()
112  {}
113 
114 
115  // Member Operators
116 
117  //- Disallow default bitwise assignment
118  void operator=(const interpolatingSolidBodyMotionSolver&) = delete;
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
interpolatingSolidBodyMotionSolver(const polyMesh &, const dictionary &dict)
Construct from polyMesh and dictionary.
TypeName("interpolatingSolidBody")
Runtime type information.
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...
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:74
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.