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 | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
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 an fvMesh.
29 
30  Scales inbetween 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 
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class displacementInterpolationMotionSolver Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
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.
69 
70  //- Interpolation table. From faceZone to displacements.
72 
73  // Range information.
74 
75  //- Per direction, per range the index of the lower
76  // faceZone
78 
79  //- Per direction, per range the points that are in it
81 
82  //- Per direction, per range the weight of the points relative
83  // to this and the next range.
85 
86 
87  // Private Member Functions
88 
89  //- Read settings
90  void calcInterpolation();
91 
92  //- Disallow default bitwise copy construct
94  (
96  );
97 
98  //- Disallow default bitwise assignment
100 
101 
102 public:
103 
104  //- Runtime type information
105  TypeName("displacementInterpolation");
106 
107 
108  // Constructors
109 
110  //- Construct from polyMesh and IOdictionary
112  (
113  const polyMesh&,
114  const IOdictionary& dict
115  );
116 
117  //- Construct from components
119  (
120  const polyMesh& mesh,
121  const IOdictionary& dict,
123  const pointIOField& points0
124  );
125 
126 
127  //- Destructor
129 
130 
131  // Member Functions
132 
133  //- Return point location obtained from the current motion field
134  virtual tmp<pointField> curPoints() const;
135 
136  //- Solve for motion
137  virtual void solve()
138  {}
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
Foam::IOField< vector >
Foam::displacementMotionSolver::pointDisplacement
pointVectorField & pointDisplacement()
Return reference to the point motion displacement field.
Definition: displacementMotionSolver.H:163
Foam::displacementInterpolationMotionSolver::operator=
void operator=(const displacementInterpolationMotionSolver &)
Disallow default bitwise assignment.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::displacementInterpolationMotionSolver::displacements_
List< vectorField > displacements_
Interpolation table. From faceZone to displacements.
Definition: displacementInterpolationMotionSolver.H:70
Foam::displacementInterpolationMotionSolver::times_
List< scalarField > times_
Interpolation table. From faceZone to times.
Definition: displacementInterpolationMotionSolver.H:67
Foam::displacementInterpolationMotionSolver::TypeName
TypeName("displacementInterpolation")
Runtime type information.
Foam::displacementInterpolationMotionSolver::rangeToPoints_
FixedList< labelListList, 3 > rangeToPoints_
Per direction, per range the points that are in it.
Definition: displacementInterpolationMotionSolver.H:79
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Foam::displacementInterpolationMotionSolver::rangeToWeights_
FixedList< List< scalarField >, 3 > rangeToWeights_
Per direction, per range the weight of the points relative.
Definition: displacementInterpolationMotionSolver.H:83
Foam::displacementInterpolationMotionSolver::solve
virtual void solve()
Solve for motion.
Definition: displacementInterpolationMotionSolver.H:136
Foam::displacementInterpolationMotionSolver::curPoints
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
Definition: displacementInterpolationMotionSolver.C:332
Foam::displacementInterpolationMotionSolver::calcInterpolation
void calcInterpolation()
Read settings.
Definition: displacementInterpolationMotionSolver.C:61
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::displacementMotionSolver
Virtual base class for displacement motion solver.
Definition: displacementMotionSolver.H:55
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
displacementMotionSolver.H
Foam::displacementMotionSolver::points0
pointField & points0()
Return reference to the reference field.
Definition: displacementMotionSolver.H:151
Foam::displacementInterpolationMotionSolver::rangeToZone_
FixedList< labelList, 3 > rangeToZone_
Per direction, per range the index of the lower.
Definition: displacementInterpolationMotionSolver.H:76
Foam::displacementInterpolationMotionSolver::~displacementInterpolationMotionSolver
~displacementInterpolationMotionSolver()
Destructor.
Definition: displacementInterpolationMotionSolver.C:325
Foam::displacementInterpolationMotionSolver::displacementInterpolationMotionSolver
displacementInterpolationMotionSolver(const displacementInterpolationMotionSolver &)
Disallow default bitwise copy construct.
Foam::List< scalarField >
Foam::FixedList
A 1D vector of objects of type <T> with a fixed size <Size>.
Definition: FixedList.H:53
Foam::motionSolver::mesh
const polyMesh & mesh() const
Return reference to mesh.
Definition: motionSolver.H:125
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::displacementInterpolationMotionSolver
Mesh motion solver for an fvMesh.
Definition: displacementInterpolationMotionSolver.H:57