1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
25 Foam::timeVaryingUniformFixedValueFvPatchField
28 A time-varying form of a uniform fixed value boundary condition. The
29 variation is specified as an interpolationTable (see
30 Foam::interpolationTable for read options).
32 Example of the boundary condition specification:
36 type timeVaryingUniformFixedValue;
37 fileName "$FOAM_CASE/time-series";
38 outOfBounds clamp; // (error|warn|clamp|repeat)
43 This class is derived directly from a fixedValue patch rather than from
44 a uniformFixedValue patch.
47 Foam::interpolationTable and Foam::fixedValueFvPatchField
50 timeVaryingUniformFixedValueFvPatchField.C
52 \*---------------------------------------------------------------------------*/
54 #ifndef timeVaryingUniformFixedValueFvPatchField_H
55 #define timeVaryingUniformFixedValueFvPatchField_H
57 #include "fixedValueFvPatchField.H"
58 #include "interpolationTable.H"
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 /*---------------------------------------------------------------------------*\
66 Class timeVaryingUniformFixedValueFvPatch Declaration
67 \*---------------------------------------------------------------------------*/
70 class timeVaryingUniformFixedValueFvPatchField
72 public fixedValueFvPatchField<Type>
76 //- The time series being used, including the bounding treatment
77 interpolationTable<Type> timeSeries_;
82 //- Runtime type information
83 TypeName("timeVaryingUniformFixedValue");
88 //- Construct from patch and internal field
89 timeVaryingUniformFixedValueFvPatchField
92 const DimensionedField<Type, volMesh>&
95 //- Construct from patch, internal field and dictionary
96 timeVaryingUniformFixedValueFvPatchField
99 const DimensionedField<Type, volMesh>&,
103 //- Construct by mapping given patch field onto a new patch
104 timeVaryingUniformFixedValueFvPatchField
106 const timeVaryingUniformFixedValueFvPatchField<Type>&,
108 const DimensionedField<Type, volMesh>&,
109 const fvPatchFieldMapper&
112 //- Construct as copy
113 timeVaryingUniformFixedValueFvPatchField
115 const timeVaryingUniformFixedValueFvPatchField<Type>&
118 //- Construct and return a clone
119 virtual tmp<fvPatchField<Type> > clone() const
121 return tmp<fvPatchField<Type> >
123 new timeVaryingUniformFixedValueFvPatchField<Type>(*this)
127 //- Construct as copy setting internal field reference
128 timeVaryingUniformFixedValueFvPatchField
130 const timeVaryingUniformFixedValueFvPatchField<Type>&,
131 const DimensionedField<Type, volMesh>&
134 //- Construct and return a clone setting internal field reference
135 virtual tmp<fvPatchField<Type> > clone
137 const DimensionedField<Type, volMesh>& iF
140 return tmp<fvPatchField<Type> >
142 new timeVaryingUniformFixedValueFvPatchField<Type>(*this, iF)
151 //- Return the time series used
152 const interpolationTable<Type>& timeSeries() const
158 // Evaluation functions
160 //- Update the coefficients associated with the patch field
161 virtual void updateCoeffs();
165 virtual void write(Ostream&) const;
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 } // End namespace Foam
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 # include "timeVaryingUniformFixedValueFvPatchField.C"
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 // ************************************************************************* //