1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2006-2011 OpenCFD Ltd.
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::timeVaryingFlowRateInletVelocityFvPatchVectorField
28 A time-varying form of a flow normal vector boundary condition. The
29 variation is specified as an interpolationTable (see
30 Foam::interpolationTable).
32 Example of the boundary condition specification:
36 type timeVaryingFlowRateInletVelocity;
37 flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s]
38 value uniform (0 0 0); // placeholder
39 fileName "$FOAM_CASE/time-series";
40 outOfBounds repeat; // (error|warn|clamp|repeat)
45 - The value is positive inwards
46 - may not work correctly for transonic inlets!
47 - strange behaviour with potentialFoam since the U equation is not solved
50 Foam::interpolationTable and Foam::flowRateInletVelocityFvPatchVectorField
53 timeVaryingFlowRateInletVelocityFvPatchVectorField.C
55 \*---------------------------------------------------------------------------*/
57 #ifndef timeVaryingFlowRateInletVelocityFvPatchVectorField_H
58 #define timeVaryingFlowRateInletVelocityFvPatchVectorField_H
60 #include "flowRateInletVelocityFvPatchVectorField.H"
61 #include "interpolationTable.H"
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 /*---------------------------------------------------------------------------*\
68 Class timeVaryingFlowRateInletVelocityFvPatch Declaration
69 \*---------------------------------------------------------------------------*/
71 class timeVaryingFlowRateInletVelocityFvPatchVectorField
73 public flowRateInletVelocityFvPatchVectorField
77 //- the time series being used, including the bounding treatment
78 interpolationTable<scalar> timeSeries_;
83 //- Runtime type information
84 TypeName("timeVaryingFlowRateInletVelocity");
89 //- Construct from patch and internal field
90 timeVaryingFlowRateInletVelocityFvPatchVectorField
93 const DimensionedField<vector, volMesh>&
96 //- Construct from patch, internal field and dictionary
97 timeVaryingFlowRateInletVelocityFvPatchVectorField
100 const DimensionedField<vector, volMesh>&,
104 //- Construct by mapping given patch field onto a new patch
105 timeVaryingFlowRateInletVelocityFvPatchVectorField
107 const timeVaryingFlowRateInletVelocityFvPatchVectorField&,
109 const DimensionedField<vector, volMesh>&,
110 const fvPatchFieldMapper&
113 //- Construct as copy
114 timeVaryingFlowRateInletVelocityFvPatchVectorField
116 const timeVaryingFlowRateInletVelocityFvPatchVectorField&
119 //- Construct and return a clone
120 virtual tmp<fvPatchVectorField> clone() const
122 return tmp<fvPatchVectorField>
124 new timeVaryingFlowRateInletVelocityFvPatchVectorField(*this)
128 //- Construct as copy setting internal field reference
129 timeVaryingFlowRateInletVelocityFvPatchVectorField
131 const timeVaryingFlowRateInletVelocityFvPatchVectorField&,
132 const DimensionedField<vector, volMesh>&
135 //- Construct and return a clone setting internal field reference
136 virtual tmp<fvPatchVectorField> clone
138 const DimensionedField<vector, volMesh>& iF
141 return tmp<fvPatchVectorField>
143 new timeVaryingFlowRateInletVelocityFvPatchVectorField
156 //- Return the time series used
157 const interpolationTable<scalar>& timeSeries() const
163 // Evaluation functions
165 //- Update the coefficients associated with the patch field
166 virtual void updateCoeffs();
170 virtual void write(Ostream&) const;
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 } // End namespace Foam
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 // ************************************************************************* //