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

velocityComponentLaplacianFvMotionSolver.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::velocityComponentLaplacianFvMotionSolver
00026 
00027 Description
00028     Mesh motion solver for an fvMesh.  Based on solving the cell-centre
00029     Laplacian for the given component of the motion velocity.
00030 
00031 SourceFiles
00032     velocityComponentLaplacianFvMotionSolver.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef velocityComponentLaplacianFvMotionSolver_H
00037 #define velocityComponentLaplacianFvMotionSolver_H
00038 
00039 #include <fvMotionSolvers/fvMotionSolver.H>
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 // Forward class declarations
00047 class motionDiffusivity;
00048 
00049 /*---------------------------------------------------------------------------*\
00050           Class velocityComponentLaplacianFvMotionSolver Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class velocityComponentLaplacianFvMotionSolver
00054 :
00055     public fvMotionSolver
00056 {
00057     // Private data
00058 
00059         //- The component name to solve for
00060         word cmptName_;
00061 
00062         //- The component to solve for
00063         direction cmpt_;
00064 
00065         //- Point motion field
00066         mutable pointScalarField pointMotionU_;
00067 
00068         //- Cell-centre motion field
00069         mutable volScalarField cellMotionU_;
00070 
00071         //- Diffusivity used to control the motion
00072         autoPtr<motionDiffusivity> diffusivityPtr_;
00073 
00074 
00075     // Private Member Functions
00076 
00077         //- Disallow default bitwise copy construct
00078         velocityComponentLaplacianFvMotionSolver
00079         (
00080             const velocityComponentLaplacianFvMotionSolver&
00081         );
00082 
00083         //- Disallow default bitwise assignment
00084         void operator=(const velocityComponentLaplacianFvMotionSolver&);
00085 
00086 
00087 public:
00088 
00089     //- Runtime type information
00090     TypeName("velocityComponentLaplacian");
00091 
00092 
00093     // Constructors
00094 
00095         //- Construct from polyMesh and data stream (provides component)
00096         velocityComponentLaplacianFvMotionSolver
00097         (
00098             const polyMesh&,
00099             Istream& msData
00100         );
00101 
00102 
00103     // Destructor
00104 
00105         ~velocityComponentLaplacianFvMotionSolver();
00106 
00107 
00108     // Member Functions
00109 
00110         //- Non-const access to the cellMotionU in order to allow changes
00111         //  to the boundary motion
00112         volScalarField& cellMotionU()
00113         {
00114             return cellMotionU_;
00115         }
00116 
00117         //- Return point location obtained from the current motion field
00118         virtual tmp<pointField> curPoints() const;
00119 
00120         //- Solve for motion
00121         virtual void solve();
00122 
00123         //- Update topology
00124         virtual void updateMesh(const mapPolyMesh&);
00125 };
00126 
00127 
00128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00129 
00130 } // End namespace Foam
00131 
00132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00133 
00134 #endif
00135 
00136 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines