OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

displacementSBRStressFvMotionSolver.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     displacementSBRStressFvMotionSolver
00027 
00028 Description
00029     Mesh motion solver for an fvMesh.  Based on solving the cell-centre
00030     solid-body rotation stress equations for the motion displacement.
00031 
00032 SourceFiles
00033     displacementSBRStressFvMotionSolver.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef displacementSBRStressFvMotionSolver_H
00038 #define displacementSBRStressFvMotionSolver_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 displacementSBRStressFvMotionSolver Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class displacementSBRStressFvMotionSolver
00055 :
00056     public fvMotionSolver
00057 {
00058     // Private data
00059 
00060         //- Reference point field
00061         pointField points0_;
00062 
00063         //- Point motion field
00064         mutable pointVectorField pointDisplacement_;
00065 
00066         //- Cell-centre motion field
00067         mutable volVectorField cellDisplacement_;
00068 
00069         //- Diffusivity used to control the motion
00070         autoPtr<motionDiffusivity> diffusivityPtr_;
00071 
00072 
00073     // Private Member Functions
00074 
00075         //- Disallow default bitwise copy construct
00076         displacementSBRStressFvMotionSolver
00077         (
00078             const displacementSBRStressFvMotionSolver&
00079         );
00080 
00081         //- Disallow default bitwise assignment
00082         void operator=(const displacementSBRStressFvMotionSolver&);
00083 
00084 
00085 public:
00086 
00087     //- Runtime type information
00088     TypeName("displacementSBRStress");
00089 
00090 
00091     // Constructors
00092 
00093         //- Construct from polyMesh and data stream
00094         displacementSBRStressFvMotionSolver
00095         (
00096             const polyMesh& mesh,
00097             Istream& msData
00098         );
00099 
00100 
00101     // Destructor
00102 
00103         ~displacementSBRStressFvMotionSolver();
00104 
00105 
00106     // Member Functions
00107 
00108         //- Return reference to the point motion velocity field
00109         pointVectorField& pointDisplacement()
00110         {
00111             return pointDisplacement_;
00112         }
00113 
00114         //- Return const reference to the point motion velocity field
00115         const pointVectorField& pointDisplacement() const
00116         {
00117             return pointDisplacement_;
00118         }
00119 
00120         //- Return reference to the cell motion velocity field
00121         volVectorField& cellDisplacement()
00122         {
00123             return cellDisplacement_;
00124         }
00125 
00126         //- Return const reference to the cell motion velocity field
00127         const volVectorField& cellDisplacement() const
00128         {
00129             return cellDisplacement_;
00130         }
00131 
00132         //- Return point location obtained from the current motion field
00133         virtual tmp<pointField> curPoints() const;
00134 
00135         //- Solve for motion
00136         virtual void solve();
00137 };
00138 
00139 
00140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00141 
00142 } // End namespace Foam
00143 
00144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00145 
00146 #endif
00147 
00148 // ************************************************************************* //
Copyright © 2000-2007 OpenCFD Ltd