00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-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 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::timeVaryingUniformInletOutletFvPatchField 00026 00027 Description 00028 A time-varying form of a uniform fixed value boundary condition. 00029 00030 Example of the boundary condition specification: 00031 @verbatim 00032 inlet 00033 { 00034 type timeVaryingUniformInletOutlet; 00035 fileName "$FOAM_CASE/time-series"; 00036 outOfBounds clamp; // (error|warn|clamp|repeat) 00037 } 00038 @endverbatim 00039 00040 Note 00041 This class is derived directly from a inletOutlet patch rather than from 00042 a uniformInletOutlet patch. 00043 00044 See Also 00045 Foam::interpolationTable and Foam::inletOutletFvPatchField 00046 00047 SourceFiles 00048 timeVaryingUniformInletOutletFvPatchField.C 00049 00050 \*---------------------------------------------------------------------------*/ 00051 00052 #ifndef timeVaryingUniformInletOutletFvPatchField_H 00053 #define timeVaryingUniformInletOutletFvPatchField_H 00054 00055 #include <finiteVolume/inletOutletFvPatchField.H> 00056 #include <OpenFOAM/interpolationTable.H> 00057 00058 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00059 00060 namespace Foam 00061 { 00062 00063 /*---------------------------------------------------------------------------*\ 00064 Class timeVaryingUniformInletOutletFvPatch Declaration 00065 \*---------------------------------------------------------------------------*/ 00066 00067 template<class Type> 00068 class timeVaryingUniformInletOutletFvPatchField 00069 : 00070 public inletOutletFvPatchField<Type> 00071 { 00072 // Private data 00073 00074 //- The time series being used, including the bounding treatment 00075 interpolationTable<Type> timeSeries_; 00076 00077 00078 public: 00079 00080 //- Runtime type information 00081 TypeName("timeVaryingUniformInletOutlet"); 00082 00083 00084 // Constructors 00085 00086 //- Construct from patch and internal field 00087 timeVaryingUniformInletOutletFvPatchField 00088 ( 00089 const fvPatch&, 00090 const DimensionedField<Type, volMesh>& 00091 ); 00092 00093 //- Construct from patch, internal field and dictionary 00094 timeVaryingUniformInletOutletFvPatchField 00095 ( 00096 const fvPatch&, 00097 const DimensionedField<Type, volMesh>&, 00098 const dictionary& 00099 ); 00100 00101 //- Construct by mapping given patch field onto a new patch 00102 timeVaryingUniformInletOutletFvPatchField 00103 ( 00104 const timeVaryingUniformInletOutletFvPatchField<Type>&, 00105 const fvPatch&, 00106 const DimensionedField<Type, volMesh>&, 00107 const fvPatchFieldMapper& 00108 ); 00109 00110 //- Construct as copy 00111 timeVaryingUniformInletOutletFvPatchField 00112 ( 00113 const timeVaryingUniformInletOutletFvPatchField<Type>& 00114 ); 00115 00116 //- Construct and return a clone 00117 virtual tmp<fvPatchField<Type> > clone() const 00118 { 00119 return tmp<fvPatchField<Type> > 00120 ( 00121 new timeVaryingUniformInletOutletFvPatchField<Type>(*this) 00122 ); 00123 } 00124 00125 //- Construct as copy setting internal field reference 00126 timeVaryingUniformInletOutletFvPatchField 00127 ( 00128 const timeVaryingUniformInletOutletFvPatchField<Type>&, 00129 const DimensionedField<Type, volMesh>& 00130 ); 00131 00132 //- Construct and return a clone setting internal field reference 00133 virtual tmp<fvPatchField<Type> > clone 00134 ( 00135 const DimensionedField<Type, volMesh>& iF 00136 ) const 00137 { 00138 return tmp<fvPatchField<Type> > 00139 ( 00140 new timeVaryingUniformInletOutletFvPatchField<Type>(*this, iF) 00141 ); 00142 } 00143 00144 00145 // Member functions 00146 00147 // Access 00148 00149 //- Return the time series used 00150 const interpolationTable<Type>& timeSeries() const 00151 { 00152 return timeSeries_; 00153 } 00154 00155 00156 // Evaluation functions 00157 00158 //- Update the coefficients associated with the patch field 00159 virtual void updateCoeffs(); 00160 00161 00162 //- Write 00163 virtual void write(Ostream&) const; 00164 }; 00165 00166 00167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00168 00169 } // End namespace Foam 00170 00171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00172 00173 #ifdef NoRepository 00174 # include "timeVaryingUniformInletOutletFvPatchField.C" 00175 #endif 00176 00177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00178 00179 #endif 00180 00181 // ************************ vim: set sw=4 sts=4 et: ************************ //