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

velocityLaplacianFvMotionSolver.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::velocityLaplacianFvMotionSolver
00027 
00028 Description
00029     Mesh motion solver for an fvMesh.  Based on solving the cell-centre
00030     Laplacian for the motion velocity.
00031 
00032 SourceFiles
00033     velocityLaplacianFvMotionSolver.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef velocityLaplacianFvMotionSolver_H
00038 #define velocityLaplacianFvMotionSolver_H
00039 
00040 #include "fvMotionSolver.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 // Forward class declarations
00048 class motionDiffusivity;
00049 
00050 /*---------------------------------------------------------------------------*\
00051               Class velocityLaplacianFvMotionSolver Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class velocityLaplacianFvMotionSolver
00055 :
00056     public fvMotionSolver
00057 {
00058     // Private data
00059 
00060         //- Point motion field
00061         mutable pointVectorField pointMotionU_;
00062 
00063         //- Cell-centre motion field
00064         mutable volVectorField cellMotionU_;
00065 
00066         //- Diffusivity used to control the motion
00067         autoPtr<motionDiffusivity> diffusivityPtr_;
00068 
00069 
00070     // Private Member Functions
00071 
00072         //- Disallow default bitwise copy construct
00073         velocityLaplacianFvMotionSolver
00074         (
00075             const velocityLaplacianFvMotionSolver&
00076         );
00077 
00078         //- Disallow default bitwise assignment
00079         void operator=(const velocityLaplacianFvMotionSolver&);
00080 
00081 
00082 public:
00083 
00084     //- Runtime type information
00085     TypeName("velocityLaplacian");
00086 
00087 
00088     // Constructors
00089 
00090         //- Construct from polyMesh and data stream
00091         velocityLaplacianFvMotionSolver
00092         (
00093             const polyMesh&,
00094             Istream& msDataUnused
00095         );
00096 
00097 
00098     // Destructor
00099 
00100         ~velocityLaplacianFvMotionSolver();
00101 
00102 
00103     // Member Functions
00104 
00105         //- Return reference to the point motion velocity field
00106         pointVectorField& pointMotionU()
00107         {
00108             return pointMotionU_;
00109         }
00110 
00111         //- Return const reference to the point motion velocity field
00112         const pointVectorField& pointMotionU() const
00113         {
00114             return pointMotionU_;
00115         }
00116 
00117         //- Return reference to the cell motion velocity field
00118         volVectorField& cellMotionU()
00119         {
00120             return cellMotionU_;
00121         }
00122 
00123         //- Return const reference to the cell motion velocity field
00124         const volVectorField& cellMotionU() const
00125         {
00126             return cellMotionU_;
00127         }
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         //- Update topology
00136         virtual void updateMesh(const mapPolyMesh&);
00137 };
00138 
00139 
00140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00141 
00142 } // End namespace Foam
00143 
00144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00145 
00146 #endif
00147 
00148 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd