|
|
|
timeVaryingFlowRateInletVelocityFvPatchVectorField.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) 2006-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::timeVaryingFlowRateInletVelocityFvPatchVectorField 00027 00028 Description 00029 A time-varying form of a flow normal vector boundary condition. 00030 00031 Example of the boundary condition specification: 00032 @verbatim 00033 inlet 00034 { 00035 type timeVaryingFlowRateInletVelocity; 00036 flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s] 00037 value uniform (0 0 0); // placeholder 00038 fileName "$FOAM_CASE/time-series"; 00039 outOfBounds repeat; // (error|warn|clamp|repeat) 00040 } 00041 @endverbatim 00042 00043 Note 00044 - The value is positive inwards 00045 - may not work correctly for transonic inlets! 00046 - strange behaviour with potentialFoam since the U equation is not solved 00047 00048 See Also 00049 Foam::interpolationTable and Foam::flowRateInletVelocityFvPatchVectorField 00050 00051 SourceFiles 00052 timeVaryingFlowRateInletVelocityFvPatchVectorField.C 00053 00054 \*---------------------------------------------------------------------------*/ 00055 00056 #ifndef timeVaryingFlowRateInletVelocityFvPatchVectorField_H 00057 #define timeVaryingFlowRateInletVelocityFvPatchVectorField_H 00058 00059 #include "flowRateInletVelocityFvPatchVectorField.H" 00060 #include "interpolationTable.H" 00061 00062 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00063 00064 namespace Foam 00065 { 00066 /*---------------------------------------------------------------------------*\ 00067 Class timeVaryingFlowRateInletVelocityFvPatch Declaration 00068 \*---------------------------------------------------------------------------*/ 00069 00070 class timeVaryingFlowRateInletVelocityFvPatchVectorField 00071 : 00072 public flowRateInletVelocityFvPatchVectorField 00073 { 00074 // Private data 00075 00076 //- the time series being used, including the bounding treatment 00077 interpolationTable<scalar> timeSeries_; 00078 00079 00080 public: 00081 00082 //- Runtime type information 00083 TypeName("timeVaryingFlowRateInletVelocity"); 00084 00085 00086 // Constructors 00087 00088 //- Construct from patch and internal field 00089 timeVaryingFlowRateInletVelocityFvPatchVectorField 00090 ( 00091 const fvPatch&, 00092 const DimensionedField<vector, volMesh>& 00093 ); 00094 00095 //- Construct from patch, internal field and dictionary 00096 timeVaryingFlowRateInletVelocityFvPatchVectorField 00097 ( 00098 const fvPatch&, 00099 const DimensionedField<vector, volMesh>&, 00100 const dictionary& 00101 ); 00102 00103 //- Construct by mapping given patch field onto a new patch 00104 timeVaryingFlowRateInletVelocityFvPatchVectorField 00105 ( 00106 const timeVaryingFlowRateInletVelocityFvPatchVectorField&, 00107 const fvPatch&, 00108 const DimensionedField<vector, volMesh>&, 00109 const fvPatchFieldMapper& 00110 ); 00111 00112 //- Construct as copy 00113 timeVaryingFlowRateInletVelocityFvPatchVectorField 00114 ( 00115 const timeVaryingFlowRateInletVelocityFvPatchVectorField& 00116 ); 00117 00118 //- Construct and return a clone 00119 virtual tmp<fvPatchVectorField> clone() const 00120 { 00121 return tmp<fvPatchVectorField> 00122 ( 00123 new timeVaryingFlowRateInletVelocityFvPatchVectorField(*this) 00124 ); 00125 } 00126 00127 //- Construct as copy setting internal field reference 00128 timeVaryingFlowRateInletVelocityFvPatchVectorField 00129 ( 00130 const timeVaryingFlowRateInletVelocityFvPatchVectorField&, 00131 const DimensionedField<vector, volMesh>& 00132 ); 00133 00134 //- Construct and return a clone setting internal field reference 00135 virtual tmp<fvPatchVectorField> clone 00136 ( 00137 const DimensionedField<vector, volMesh>& iF 00138 ) const 00139 { 00140 return tmp<fvPatchVectorField> 00141 ( 00142 new timeVaryingFlowRateInletVelocityFvPatchVectorField 00143 ( 00144 *this, 00145 iF 00146 ) 00147 ); 00148 } 00149 00150 00151 // Member functions 00152 00153 // Access 00154 00155 //- Return the time series used 00156 const interpolationTable<scalar>& timeSeries() const 00157 { 00158 return timeSeries_; 00159 } 00160 00161 00162 // Evaluation functions 00163 00164 //- Update the coefficients associated with the patch field 00165 virtual void updateCoeffs(); 00166 00167 00168 //- Write 00169 virtual void write(Ostream&) const; 00170 }; 00171 00172 00173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00174 00175 } // End namespace Foam 00176 00177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00178 00179 #endif 00180 00181 // ************************************************************************* // |