1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::timeVaryingUniformInletOutletFvPatchField
29 A time-varying form of a uniform fixed value boundary condition.
31 Example of the boundary condition specification:
35 type timeVaryingUniformInletOutlet;
36 fileName "$FOAM_CASE/time-series";
37 outOfBounds clamp; // (error|warn|clamp|repeat)
42 This class is derived directly from a inletOutlet patch rather than from
43 a uniformInletOutlet patch.
46 Foam::interpolationTable and Foam::inletOutletFvPatchField
49 timeVaryingUniformInletOutletFvPatchField.C
51 \*---------------------------------------------------------------------------*/
53 #ifndef timeVaryingUniformInletOutletFvPatchField_H
54 #define timeVaryingUniformInletOutletFvPatchField_H
56 #include "inletOutletFvPatchField.H"
57 #include "interpolationTable.H"
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 /*---------------------------------------------------------------------------*\
65 Class timeVaryingUniformInletOutletFvPatch Declaration
66 \*---------------------------------------------------------------------------*/
69 class timeVaryingUniformInletOutletFvPatchField
71 public inletOutletFvPatchField<Type>
75 //- The time series being used, including the bounding treatment
76 interpolationTable<Type> timeSeries_;
81 //- Runtime type information
82 TypeName("timeVaryingUniformInletOutlet");
87 //- Construct from patch and internal field
88 timeVaryingUniformInletOutletFvPatchField
91 const DimensionedField<Type, volMesh>&
94 //- Construct from patch, internal field and dictionary
95 timeVaryingUniformInletOutletFvPatchField
98 const DimensionedField<Type, volMesh>&,
102 //- Construct by mapping given patch field onto a new patch
103 timeVaryingUniformInletOutletFvPatchField
105 const timeVaryingUniformInletOutletFvPatchField<Type>&,
107 const DimensionedField<Type, volMesh>&,
108 const fvPatchFieldMapper&
111 //- Construct as copy
112 timeVaryingUniformInletOutletFvPatchField
114 const timeVaryingUniformInletOutletFvPatchField<Type>&
117 //- Construct and return a clone
118 virtual tmp<fvPatchField<Type> > clone() const
120 return tmp<fvPatchField<Type> >
122 new timeVaryingUniformInletOutletFvPatchField<Type>(*this)
126 //- Construct as copy setting internal field reference
127 timeVaryingUniformInletOutletFvPatchField
129 const timeVaryingUniformInletOutletFvPatchField<Type>&,
130 const DimensionedField<Type, volMesh>&
133 //- Construct and return a clone setting internal field reference
134 virtual tmp<fvPatchField<Type> > clone
136 const DimensionedField<Type, volMesh>& iF
139 return tmp<fvPatchField<Type> >
141 new timeVaryingUniformInletOutletFvPatchField<Type>(*this, iF)
150 //- Return the time series used
151 const interpolationTable<Type>& timeSeries() const
157 // Evaluation functions
159 //- Update the coefficients associated with the patch field
160 virtual void updateCoeffs();
164 virtual void write(Ostream&) const;
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 } // End namespace Foam
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 # include "timeVaryingUniformInletOutletFvPatchField.C"
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 // ************************************************************************* //