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

displacementLaplacianFvMotionSolver.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::displacementLaplacianFvMotionSolver
00027 
00028 Description
00029     Mesh motion solver for an fvMesh.  Based on solving the cell-centre
00030     Laplacian for the motion displacement.
00031 
00032 SourceFiles
00033     displacementLaplacianFvMotionSolver.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef displacementLaplacianFvMotionSolver_H
00038 #define displacementLaplacianFvMotionSolver_H
00039 
00040 #include "displacementFvMotionSolver.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 // Forward class declarations
00048 class motionDiffusivity;
00049 
00050 /*---------------------------------------------------------------------------*\
00051              Class displacementLaplacianFvMotionSolver Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class displacementLaplacianFvMotionSolver
00055 :
00056     public displacementFvMotionSolver
00057 {
00058     // Private data
00059 
00060         //- Point motion field
00061         mutable pointVectorField pointDisplacement_;
00062 
00063         //- Cell-centre motion field
00064         mutable volVectorField cellDisplacement_;
00065 
00066         //- Optionally read point-position field. Used only for position
00067         //  boundary conditions.
00068         mutable autoPtr<pointVectorField> pointLocation_;
00069 
00070         //- Diffusivity used to control the motion
00071         autoPtr<motionDiffusivity> diffusivityPtr_;
00072 
00073         //- Frozen points (that are not on patches). -1 or points that are
00074         //  fixed to be at points0_ location
00075         label frozenPointsZone_;
00076 
00077 
00078     // Private Member Functions
00079 
00080         //- Disallow default bitwise copy construct
00081         displacementLaplacianFvMotionSolver
00082         (
00083             const displacementLaplacianFvMotionSolver&
00084         );
00085 
00086         //- Disallow default bitwise assignment
00087         void operator=(const displacementLaplacianFvMotionSolver&);
00088 
00089 
00090 public:
00091 
00092     //- Runtime type information
00093     TypeName("displacementLaplacian");
00094 
00095 
00096     // Constructors
00097 
00098         //- Construct from polyMesh and data stream
00099         displacementLaplacianFvMotionSolver
00100         (
00101             const polyMesh&,
00102             Istream& msDataUnused
00103         );
00104 
00105 
00106     // Destructor
00107 
00108         ~displacementLaplacianFvMotionSolver();
00109 
00110 
00111     // Member Functions
00112 
00113         //- Return reference to the point motion displacement field
00114         pointVectorField& pointDisplacement()
00115         {
00116             return pointDisplacement_;
00117         }
00118 
00119         //- Return const reference to the point motion displacement field
00120         const pointVectorField& pointDisplacement() const
00121         {
00122             return pointDisplacement_;
00123         }
00124 
00125         //- Return reference to the cell motion displacement field
00126         volVectorField& cellDisplacement()
00127         {
00128             return cellDisplacement_;
00129         }
00130 
00131         //- Return const reference to the cell motion displacement field
00132         const volVectorField& cellDisplacement() const
00133         {
00134             return cellDisplacement_;
00135         }
00136 
00137         //- Return point location obtained from the current motion field
00138         virtual tmp<pointField> curPoints() const;
00139 
00140         //- Solve for motion
00141         virtual void solve();
00142 
00143         //- Update topology
00144         virtual void updateMesh(const mapPolyMesh&);
00145 };
00146 
00147 
00148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00149 
00150 } // End namespace Foam
00151 
00152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00153 
00154 #endif
00155 
00156 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd