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