FreeFOAM The Cross-Platform CFD Toolkit
timeVaryingUniformFixedValueFvPatchField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  Foam::timeVaryingUniformFixedValueFvPatchField
26 
27 Description
28  A time-varying form of a uniform fixed value boundary condition.
29 
30  Example of the boundary condition specification:
31  @verbatim
32  inlet
33  {
34  type timeVaryingUniformFixedValue;
35  fileName "$FOAM_CASE/time-series";
36  outOfBounds clamp; // (error|warn|clamp|repeat)
37  }
38  @endverbatim
39 
40 Note
41  This class is derived directly from a fixedValue patch rather than from
42  a uniformFixedValue patch.
43 
44 See Also
45  Foam::interpolationTable and Foam::fixedValueFvPatchField
46 
47 SourceFiles
48  timeVaryingUniformFixedValueFvPatchField.C
49 
50 \*---------------------------------------------------------------------------*/
51 
52 #ifndef timeVaryingUniformFixedValueFvPatchField_H
53 #define timeVaryingUniformFixedValueFvPatchField_H
54 
57 
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 
60 namespace Foam
61 {
62 
63 /*---------------------------------------------------------------------------*\
64  Class timeVaryingUniformFixedValueFvPatch Declaration
65 \*---------------------------------------------------------------------------*/
66 
67 template<class Type>
69 :
70  public fixedValueFvPatchField<Type>
71 {
72  // Private data
73 
74  //- The time series being used, including the bounding treatment
75  interpolationTable<Type> timeSeries_;
76 
77 
78 public:
79 
80  //- Runtime type information
81  TypeName("timeVaryingUniformFixedValue");
82 
83 
84  // Constructors
85 
86  //- Construct from patch and internal field
88  (
89  const fvPatch&,
91  );
92 
93  //- Construct from patch, internal field and dictionary
95  (
96  const fvPatch&,
98  const dictionary&
99  );
100 
101  //- Construct by mapping given patch field onto a new patch
103  (
105  const fvPatch&,
107  const fvPatchFieldMapper&
108  );
109 
110  //- Construct as copy
112  (
114  );
115 
116  //- Construct and return a clone
117  virtual tmp<fvPatchField<Type> > clone() const
118  {
119  return tmp<fvPatchField<Type> >
120  (
122  );
123  }
124 
125  //- Construct as copy setting internal field reference
127  (
130  );
131 
132  //- Construct and return a clone setting internal field reference
133  virtual tmp<fvPatchField<Type> > clone
134  (
136  ) const
137  {
138  return tmp<fvPatchField<Type> >
139  (
141  );
142  }
143 
144 
145  // Member functions
146 
147  // Access
148 
149  //- Return the time series used
151  {
152  return timeSeries_;
153  }
154 
155 
156  // Evaluation functions
157 
158  //- Update the coefficients associated with the patch field
159  virtual void updateCoeffs();
160 
161 
162  //- Write
163  virtual void write(Ostream&) const;
164 };
165 
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 } // End namespace Foam
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 #ifdef NoRepository
175 #endif
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 #endif
180 
181 // ************************ vim: set sw=4 sts=4 et: ************************ //