OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen 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-2007 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     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 "volPointInterpolation.H"
00044 
00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00046 
00047 namespace Foam
00048 {
00049 
00050 /*---------------------------------------------------------------------------*\
00051                            Class fvMotionSolver Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class fvMotionSolver
00055 :
00056     public motionSolver
00057 {
00058 
00059 protected:
00060 
00061     // Protected data
00062 
00063         //- The fvMesh to be moved
00064         const fvMesh& fvMesh_;
00065 
00066         //- Point mesh needed by the volPointInterpolation
00067         mutable pointMesh pointMesh_;
00068 
00069         //- Vol-point interpolator used to obtain the point motion from
00070         //  the cell-centre motion
00071         mutable volPointInterpolation vpi_;
00072 
00073 
00074     // Protected member functions
00075 
00076         //- Create the corresponding patch types for cellMotion from those
00077         //  of the given pointMotion
00078         template<class Type>
00079         wordList cellMotionBoundaryTypes
00080         (
00081             const typename GeometricField<Type, pointPatchField, pointMesh>::
00082             GeometricBoundaryField& pmUbf
00083         ) const;
00084 
00085 
00086 public:
00087 
00088     //- Runtime type information
00089     TypeName("fvMotionSolver");
00090 
00091 
00092     // Constructors
00093 
00094         //- Construct from polyMesh
00095         fvMotionSolver(const polyMesh& mesh);
00096 
00097 
00098     // Destructor
00099 
00100         virtual ~fvMotionSolver();
00101 
00102 
00103     // Member Functions
00104 
00105         //- Return reference to the fvMesh to be moved
00106         const fvMesh& mesh() const
00107         {
00108             return fvMesh_;
00109         }
00110 
00111         //- Return point location obtained from the current motion field
00112         virtual tmp<pointField> curPoints() const = 0;
00113 
00114         //- Solve for motion
00115         virtual void solve() = 0;
00116 
00117         //- Update topology
00118         virtual void updateMesh();
00119 };
00120 
00121 
00122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00123 
00124 } // End namespace Foam
00125 
00126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00127 
00128 #ifdef NoRepository
00129 #   include "fvMotionSolverTemplates.C"
00130 #endif
00131 
00132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00133 
00134 #endif
00135 
00136 // ************************************************************************* //
Copyright © 2000-2007 OpenCFD Ltd