00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2011 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::SRFFreestreamVelocityFvPatchVectorField 00026 00027 Description 00028 Freestream velocity patch to be used with SRF model 00029 to apply the appropriate rotation transformation in time and space. 00030 00031 SourceFiles 00032 SRFFreestreamVelocityFvPatchVectorField.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef SRFFreestreamVelocityFvPatchVectorField_H 00037 #define SRFFreestreamVelocityFvPatchVectorField_H 00038 00039 #include <finiteVolume/inletOutletFvPatchFields.H> 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 /*---------------------------------------------------------------------------*\ 00047 Class SRFFreestreamVelocityFvPatchVectorField Declaration 00048 \*---------------------------------------------------------------------------*/ 00049 00050 class SRFFreestreamVelocityFvPatchVectorField 00051 : 00052 public inletOutletFvPatchVectorField 00053 { 00054 // Private data 00055 00056 //- Velocity of the free stream in the absolute frame 00057 vector UInf_; 00058 00059 00060 public: 00061 00062 //- Runtime type information 00063 TypeName("SRFFreestreamVelocity"); 00064 00065 00066 // Constructors 00067 00068 //- Construct from patch and internal field 00069 SRFFreestreamVelocityFvPatchVectorField 00070 ( 00071 const fvPatch&, 00072 const DimensionedField<vector, volMesh>& 00073 ); 00074 00075 //- Construct from patch, internal field and dictionary 00076 SRFFreestreamVelocityFvPatchVectorField 00077 ( 00078 const fvPatch&, 00079 const DimensionedField<vector, volMesh>&, 00080 const dictionary& 00081 ); 00082 00083 //- Construct by mapping given SRFFreestreamVelocityFvPatchVectorField 00084 // onto a new patch 00085 SRFFreestreamVelocityFvPatchVectorField 00086 ( 00087 const SRFFreestreamVelocityFvPatchVectorField&, 00088 const fvPatch&, 00089 const DimensionedField<vector, volMesh>&, 00090 const fvPatchFieldMapper& 00091 ); 00092 00093 //- Construct as copy 00094 SRFFreestreamVelocityFvPatchVectorField 00095 ( 00096 const SRFFreestreamVelocityFvPatchVectorField& 00097 ); 00098 00099 //- Construct and return a clone 00100 virtual tmp<fvPatchVectorField> clone() const 00101 { 00102 return tmp<fvPatchVectorField> 00103 ( 00104 new SRFFreestreamVelocityFvPatchVectorField(*this) 00105 ); 00106 } 00107 00108 //- Construct as copy setting internal field reference 00109 SRFFreestreamVelocityFvPatchVectorField 00110 ( 00111 const SRFFreestreamVelocityFvPatchVectorField&, 00112 const DimensionedField<vector, volMesh>& 00113 ); 00114 00115 //- Construct and return a clone setting internal field reference 00116 virtual tmp<fvPatchVectorField> clone 00117 ( 00118 const DimensionedField<vector, volMesh>& iF 00119 ) const 00120 { 00121 return tmp<fvPatchVectorField> 00122 ( 00123 new SRFFreestreamVelocityFvPatchVectorField(*this, iF) 00124 ); 00125 } 00126 00127 00128 // Member functions 00129 00130 // Access 00131 00132 //- Return the velocity at infinity 00133 const vector& UInf() const 00134 { 00135 return UInf_; 00136 } 00137 00138 //- Return reference to the velocity at infinity to allow adjustment 00139 vector& UInf() 00140 { 00141 return UInf_; 00142 } 00143 00144 00145 // Evaluation functions 00146 00147 //- Update the coefficients associated with the patch field 00148 virtual void updateCoeffs(); 00149 00150 00151 //- Write 00152 virtual void write(Ostream&) const; 00153 }; 00154 00155 00156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00157 00158 } // End namespace Foam 00159 00160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00161 00162 #endif 00163 00164 // ************************ vim: set sw=4 sts=4 et: ************************ //