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

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