FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

displacementInterpolationFvMotionSolver.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::displacementInterpolationFvMotionSolver
00026 
00027 Description
00028     Mesh motion solver for an fvMesh.
00029 
00030     Scales inbetween motion prescribed on faceZones. Works out per point
00031     the distance between the bounding face zones (in all three directions)
00032     at the start and then every time step
00033     - moves the faceZones based on tables
00034     - interpolates the displacement of all points based on the
00035       faceZone motion.
00036 
00037     Tables are in the @a constant/tables directory.
00038 
00039 Note
00040     could be a motionSolver - does not use any fvMesh structure.
00041 
00042 SourceFiles
00043     displacementInterpolationFvMotionSolver.C
00044 
00045 \*---------------------------------------------------------------------------*/
00046 
00047 #ifndef displacementInterpolationFvMotionSolver_H
00048 #define displacementInterpolationFvMotionSolver_H
00049 
00050 #include <fvMotionSolvers/displacementFvMotionSolver.H>
00051 
00052 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00053 
00054 namespace Foam
00055 {
00056 
00057 /*---------------------------------------------------------------------------*\
00058         Class displacementInterpolationFvMotionSolver Declaration
00059 \*---------------------------------------------------------------------------*/
00060 
00061 class displacementInterpolationFvMotionSolver
00062 :
00063     public displacementFvMotionSolver
00064 {
00065     // Private data
00066 
00067         //- Additional settings for motion solver
00068         dictionary dynamicMeshCoeffs_;
00069 
00070 
00071         // Face zone information (note: could pack these to only contain
00072         // used zones)
00073 
00074             //- Interpolation table. From faceZone to times.
00075             List<scalarField> times_;
00076 
00077             //- Interpolation table. From faceZone to displacements.
00078             List<vectorField> displacements_;
00079 
00080         // Range information.
00081 
00082             //- Per direction, per range the index of the lower
00083             //  faceZone
00084             FixedList<labelList, 3> rangeToZone_;
00085 
00086             //- Per direction, per range the points that are in it
00087             FixedList<labelListList, 3> rangeToPoints_;
00088 
00089             //- Per direction, per range the weight of the points relative
00090             //  to this and the next range.
00091             FixedList<List<scalarField>, 3> rangeToWeights_;
00092 
00093 
00094     // Private Member Functions
00095 
00096         //- Disallow default bitwise copy construct
00097         displacementInterpolationFvMotionSolver
00098         (
00099             const displacementInterpolationFvMotionSolver&
00100         );
00101 
00102         //- Disallow default bitwise assignment
00103         void operator=(const displacementInterpolationFvMotionSolver&);
00104 
00105 
00106 public:
00107 
00108     //- Runtime type information
00109     TypeName("displacementInterpolation");
00110 
00111 
00112     // Constructors
00113 
00114         //- Construct from polyMesh and data stream
00115         displacementInterpolationFvMotionSolver
00116         (
00117             const polyMesh&,
00118             Istream& msDataUnused
00119         );
00120 
00121 
00122     // Destructor
00123 
00124         ~displacementInterpolationFvMotionSolver();
00125 
00126 
00127     // Member Functions
00128 
00129         //- Return point location obtained from the current motion field
00130         virtual tmp<pointField> curPoints() const;
00131 
00132         //- Solve for motion
00133         virtual void solve()
00134         {}
00135 };
00136 
00137 
00138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00139 
00140 } // End namespace Foam
00141 
00142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00143 
00144 #endif
00145 
00146 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines