displacementLinearMotionMotionSolver.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
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::displacementLinearMotionMotionSolver
26 
27 Description
28  Mesh motion solver simple linear expansion and contraction of a mesh
29  region defined by a motion axis and the extents of the motion.
30 
31  Example:
32  \verbatim
33  dynamicFvMesh dynamicMotionSolverFvMesh;
34 
35  motionSolver displacementLinearMotion;
36 
37  axis (0 1 0);
38  xFixed 0.8;
39  xMoving 0;
40  displacement table
41  (
42  (0 0)
43  (4 0.7)
44  );
45  \endverbatim
46 
47  This mesh is compressed between \c xFixed and \c xMoving in the direction
48  \c axis between time 0 and 4 with a maximum displacement of 0.7.
49  The mesh beyond \c xFixed is fixed and beyond \c xMoving moves with maximum
50  displacement.
51 
52 SourceFiles
53  displacementLinearMotionMotionSolver.C
54 
55 \*---------------------------------------------------------------------------*/
56 
57 #ifndef displacementLinearMotionMotionSolver_H
58 #define displacementLinearMotionMotionSolver_H
59 
60 #include "points0MotionSolver.H"
61 #include "Function1.H"
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 
68 /*---------------------------------------------------------------------------*\
69  Class displacementLinearMotionMotionSolver Declaration
70 \*---------------------------------------------------------------------------*/
71 
73 :
74  public points0MotionSolver
75 {
76  // Private data
77 
78  //- Axis of the linear motion
79  vector axis_;
80 
81  //- The location of the end of motion
82  scalar xFixed_;
83 
84  //- The location moving with the specified displacement
85  scalar xMoving_;
86 
87  //- The displacement as a function of time
88  autoPtr<Function1<scalar>> displacement_;
89 
90 
91  //- Disallow default bitwise copy construct
93  (
95  );
96 
97  //- Disallow default bitwise assignment
98  void operator=(const displacementLinearMotionMotionSolver&);
99 
100 
101 public:
102 
103  //- Runtime type information
104  TypeName("displacementLinearMotion");
105 
106 
107  // Constructors
108 
109  //- Construct from polyMesh and IOdictionary
111  (
112  const polyMesh&,
113  const IOdictionary&
114  );
115 
116 
117  //- Destructor
119 
120 
121  // Member Functions
122 
123  //- Return point location obtained from the current motion field
124  virtual tmp<pointField> curPoints() const;
125 
126  //- Solve for motion
127  virtual void solve()
128  {}
129 };
130 
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 } // End namespace Foam
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
virtual tmp< pointField > curPoints() const
Return point location obtained from the current motion field.
Mesh motion solver simple linear expansion and contraction of a mesh region defined by a motion axis ...
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:52
TypeName("displacementLinearMotion")
Runtime type information.
Virtual base class for displacement motion solvers.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.