FreeFOAM The Cross-Platform CFD Toolkit
displacementLaplacianFvMotionSolver.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::displacementLaplacianFvMotionSolver
26 
27 Description
28  Mesh motion solver for an fvMesh. Based on solving the cell-centre
29  Laplacian for the motion displacement.
30 
31 SourceFiles
32  displacementLaplacianFvMotionSolver.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef displacementLaplacianFvMotionSolver_H
37 #define displacementLaplacianFvMotionSolver_H
38 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 // Forward class declarations
47 class motionDiffusivity;
48 
49 /*---------------------------------------------------------------------------*\
50  Class displacementLaplacianFvMotionSolver Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
56 {
57  // Private data
58 
59  //- Point motion field
60  mutable pointVectorField pointDisplacement_;
61 
62  //- Cell-centre motion field
63  mutable volVectorField cellDisplacement_;
64 
65  //- Optionally read point-position field. Used only for position
66  // boundary conditions.
67  mutable autoPtr<pointVectorField> pointLocation_;
68 
69  //- Diffusivity used to control the motion
70  autoPtr<motionDiffusivity> diffusivityPtr_;
71 
72  //- Frozen points (that are not on patches). -1 or points that are
73  // fixed to be at points0_ location
74  label frozenPointsZone_;
75 
76 
77  // Private Member Functions
78 
79  //- Disallow default bitwise copy construct
81  (
83  );
84 
85  //- Disallow default bitwise assignment
86  void operator=(const displacementLaplacianFvMotionSolver&);
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("displacementLaplacian");
93 
94 
95  // Constructors
96 
97  //- Construct from polyMesh and data stream
99  (
100  const polyMesh&,
101  Istream& msDataUnused
102  );
103 
104 
105  // Destructor
106 
108 
109 
110  // Member Functions
111 
112  //- Return reference to the point motion displacement field
114  {
115  return pointDisplacement_;
116  }
117 
118  //- Return const reference to the point motion displacement field
120  {
121  return pointDisplacement_;
122  }
123 
124  //- Return reference to the cell motion displacement field
126  {
127  return cellDisplacement_;
128  }
129 
130  //- Return const reference to the cell motion displacement field
132  {
133  return cellDisplacement_;
134  }
135 
136  //- Return point location obtained from the current motion field
137  virtual tmp<pointField> curPoints() const;
138 
139  //- Solve for motion
140  virtual void solve();
141 
142  //- Update topology
143  virtual void updateMesh(const mapPolyMesh&);
144 };
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace Foam
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #endif
154 
155 // ************************ vim: set sw=4 sts=4 et: ************************ //