1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
25 Foam::displacementInterpolationFvMotionSolver
28 Mesh motion solver for an fvMesh.
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
37 Tables are in the \a constant/tables directory.
40 could be a motionSolver - does not use any fvMesh structure.
43 displacementInterpolationFvMotionSolver.C
45 \*---------------------------------------------------------------------------*/
47 #ifndef displacementInterpolationFvMotionSolver_H
48 #define displacementInterpolationFvMotionSolver_H
50 #include "displacementFvMotionSolver.H"
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 /*---------------------------------------------------------------------------*\
58 Class displacementInterpolationFvMotionSolver Declaration
59 \*---------------------------------------------------------------------------*/
61 class displacementInterpolationFvMotionSolver
63 public displacementFvMotionSolver
67 //- Additional settings for motion solver
68 dictionary dynamicMeshCoeffs_;
71 // Face zone information (note: could pack these to only contain
74 //- Interpolation table. From faceZone to times.
75 List<scalarField> times_;
77 //- Interpolation table. From faceZone to displacements.
78 List<vectorField> displacements_;
82 //- Per direction, per range the index of the lower
84 FixedList<labelList, 3> rangeToZone_;
86 //- Per direction, per range the points that are in it
87 FixedList<labelListList, 3> rangeToPoints_;
89 //- Per direction, per range the weight of the points relative
90 // to this and the next range.
91 FixedList<List<scalarField>, 3> rangeToWeights_;
94 // Private Member Functions
96 //- Disallow default bitwise copy construct
97 displacementInterpolationFvMotionSolver
99 const displacementInterpolationFvMotionSolver&
102 //- Disallow default bitwise assignment
103 void operator=(const displacementInterpolationFvMotionSolver&);
108 //- Runtime type information
109 TypeName("displacementInterpolation");
114 //- Construct from polyMesh and data stream
115 displacementInterpolationFvMotionSolver
118 Istream& msDataUnused
123 ~displacementInterpolationFvMotionSolver();
128 //- Return point location obtained from the current motion field
129 virtual tmp<pointField> curPoints() const;
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 } // End namespace Foam
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 // ************************************************************************* //