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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::displacementInterpolationMotionSolver
29
30Group
31 grpMeshMotionSolvers
32
33Description
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
45SourceFiles
46 displacementInterpolationMotionSolver.C
47
48\*---------------------------------------------------------------------------*/
49
50#ifndef displacementInterpolationMotionSolver_H
51#define displacementInterpolationMotionSolver_H
52
54
55// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56
57namespace Foam
58{
59
60/*---------------------------------------------------------------------------*\
61 Class displacementInterpolationMotionSolver Declaration
62\*---------------------------------------------------------------------------*/
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
108public:
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// ************************************************************************* //
A 1D vector of objects of type <T> with a fixed length <N>.
Definition: FixedList.H:81
A primitive field of type <T> with automated input and output.
Definition: IOField.H:58
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:77
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
TypeName("displacementInterpolation")
Runtime type information.
~displacementInterpolationMotionSolver()=default
Destructor.
Virtual base class for displacement motion solver.
pointVectorField & pointDisplacement() noexcept
Return reference to the point motion displacement field.
const polyMesh & mesh() const
Return reference to mesh.
Definition: motionSolver.H:144
pointField & points0() noexcept
Return reference to the reference ('0') pointField.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73