FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

enginePiston.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::enginePiston
00026 
00027 Description
00028     Foam::enginePiston
00029 
00030 SourceFiles
00031     enginePiston.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef enginePiston_H
00036 #define enginePiston_H
00037 
00038 #include <OpenFOAM/polyPatchID.H>
00039 #include <meshTools/coordinateSystem.H>
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 // Forward declaration of classes
00047 class polyMesh;
00048 class engineTime;
00049 
00050 /*---------------------------------------------------------------------------*\
00051                            Class enginePiston Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class enginePiston
00055 {
00056     // Private data
00057 
00058         //- Reference to engine mesh
00059         const polyMesh& mesh_;
00060 
00061         //- Reference to engine database
00062         const engineTime& engineDB_;
00063 
00064         //- Piston patch
00065         polyPatchID patchID_;
00066 
00067         //- Coordinate system
00068         autoPtr<coordinateSystem> csPtr_;
00069 
00070 
00071         // Piston layering data
00072 
00073             //- Min layer thickness
00074             const scalar minLayer_;
00075 
00076             //- Max layer thickness
00077             const scalar maxLayer_;
00078 
00079 
00080     // Private Member Functions
00081 
00082         //- Disallow default bitwise copy construct
00083         enginePiston(const enginePiston&);
00084 
00085         //- Disallow default bitwise assignment
00086         void operator=(const enginePiston&);
00087 
00088 
00089 public:
00090 
00091     // Static data members
00092 
00093 
00094     // Constructors
00095 
00096         //- Construct from components
00097         enginePiston
00098         (
00099             const polyMesh& mesh,
00100             const word& pistonPatchName,
00101             const autoPtr<coordinateSystem>& pistonCS,
00102             const scalar minLayer,
00103             const scalar maxLayer
00104 
00105         );
00106 
00107         //- Construct from dictionary
00108         enginePiston
00109         (
00110             const polyMesh& mesh,
00111             const dictionary& dict
00112         );
00113 
00114 
00115     // Destructor - default
00116 
00117 
00118     // Member Functions
00119 
00120         //- Return coordinate system
00121         const coordinateSystem& cs() const
00122         {
00123             return csPtr_();
00124         }
00125 
00126         //- Return ID of piston patch
00127         const polyPatchID& patchID() const
00128         {
00129             return patchID_;
00130         }
00131 
00132         // Piston layering thickness
00133 
00134             scalar minLayer() const
00135             {
00136                 return minLayer_;
00137             }
00138 
00139             scalar maxLayer() const
00140             {
00141                 return maxLayer_;
00142             }
00143 
00144 
00145         //- Write dictionary
00146         void writeDict(Ostream&) const;
00147 };
00148 
00149 
00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00151 
00152 } // End namespace Foam
00153 
00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00155 
00156 #endif
00157 
00158 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines