enginePiston.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::enginePiston
28
29Description
30 Foam::enginePiston
31
32SourceFiles
33 enginePiston.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef enginePiston_H
38#define enginePiston_H
39
40#include "polyPatchID.H"
41#include "coordinateSystem.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48// Forward declaration of classes
49class polyMesh;
50class engineTime;
51
52/*---------------------------------------------------------------------------*\
53 Class enginePiston Declaration
54\*---------------------------------------------------------------------------*/
56class enginePiston
57{
58 // Private data
59
60 //- Reference to engine mesh
61 const polyMesh& mesh_;
62
63 //- Reference to engine database
64 const engineTime& engineDB_;
65
66 //- Piston patch
67 polyPatchID patchID_;
68
69 //- Coordinate system
71
72
73 // Piston layering data
74
75 //- Min layer thickness
76 const scalar minLayer_;
77
78 //- Max layer thickness
79 const scalar maxLayer_;
80
81
82 // Private Member Functions
83
84 //- No copy construct
85 enginePiston(const enginePiston&) = delete;
86
87 //- No copy assignment
88 void operator=(const enginePiston&) = delete;
89
90
91public:
92
93 // Static data members
94
95
96 // Constructors
97
98 //- Construct from components
100 (
101 const polyMesh& mesh,
102 const word& pistonPatchName,
103 const autoPtr<coordinateSystem>& pistonCS,
104 const scalar minLayer,
105 const scalar maxLayer
106
107 );
108
109 //- Construct from dictionary
111 (
112 const polyMesh& mesh,
113 const dictionary& dict
114 );
115
116
117 //- Destructor
118 ~enginePiston() = default;
119
120
121 // Member Functions
122
123 //- Return coordinate system
124 const coordinateSystem& cs() const
125 {
126 return *csysPtr_;
127 }
128
129 //- Return ID of piston patch
130 const polyPatchID& patchID() const
131 {
132 return patchID_;
133 }
134
135 // Piston layering thickness
137 scalar minLayer() const
138 {
139 return minLayer_;
140 }
142 scalar maxLayer() const
143 {
144 return maxLayer_;
145 }
146
147
148 //- Write dictionary
149 void writeDict(Ostream&) const;
150};
151
152
153// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154
155} // End namespace Foam
156
157// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158
159#endif
160
161// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Base class for coordinate system specification, the default coordinate system type is cartesian .
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Foam::enginePiston.
Definition: enginePiston.H:56
const polyPatchID & patchID() const
Return ID of piston patch.
Definition: enginePiston.H:129
const coordinateSystem & cs() const
Return coordinate system.
Definition: enginePiston.H:123
void writeDict(Ostream &) const
Write dictionary.
Definition: enginePiston.C:73
scalar maxLayer() const
Definition: enginePiston.H:141
scalar minLayer() const
Definition: enginePiston.H:136
~enginePiston()=default
Destructor.
An abstract class for the time description of the piston motion.
Definition: engineTime.H:57
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
A class for handling words, derived from Foam::string.
Definition: word.H:68
dynamicFvMesh & mesh
Namespace for OpenFOAM.
dictionary dict