enginePiston.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) 2011-2021 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::enginePiston
26 
27 Description
28  Foam::enginePiston
29 
30 SourceFiles
31  enginePiston.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef enginePiston_H
36 #define enginePiston_H
37 
38 #include "fvMeshMoversEngine.H"
39 #include "polyPatchID.H"
40 #include "coordinateSystem.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class enginePiston Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class enginePiston
52 {
53  // Private Data
54 
55  //- Reference to engine mesh mover
56  const fvMeshMovers::engine& meshMover_;
57 
58  //- Piston patch
59  polyPatchID patchID_;
60 
61  //- Coordinate system
63 
64 
65  // Piston layering data
66 
67  //- Min layer thickness
68  const scalar minLayer_;
69 
70  //- Max layer thickness
71  const scalar maxLayer_;
72 
73 
74 public:
75 
76  // Constructors
77 
78  //- Construct from components
80  (
81  const fvMeshMover& meshMover,
82  const word& pistonPatchName,
83  const autoPtr<coordinateSystem>& pistonCS,
84  const scalar minLayer,
85  const scalar maxLayer
86 
87  );
88 
89  //- Construct from dictionary
91  (
92  const fvMeshMover& meshMover,
93  const dictionary& dict
94  );
95 
96  //- Disallow default bitwise copy construction
97  enginePiston(const enginePiston&) = delete;
98 
99 
100  // Member Functions
101 
102  //- Return coordinate system
103  const coordinateSystem& cs() const
104  {
105  return csPtr_();
106  }
107 
108  //- Return ID of piston patch
109  const polyPatchID& patchID() const
110  {
111  return patchID_;
112  }
113 
114  // Piston layering thickness
115 
116  scalar minLayer() const
117  {
118  return minLayer_;
119  }
120 
121  scalar maxLayer() const
122  {
123  return maxLayer_;
124  }
125 
126 
127  //- Write dictionary
128  void writeDict(Ostream&) const;
129 
130 
131  // Member Operators
132 
133  //- Disallow default bitwise assignment
134  void operator=(const enginePiston&) = delete;
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Base class for other coordinate system specifications.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Foam::enginePiston.
Definition: enginePiston.H:51
enginePiston(const fvMeshMover &meshMover, const word &pistonPatchName, const autoPtr< coordinateSystem > &pistonCS, const scalar minLayer, const scalar maxLayer)
Construct from components.
Definition: enginePiston.C:31
void operator=(const enginePiston &)=delete
Disallow default bitwise assignment.
void writeDict(Ostream &) const
Write dictionary.
Definition: enginePiston.C:70
scalar maxLayer() const
Definition: enginePiston.H:120
const polyPatchID & patchID() const
Return ID of piston patch.
Definition: enginePiston.H:108
const coordinateSystem & cs() const
Return coordinate system.
Definition: enginePiston.H:102
scalar minLayer() const
Definition: enginePiston.H:115
Abstract base class for fvMesh movers.
Definition: fvMeshMover.H:53
Basic mesh motion specifically for engines.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
dictionary dict