00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 2010-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 the 00013 Free Software Foundation; either version 3 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::cylindricalInletVelocityFvPatchVectorField 00027 00028 Description 00029 Describes an inlet vector boundary condition in cylindrical coordinates 00030 given a central axis, central point, rpm, axial and radial velocity. 00031 00032 Example of the boundary condition specification: 00033 @verbatim 00034 inlet 00035 { 00036 type cylindricalInletVelocity; 00037 axis (0 0 1); 00038 centre (0 0 0); 00039 axialVelocity 30; 00040 rpm 100; 00041 radialVelocity -10; 00042 } 00043 @endverbatim 00044 00045 00046 SourceFiles 00047 cylindricalInletVelocityFvPatchVectorField.C 00048 00049 \*---------------------------------------------------------------------------*/ 00050 00051 #ifndef cylindricalInletVelocityFvPatchVectorField_H 00052 #define cylindricalInletVelocityFvPatchVectorField_H 00053 00054 #include <finiteVolume/fixedValueFvPatchFields.H> 00055 00056 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00057 00058 namespace Foam 00059 { 00060 /*---------------------------------------------------------------------------*\ 00061 Class cylindricalInletVelocityFvPatchVectorField Declaration 00062 \*---------------------------------------------------------------------------*/ 00063 00064 class cylindricalInletVelocityFvPatchVectorField 00065 : 00066 public fixedValueFvPatchVectorField 00067 { 00068 // Private data 00069 00070 //- Axial velocity 00071 const scalar axialVelocity_; 00072 00073 //- Central point 00074 const vector centre_; 00075 00076 //- Axis 00077 const vector axis_; 00078 00079 //- RPM 00080 const scalar rpm_; 00081 00082 //- Radial velocity 00083 const scalar radialVelocity_; 00084 00085 00086 public: 00087 00088 //- Runtime type information 00089 TypeName("cylindricalInletVelocity"); 00090 00091 00092 // Constructors 00093 00094 //- Construct from patch and internal field 00095 cylindricalInletVelocityFvPatchVectorField 00096 ( 00097 const fvPatch&, 00098 const DimensionedField<vector, volMesh>& 00099 ); 00100 00101 //- Construct from patch, internal field and dictionary 00102 cylindricalInletVelocityFvPatchVectorField 00103 ( 00104 const fvPatch&, 00105 const DimensionedField<vector, volMesh>&, 00106 const dictionary& 00107 ); 00108 00109 //- Construct by mapping given 00110 // flowRateInletVelocityFvPatchVectorField 00111 // onto a new patch 00112 cylindricalInletVelocityFvPatchVectorField 00113 ( 00114 const cylindricalInletVelocityFvPatchVectorField&, 00115 const fvPatch&, 00116 const DimensionedField<vector, volMesh>&, 00117 const fvPatchFieldMapper& 00118 ); 00119 00120 //- Construct as copy 00121 cylindricalInletVelocityFvPatchVectorField 00122 ( 00123 const cylindricalInletVelocityFvPatchVectorField& 00124 ); 00125 00126 //- Construct and return a clone 00127 virtual tmp<fvPatchVectorField> clone() const 00128 { 00129 return tmp<fvPatchVectorField> 00130 ( 00131 new cylindricalInletVelocityFvPatchVectorField(*this) 00132 ); 00133 } 00134 00135 //- Construct as copy setting internal field reference 00136 cylindricalInletVelocityFvPatchVectorField 00137 ( 00138 const cylindricalInletVelocityFvPatchVectorField&, 00139 const DimensionedField<vector, volMesh>& 00140 ); 00141 00142 //- Construct and return a clone setting internal field reference 00143 virtual tmp<fvPatchVectorField> clone 00144 ( 00145 const DimensionedField<vector, volMesh>& iF 00146 ) const 00147 { 00148 return tmp<fvPatchVectorField> 00149 ( 00150 new cylindricalInletVelocityFvPatchVectorField(*this, iF) 00151 ); 00152 } 00153 00154 00155 // Member functions 00156 00157 00158 //- Update the coefficients associated with the patch field 00159 virtual void updateCoeffs(); 00160 00161 //- Write 00162 virtual void write(Ostream&) const; 00163 }; 00164 00165 00166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00167 00168 } // End namespace Foam 00169 00170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00171 00172 #endif 00173 00174 // ************************************************************************* //