FreeFOAM The Cross-Platform CFD Toolkit
displacementSBRStressFvMotionSolver.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::displacementSBRStressFvMotionSolver
26 
27 Description
28  Mesh motion solver for an fvMesh. Based on solving the cell-centre
29  solid-body rotation stress equations for the motion displacement.
30 
31 SourceFiles
32  displacementSBRStressFvMotionSolver.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef displacementSBRStressFvMotionSolver_H
37 #define displacementSBRStressFvMotionSolver_H
38 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 // Forward class declarations
47 class motionDiffusivity;
48 
49 /*---------------------------------------------------------------------------*\
50  Class displacementSBRStressFvMotionSolver 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  //- Diffusivity used to control the motion
66  autoPtr<motionDiffusivity> diffusivityPtr_;
67 
68 
69  // Private Member Functions
70 
71  //- Disallow default bitwise copy construct
73  (
75  );
76 
77  //- Disallow default bitwise assignment
78  void operator=(const displacementSBRStressFvMotionSolver&);
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("displacementSBRStress");
85 
86 
87  // Constructors
88 
89  //- Construct from polyMesh and data stream
91  (
92  const polyMesh&,
93  Istream& msDataUnused
94  );
95 
96 
97  // Destructor
98 
100 
101 
102  // Member Functions
103 
104  //- Return reference to the point motion displacement field
106  {
107  return pointDisplacement_;
108  }
109 
110  //- Return const reference to the point motion displacement field
112  {
113  return pointDisplacement_;
114  }
115 
116  //- Return reference to the cell motion displacement field
118  {
119  return cellDisplacement_;
120  }
121 
122  //- Return const reference to the cell motion displacement field
124  {
125  return cellDisplacement_;
126  }
127 
128  //- Return point location obtained from the current motion field
129  virtual tmp<pointField> curPoints() const;
130 
131  //- Solve for motion
132  virtual void solve();
133 
134  //- Update topology
135  virtual void updateMesh(const mapPolyMesh&);
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #endif
146 
147 // ************************ vim: set sw=4 sts=4 et: ************************ //