|
|
|
fanFvPatchField.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::fanFvPatchField 00027 00028 Description 00029 Foam::fanFvPatchField 00030 00031 SourceFiles 00032 fanFvPatchField.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef fanFvPatchField_H 00037 #define fanFvPatchField_H 00038 00039 #include "jumpCyclicFvPatchField.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 /*---------------------------------------------------------------------------*\ 00047 Class jumpCyclicFvPatch Declaration 00048 \*---------------------------------------------------------------------------*/ 00049 00050 template<class Type> 00051 class fanFvPatchField 00052 : 00053 public jumpCyclicFvPatchField<Type> 00054 { 00055 // Private data 00056 00057 //- Fan pressure rise polynomial coefficients 00058 List<scalar> f_; 00059 00060 //- "jump" field 00061 Field<Type> jump_; 00062 00063 00064 public: 00065 00066 //- Runtime type information 00067 TypeName("fan"); 00068 00069 00070 // Constructors 00071 00072 //- Construct from patch and internal field 00073 fanFvPatchField 00074 ( 00075 const fvPatch&, 00076 const DimensionedField<Type, volMesh>& 00077 ); 00078 00079 //- Construct from patch, internal field and dictionary 00080 fanFvPatchField 00081 ( 00082 const fvPatch&, 00083 const DimensionedField<Type, volMesh>&, 00084 const dictionary& 00085 ); 00086 00087 //- Construct by mapping given fanFvPatchField onto a new patch 00088 fanFvPatchField 00089 ( 00090 const fanFvPatchField<Type>&, 00091 const fvPatch&, 00092 const DimensionedField<Type, volMesh>&, 00093 const fvPatchFieldMapper& 00094 ); 00095 00096 //- Construct as copy 00097 fanFvPatchField 00098 ( 00099 const fanFvPatchField<Type>& 00100 ); 00101 00102 //- Construct and return a clone 00103 virtual tmp<fvPatchField<Type> > clone() const 00104 { 00105 return tmp<fvPatchField<Type> > 00106 ( 00107 new fanFvPatchField<Type>(*this) 00108 ); 00109 } 00110 00111 //- Construct as copy setting internal field reference 00112 fanFvPatchField 00113 ( 00114 const fanFvPatchField<Type>&, 00115 const DimensionedField<Type, volMesh>& 00116 ); 00117 00118 //- Construct and return a clone setting internal field reference 00119 virtual tmp<fvPatchField<Type> > clone 00120 ( 00121 const DimensionedField<Type, volMesh>& iF 00122 ) const 00123 { 00124 return tmp<fvPatchField<Type> > 00125 ( 00126 new fanFvPatchField<Type>(*this, iF) 00127 ); 00128 } 00129 00130 00131 // Member functions 00132 00133 // Access 00134 00135 //- Return the "jump" across the patch as a "half" field 00136 virtual tmp<Field<Type> > jump() const 00137 { 00138 return jump_; 00139 } 00140 00141 00142 // Mapping functions 00143 00144 //- Map (and resize as needed) from self given a mapping object 00145 virtual void autoMap 00146 ( 00147 const fvPatchFieldMapper& 00148 ); 00149 00150 //- Reverse map the given fvPatchField onto this fvPatchField 00151 virtual void rmap 00152 ( 00153 const fvPatchField<Type>&, 00154 const labelList& 00155 ); 00156 00157 // Evaluation functions 00158 00159 //- Update the coefficients associated with the patch field 00160 virtual void updateCoeffs(); 00161 00162 00163 //- Write 00164 virtual void write(Ostream&) const; 00165 }; 00166 00167 00168 //- Specialisation of the jump-condition for the pressure 00169 template<> 00170 void fanFvPatchField<scalar>::updateCoeffs(); 00171 00172 00173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00174 00175 } // End namespace Foam 00176 00177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00178 00179 #ifdef NoRepository 00180 # include "fanFvPatchField.C" 00181 #endif 00182 00183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00184 00185 #endif 00186 00187 // ************************************************************************* // |