OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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