Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / src / engine / engineVerticalValve / engineVerticalValve.H
blob69f8fa791145a695b35273f5c53f84428e649cb4
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation, either version 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     engineVerticalValve
27 Description
28     class for engine meshes with vertical valves
30 SourceFiles
31     engineVerticalValve.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef engineVerticalValve_H
36 #define engineVerticalValve_H
38 #include "word.H"
39 #include "coordinateSystem.H"
40 #include "polyPatchID.H"
41 #include "graph.H"
42 #include "engineValve.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 // Class forward declarations
50 class polyMesh;
51 class engineTime;
53 /*---------------------------------------------------------------------------*\
54                           Class engineVerticalValve Declaration
55 \*---------------------------------------------------------------------------*/
57 class engineVerticalValve
59     public engineValve
61     // Private data
63         //- Valve head patch
64         polyPatchID valveHeadPatch_;
66         //- Offset for layer Addition/Removal
67         scalar topLayerOffset_;
69         //- Tolerance for adding layer face zone
70         scalar topLayerTol_;
72         //- Offset for layer Addition/Removal
73         scalar bottomLayerOffset_;
75         //- Tolerance for adding layer face zone
76         scalar bottomLayerTol_;
78         //- Distance for attach/detach boundary
79         scalar detachDistance_;
81         //- Tolerance for attach/detach boundary faces
82         scalar detachTol_;
84         //- Tolerance for deformation/layering
85         scalar deformationLift_;
87     // Private Member Functions
89         //- Disallow default bitwise copy construct
90         engineVerticalValve(const engineVerticalValve&);
92         //- Disallow default bitwise assignment
93         void operator=(const engineVerticalValve&);
97 public:
99     // Static data members
102     // Constructors
104         //- Construct from components
105         engineVerticalValve
106         (
107             const word& name,
108             const polyMesh& mesh,
109             const autoPtr<coordinateSystem>& valveCS,
110             const word& bottomPatchName,
111             const word& poppetPatchName,
112             const word& stemPatchName,
113             const word& curtainInPortPatchName,
114             const word& curtainInCylinderPatchName,
115             const word& detachInCylinderPatchName,
116             const word& detachInPortPatchName,
117             const labelList& detachFaces,
118             const graph& liftProfile,
119             const scalar minLift,
120             const scalar minTopLayer,
121             const scalar maxTopLayer,
122             const scalar minBottomLayer,
123             const scalar maxBottomLayer,
124             const scalar diameter,
125             const word& valveHeadPatchName,
126             const scalar topLayerOffset,
127             const scalar topLayerTol,
128             const scalar bottomLayerOffset,
129             const scalar bottomLayerTol,
130             const scalar detachDistance,
131             const scalar detachTol,
132             const scalar deformationLift
133         );
135         //- Construct from dictionary
136         engineVerticalValve
137         (
138             const word& name,
139             const polyMesh& mesh,
140             const dictionary& dict
141         );
144     // Destructor - default
147     // Member Functions
150         const scalar& topLayerOffset() const
151         {
152             return topLayerOffset_;
153         }
155         const scalar& topLayerTol() const
156         {
157             return topLayerTol_;
158         }
160         const scalar& bottomLayerOffset() const
161         {
162             return bottomLayerOffset_;
163         }
165         const scalar& bottomLayerTol() const
166         {
167             return bottomLayerTol_;
168         }
170         const scalar& detachDistance() const
171         {
172             return detachDistance_;
173         }
175         const scalar& detachTol() const
176         {
177             return detachTol_;
178         }
180         const scalar& deformationLift() const
181         {
182             return deformationLift_;
183         }
185    // Valve patches
187        //- Return ID of bottom patch
188        const polyPatchID& valveHeadID() const
189        {
190            return valveHeadPatch_;
191        }
194         //- Write dictionary
195         void writeDict(Ostream&) const;
199 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201 } // End namespace Foam
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 #endif
207 // ************************************************************************* //