|
|
|
enginePiston.HGo 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-2009 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 the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 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, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 Foam::enginePiston 00027 00028 Description 00029 Foam::enginePiston 00030 00031 SourceFiles 00032 enginePiston.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef enginePiston_H 00037 #define enginePiston_H 00038 00039 #include "polyPatchID.H" 00040 #include "coordinateSystem.H" 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 00047 // Forward declaration of classes 00048 class polyMesh; 00049 class engineTime; 00050 00051 /*---------------------------------------------------------------------------*\ 00052 Class enginePiston Declaration 00053 \*---------------------------------------------------------------------------*/ 00054 00055 class enginePiston 00056 { 00057 // Private data 00058 00059 //- Reference to engine mesh 00060 const polyMesh& mesh_; 00061 00062 //- Reference to engine database 00063 const engineTime& engineDB_; 00064 00065 //- Piston patch 00066 polyPatchID patchID_; 00067 00068 //- Coordinate system 00069 autoPtr<coordinateSystem> csPtr_; 00070 00071 00072 // Piston layering data 00073 00074 //- Min layer thickness 00075 const scalar minLayer_; 00076 00077 //- Max layer thickness 00078 const scalar maxLayer_; 00079 00080 00081 // Private Member Functions 00082 00083 //- Disallow default bitwise copy construct 00084 enginePiston(const enginePiston&); 00085 00086 //- Disallow default bitwise assignment 00087 void operator=(const enginePiston&); 00088 00089 00090 public: 00091 00092 // Static data members 00093 00094 00095 // Constructors 00096 00097 //- Construct from components 00098 enginePiston 00099 ( 00100 const polyMesh& mesh, 00101 const word& pistonPatchName, 00102 const autoPtr<coordinateSystem>& pistonCS, 00103 const scalar minLayer, 00104 const scalar maxLayer 00105 00106 ); 00107 00108 //- Construct from dictionary 00109 enginePiston 00110 ( 00111 const polyMesh& mesh, 00112 const dictionary& dict 00113 ); 00114 00115 00116 // Destructor - default 00117 00118 00119 // Member Functions 00120 00121 //- Return coordinate system 00122 const coordinateSystem& cs() const 00123 { 00124 return csPtr_(); 00125 } 00126 00127 //- Return ID of piston patch 00128 const polyPatchID& patchID() const 00129 { 00130 return patchID_; 00131 } 00132 00133 // Piston layering thickness 00134 00135 scalar minLayer() const 00136 { 00137 return minLayer_; 00138 } 00139 00140 scalar maxLayer() const 00141 { 00142 return maxLayer_; 00143 } 00144 00145 00146 //- Write dictionary 00147 void writeDict(Ostream&) const; 00148 }; 00149 00150 00151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00152 00153 } // End namespace Foam 00154 00155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00156 00157 #endif 00158 00159 // ************************************************************************* // |