displacementInterpolationMotionSolver.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::displacementInterpolationMotionSolver
26 
27 Description
28  Mesh motion solver for a polyMesh.
29 
30  Scales in between motion prescribed on faceZones. Works out per point
31  the distance between the bounding face zones (in all three directions)
32  at the start and then every time step
33  - moves the faceZones based on tables
34  - interpolates the displacement of all points based on the
35  faceZone motion.
36 
37  Tables are in the \a constant/tables directory.
38 
39 SourceFiles
40  displacementInterpolationMotionSolver.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef displacementInterpolationMotionSolver_H
45 #define displacementInterpolationMotionSolver_H
46 
47 #include "points0MotionSolver.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class displacementInterpolationMotionSolver Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
60  public points0MotionSolver
61 {
62  // Private Data
63 
64  // Face zone information (note: could pack these to only contain
65  // used zones)
66 
67  //- Interpolation table. From faceZone to times.
68  List<scalarField> times_;
69 
70  //- Interpolation table. From faceZone to displacements.
71  List<vectorField> displacements_;
72 
73  // Range information.
74 
75  //- Per direction, per range the index of the lower
76  // faceZone
77  FixedList<labelList, 3> rangeToZone_;
78 
79  //- Per direction, per range the points that are in it
80  FixedList<labelListList, 3> rangeToPoints_;
81 
82  //- Per direction, per range the weight of the points relative
83  // to this and the next range.
84  FixedList<List<scalarField>, 3> rangeToWeights_;
85 
86 
87 public:
88 
89  //- Runtime type information
90  TypeName("displacementInterpolation");
91 
92 
93  // Constructors
94 
95  //- Construct from polyMesh and dictionary
97  (
98  const polyMesh&,
99  const dictionary& dict
100  );
101 
102  //- Disallow default bitwise copy construction
104  (
106  );
107 
108 
109  //- Destructor
111 
112 
113  // Member Functions
114 
115  //- Return point location obtained from the current motion field
116  virtual tmp<pointField> curPoints() const;
117 
118  //- Solve for motion
119  virtual void solve()
120  {}
121 
122 
123  // Member Operators
124 
125  //- Disallow default bitwise assignment
126  void operator=(const displacementInterpolationMotionSolver&) = delete;
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
dictionary dict
A 1D vector of objects of type <T> with a fixed size <Size>.
Definition: FixedList.H:54
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
Virtual base class for displacement motion solvers.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
void operator=(const displacementInterpolationMotionSolver &)=delete
Disallow default bitwise assignment.
A class for managing temporary objects.
Definition: PtrList.H:53
TypeName("displacementInterpolation")
Runtime type information.
displacementInterpolationMotionSolver(const polyMesh &, const dictionary &dict)
Construct from polyMesh and dictionary.
Namespace for OpenFOAM.