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-2020 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 public:
92 
93  //- Runtime type information
94  TypeName("displacementLinearMotion");
95 
96 
97  // Constructors
98 
99  //- Construct from polyMesh and dictionary
101  (
102  const polyMesh&,
103  const dictionary&
104  );
105 
106  //- Disallow default bitwise copy construction
108  (
110  );
111 
112 
113  //- Destructor
115 
116 
117  // Member Functions
118 
119  //- Return point location obtained from the current motion field
120  virtual tmp<pointField> curPoints() const;
121 
122  //- Solve for motion
123  virtual void solve()
124  {}
125 
126 
127  // Member Operators
128 
129  //- Disallow default bitwise assignment
130  void operator=(const displacementLinearMotionMotionSolver&) = delete;
131 };
132 
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
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 ...
TypeName("displacementLinearMotion")
Runtime type information.
displacementLinearMotionMotionSolver(const polyMesh &, const dictionary &)
Construct from polyMesh and dictionary.
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
void operator=(const displacementLinearMotionMotionSolver &)=delete
Disallow default bitwise assignment.
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.