FreeFOAM The Cross-Platform CFD Toolkit
timeVaryingFlowRateInletVelocityFvPatchVectorField.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) 2006-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::timeVaryingFlowRateInletVelocityFvPatchVectorField
26 
27 Description
28  A time-varying form of a flow normal vector boundary condition.
29 
30  Example of the boundary condition specification:
31  @verbatim
32  inlet
33  {
34  type timeVaryingFlowRateInletVelocity;
35  flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s]
36  value uniform (0 0 0); // placeholder
37  fileName "$FOAM_CASE/time-series";
38  outOfBounds repeat; // (error|warn|clamp|repeat)
39  }
40  @endverbatim
41 
42 Note
43  - The value is positive inwards
44  - may not work correctly for transonic inlets!
45  - strange behaviour with potentialFoam since the U equation is not solved
46 
47 See Also
48  Foam::interpolationTable and Foam::flowRateInletVelocityFvPatchVectorField
49 
50 SourceFiles
51  timeVaryingFlowRateInletVelocityFvPatchVectorField.C
52 
53 \*---------------------------------------------------------------------------*/
54 
55 #ifndef timeVaryingFlowRateInletVelocityFvPatchVectorField_H
56 #define timeVaryingFlowRateInletVelocityFvPatchVectorField_H
57 
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 /*---------------------------------------------------------------------------*\
66  Class timeVaryingFlowRateInletVelocityFvPatch Declaration
67 \*---------------------------------------------------------------------------*/
68 
70 :
72 {
73  // Private data
74 
75  //- the time series being used, including the bounding treatment
76  interpolationTable<scalar> timeSeries_;
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("timeVaryingFlowRateInletVelocity");
83 
84 
85  // Constructors
86 
87  //- Construct from patch and internal field
89  (
90  const fvPatch&,
92  );
93 
94  //- Construct from patch, internal field and dictionary
96  (
97  const fvPatch&,
99  const dictionary&
100  );
101 
102  //- Construct by mapping given patch field onto a new patch
104  (
106  const fvPatch&,
108  const fvPatchFieldMapper&
109  );
110 
111  //- Construct as copy
113  (
115  );
116 
117  //- Construct and return a clone
119  {
121  (
123  );
124  }
125 
126  //- Construct as copy setting internal field reference
128  (
131  );
132 
133  //- Construct and return a clone setting internal field reference
135  (
137  ) const
138  {
140  (
142  (
143  *this,
144  iF
145  )
146  );
147  }
148 
149 
150  // Member functions
151 
152  // Access
153 
154  //- Return the time series used
156  {
157  return timeSeries_;
158  }
159 
160 
161  // Evaluation functions
162 
163  //- Update the coefficients associated with the patch field
164  virtual void updateCoeffs();
165 
166 
167  //- Write
168  virtual void write(Ostream&) const;
169 };
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace Foam
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 #endif
179 
180 // ************************ vim: set sw=4 sts=4 et: ************************ //