FreeFOAM The Cross-Platform CFD Toolkit
displacementInterpolationFvMotionSolver.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) 1991-2010 OpenCFD Ltd.
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::displacementInterpolationFvMotionSolver
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 Note
40  could be a motionSolver - does not use any fvMesh structure.
41 
42 SourceFiles
43  displacementInterpolationFvMotionSolver.C
44 
45 \*---------------------------------------------------------------------------*/
46 
47 #ifndef displacementInterpolationFvMotionSolver_H
48 #define displacementInterpolationFvMotionSolver_H
49 
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 
57 /*---------------------------------------------------------------------------*\
58  Class displacementInterpolationFvMotionSolver Declaration
59 \*---------------------------------------------------------------------------*/
60 
62 :
64 {
65  // Private data
66 
67  //- Additional settings for motion solver
68  dictionary dynamicMeshCoeffs_;
69 
70 
71  // Face zone information (note: could pack these to only contain
72  // used zones)
73 
74  //- Interpolation table. From faceZone to times.
75  List<scalarField> times_;
76 
77  //- Interpolation table. From faceZone to displacements.
78  List<vectorField> displacements_;
79 
80  // Range information.
81 
82  //- Per direction, per range the index of the lower
83  // faceZone
84  FixedList<labelList, 3> rangeToZone_;
85 
86  //- Per direction, per range the points that are in it
87  FixedList<labelListList, 3> rangeToPoints_;
88 
89  //- Per direction, per range the weight of the points relative
90  // to this and the next range.
91  FixedList<List<scalarField>, 3> rangeToWeights_;
92 
93 
94  // Private Member Functions
95 
96  //- Disallow default bitwise copy construct
98  (
100  );
101 
102  //- Disallow default bitwise assignment
103  void operator=(const displacementInterpolationFvMotionSolver&);
104 
105 
106 public:
107 
108  //- Runtime type information
109  TypeName("displacementInterpolation");
110 
111 
112  // Constructors
113 
114  //- Construct from polyMesh and data stream
116  (
117  const polyMesh&,
118  Istream& msDataUnused
119  );
120 
121 
122  // Destructor
123 
125 
126 
127  // Member Functions
128 
129  //- Return point location obtained from the current motion field
130  virtual tmp<pointField> curPoints() const;
131 
132  //- Solve for motion
133  virtual void solve()
134  {}
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************ vim: set sw=4 sts=4 et: ************************ //