1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::displacementInterpolationFvMotionSolver
29 Mesh motion solver for an fvMesh.
31 Scales inbetween motion prescribed on faceZones. Works out per point
32 the distance between the bounding face zones (in all three directions)
33 at the start and then every time step
34 - moves the faceZones based on tables
35 - interpolates the displacement of all points based on the
38 Tables are in the @a constant/tables directory.
41 could be a motionSolver - does not use any fvMesh structure.
44 displacementInterpolationFvMotionSolver.C
46 \*---------------------------------------------------------------------------*/
48 #ifndef displacementInterpolationFvMotionSolver_H
49 #define displacementInterpolationFvMotionSolver_H
51 #include "displacementFvMotionSolver.H"
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 /*---------------------------------------------------------------------------*\
59 Class displacementInterpolationFvMotionSolver Declaration
60 \*---------------------------------------------------------------------------*/
62 class displacementInterpolationFvMotionSolver
64 public displacementFvMotionSolver
68 //- Additional settings for motion solver
69 dictionary dynamicMeshCoeffs_;
72 // Face zone information (note: could pack these to only contain
75 //- Interpolation table. From faceZone to times.
76 List<scalarField> times_;
78 //- Interpolation table. From faceZone to displacements.
79 List<vectorField> displacements_;
83 //- Per direction, per range the index of the lower
85 FixedList<labelList, 3> rangeToZone_;
87 //- Per direction, per range the points that are in it
88 FixedList<labelListList, 3> rangeToPoints_;
90 //- Per direction, per range the weight of the points relative
91 // to this and the next range.
92 FixedList<List<scalarField>, 3> rangeToWeights_;
95 // Private Member Functions
97 //- Disallow default bitwise copy construct
98 displacementInterpolationFvMotionSolver
100 const displacementInterpolationFvMotionSolver&
103 //- Disallow default bitwise assignment
104 void operator=(const displacementInterpolationFvMotionSolver&);
109 //- Runtime type information
110 TypeName("displacementInterpolation");
115 //- Construct from polyMesh and data stream
116 displacementInterpolationFvMotionSolver
119 Istream& msDataUnused
125 ~displacementInterpolationFvMotionSolver();
130 //- Return point location obtained from the current motion field
131 virtual tmp<pointField> curPoints() const;
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace Foam
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 // ************************************************************************* //