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

fvMotionSolver.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::fvMotionSolver
00026 
00027 Description
00028     Virtual base class for finite volume mesh motion solvers.
00029 
00030     The boundary motion is set as a boundary condition on the motion velocity
00031     variable motionU.
00032 
00033 SourceFiles
00034     fvMotionSolver.C
00035 
00036 \*---------------------------------------------------------------------------*/
00037 
00038 #ifndef fvMotionSolver_H
00039 #define fvMotionSolver_H
00040 
00041 #include <dynamicMesh/motionSolver.H>
00042 #include <OpenFOAM/pointFieldsFwd.H>
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 
00049 class fvMesh;
00050 class mapPolyMesh;
00051 
00052 /*---------------------------------------------------------------------------*\
00053                            Class fvMotionSolver Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 class fvMotionSolver
00057 :
00058     public motionSolver
00059 {
00060 
00061 protected:
00062 
00063     // Protected data
00064 
00065         //- The fvMesh to be moved
00066         const fvMesh& fvMesh_;
00067 
00068 
00069     // Protected member functions
00070 
00071         //- Create the corresponding patch types for cellMotion from those
00072         //  of the given pointMotion
00073         template<class Type>
00074         wordList cellMotionBoundaryTypes
00075         (
00076             const typename GeometricField<Type, pointPatchField, pointMesh>::
00077             GeometricBoundaryField& pmUbf
00078         ) const;
00079 
00080 
00081 public:
00082 
00083     //- Runtime type information
00084     TypeName("fvMotionSolver");
00085 
00086 
00087     // Constructors
00088 
00089         //- Construct from polyMesh
00090         fvMotionSolver(const polyMesh& mesh);
00091 
00092 
00093     // Destructor
00094 
00095         virtual ~fvMotionSolver();
00096 
00097 
00098     // Member Functions
00099 
00100         //- Return reference to the fvMesh to be moved
00101         const fvMesh& mesh() const
00102         {
00103             return fvMesh_;
00104         }
00105 
00106         //- Return point location obtained from the current motion field
00107         virtual tmp<pointField> curPoints() const = 0;
00108 
00109         //- Solve for motion
00110         virtual void solve() = 0;
00111 
00112         //- Update the pointMesh corresponding to the new points
00113         void movePoints(const pointField&);
00114 
00115         //- Update the mesh corresponding to given map
00116         virtual void updateMesh(const mapPolyMesh&);
00117 };
00118 
00119 
00120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00121 
00122 } // End namespace Foam
00123 
00124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00125 
00126 #ifdef NoRepository
00127 #   include "fvMotionSolverTemplates.C"
00128 #endif
00129 
00130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00131 
00132 #endif
00133 
00134 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines