displacementInterpolationMotionSolver.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2015 OpenFOAM Foundation
9  Copyright (C) 2015-2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::displacementInterpolationMotionSolver
29 
30 Group
31  grpMeshMotionSolvers
32 
33 Description
34  Mesh motion solver for an fvMesh.
35 
36  Scales inbetween motion prescribed on faceZones. Works out per point
37  the distance between the bounding face zones (in all three directions)
38  at the start and then every time step
39  - moves the faceZones based on tables
40  - interpolates the displacement of all points based on the
41  faceZone motion.
42 
43  Tables are in the \a constant/tables directory.
44 
45 SourceFiles
46  displacementInterpolationMotionSolver.C
47 
48 \*---------------------------------------------------------------------------*/
49 
50 #ifndef displacementInterpolationMotionSolver_H
51 #define displacementInterpolationMotionSolver_H
52 
54 
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 
57 namespace Foam
58 {
59 
60 /*---------------------------------------------------------------------------*\
61  Class displacementInterpolationMotionSolver Declaration
62 \*---------------------------------------------------------------------------*/
63 
65 :
67 {
68  // Private Data
69 
70  // Face zone information (note: could pack these to only contain
71  // used zones)
72 
73  //- Interpolation table. From faceZone to times.
74  List<scalarField> times_;
75 
76  //- Interpolation table. From faceZone to displacements.
77  List<vectorField> displacements_;
78 
79  // Range information.
80 
81  //- Per direction, per range the index of the lower
82  // faceZone
83  FixedList<labelList, 3> rangeToZone_;
84 
85  //- Per direction, per range the points that are in it
86  FixedList<labelListList, 3> rangeToPoints_;
87 
88  //- Per direction, per range the weight of the points relative
89  // to this and the next range.
90  FixedList<List<scalarField>, 3> rangeToWeights_;
91 
92 
93  // Private Member Functions
94 
95  //- Read settings
96  void calcInterpolation();
97 
98  //- No copy construct
100  (
102  ) = delete;
103 
104  //- No copy assignment
105  void operator=(const displacementInterpolationMotionSolver&) = delete;
106 
107 
108 public:
109 
110  //- Runtime type information
111  TypeName("displacementInterpolation");
112 
113 
114  // Constructors
115 
116  //- Construct from polyMesh and IOdictionary
118  (
119  const polyMesh&,
120  const IOdictionary& dict
121  );
122 
123  //- Construct from components
125  (
126  const polyMesh& mesh,
127  const IOdictionary& dict,
129  const pointIOField& points0
130  );
131 
132 
133  //- Destructor
135 
136 
137  // Member Functions
138 
139  //- Return point location obtained from the current motion field
140  virtual tmp<pointField> curPoints() const;
141 
142  //- Solve for motion
143  virtual void solve()
144  {}
145 };
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 } // End namespace Foam
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::IOField
A primitive field of type <T> with automated input and output.
Definition: foamVtkLagrangianWriter.H:61
Foam::displacementMotionSolver::pointDisplacement
pointVectorField & pointDisplacement()
Return reference to the point motion displacement field.
Definition: displacementMotionSolver.H:141
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::displacementInterpolationMotionSolver::~displacementInterpolationMotionSolver
~displacementInterpolationMotionSolver()=default
Destructor.
Foam::displacementInterpolationMotionSolver::TypeName
TypeName("displacementInterpolation")
Runtime type information.
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::displacementInterpolationMotionSolver::solve
virtual void solve()
Solve for motion.
Definition: displacementInterpolationMotionSolver.H:142
Foam::displacementInterpolationMotionSolver::curPoints
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
Definition: displacementInterpolationMotionSolver.C:331
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::displacementMotionSolver
Virtual base class for displacement motion solver.
Definition: displacementMotionSolver.H:53
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
displacementMotionSolver.H
Foam::points0MotionSolver::points0
pointField & points0()
Return reference to the reference field.
Definition: points0MotionSolver.H:117
Foam::List< scalarField >
Foam::FixedList
A 1D vector of objects of type <T> with a fixed length <N>.
Definition: HashTable.H:104
Foam::motionSolver::mesh
const polyMesh & mesh() const
Return reference to mesh.
Definition: motionSolver.H:144
Foam::GeometricField< vector, pointPatchField, pointMesh >
Foam::displacementInterpolationMotionSolver
Mesh motion solver for an fvMesh.
Definition: displacementInterpolationMotionSolver.H:63