FreeFOAM The Cross-Platform CFD Toolkit
velocityComponentLaplacianFvMotionSolver.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::velocityComponentLaplacianFvMotionSolver
26 
27 Description
28  Mesh motion solver for an fvMesh. Based on solving the cell-centre
29  Laplacian for the given component of the motion velocity.
30 
31 SourceFiles
32  velocityComponentLaplacianFvMotionSolver.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef velocityComponentLaplacianFvMotionSolver_H
37 #define velocityComponentLaplacianFvMotionSolver_H
38 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 // Forward class declarations
47 class motionDiffusivity;
48 
49 /*---------------------------------------------------------------------------*\
50  Class velocityComponentLaplacianFvMotionSolver Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public fvMotionSolver
56 {
57  // Private data
58 
59  //- The component name to solve for
60  word cmptName_;
61 
62  //- The component to solve for
63  direction cmpt_;
64 
65  //- Point motion field
66  mutable pointScalarField pointMotionU_;
67 
68  //- Cell-centre motion field
69  mutable volScalarField cellMotionU_;
70 
71  //- Diffusivity used to control the motion
72  autoPtr<motionDiffusivity> diffusivityPtr_;
73 
74 
75  // Private Member Functions
76 
77  //- Disallow default bitwise copy construct
79  (
81  );
82 
83  //- Disallow default bitwise assignment
84  void operator=(const velocityComponentLaplacianFvMotionSolver&);
85 
86 
87 public:
88 
89  //- Runtime type information
90  TypeName("velocityComponentLaplacian");
91 
92 
93  // Constructors
94 
95  //- Construct from polyMesh and data stream (provides component)
97  (
98  const polyMesh&,
99  Istream& msData
100  );
101 
102 
103  // Destructor
104 
106 
107 
108  // Member Functions
109 
110  //- Non-const access to the cellMotionU in order to allow changes
111  // to the boundary motion
113  {
114  return cellMotionU_;
115  }
116 
117  //- Return point location obtained from the current motion field
118  virtual tmp<pointField> curPoints() const;
119 
120  //- Solve for motion
121  virtual void solve();
122 
123  //- Update topology
124  virtual void updateMesh(const mapPolyMesh&);
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************ vim: set sw=4 sts=4 et: ************************ //