timeVaryingUniformFixedValueFaPatchField.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2016-2017 Wikki Ltd
9  Copyright (C) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::timeVaryingUniformFixedValueFaPatchField
29 
30 Description
31  A time-varying form of a uniform fixed value finite area
32  boundary condition.
33 
34  Example of the boundary condition specification:
35  \verbatim
36  inlet
37  {
38  type timeVaryingUniformFixedValue;
39  fileName "<case>/time-series";
40  outOfBounds clamp; // (error|warn|clamp|repeat)
41  }
42  \endverbatim
43 
44 Author
45  Zeljko Tukovic, FMENA
46  Hrvoje Jasak, Wikki Ltd.
47 
48 Note
49  This class is derived directly from a fixedValue patch rather than from
50  a uniformFixedValue patch.
51 
52 See Also
53  Foam::interpolationTable and Foam::fixedValueFaPatchField
54 
55 SourceFiles
56  timeVaryingUniformFixedValueFaPatchField.C
57 
58 \*---------------------------------------------------------------------------*/
59 
60 #ifndef timeVaryingUniformFixedValueFaPatchField_H
61 #define timeVaryingUniformFixedValueFaPatchField_H
62 
63 #include "fixedValueFaPatchField.H"
64 #include "interpolationTable.H"
65 
66 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 
68 namespace Foam
69 {
70 
71 /*---------------------------------------------------------------------------*\
72  Class timeVaryingUniformFixedValueFaPatch Declaration
73 \*---------------------------------------------------------------------------*/
74 
75 template<class Type>
77 :
78  public fixedValueFaPatchField<Type>
79 {
80  // Private data
81 
82  //- The time series being used, including the bounding treatment
83  interpolationTable<Type> timeSeries_;
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("timeVaryingUniformFixedValue");
90 
91 
92  // Constructors
93 
94  //- Construct from patch and internal field
96  (
97  const faPatch&,
99  );
100 
101  //- Construct from patch, internal field and dictionary
103  (
104  const faPatch&,
106  const dictionary&
107  );
108 
109  //- Construct by mapping given patch field onto a new patch
111  (
113  const faPatch&,
115  const faPatchFieldMapper&
116  );
117 
118  //- Construct as copy
120  (
122  );
123 
124  //- Construct and return a clone
125  virtual tmp<faPatchField<Type>> clone() const
126  {
127  return tmp<faPatchField<Type>>
128  (
130  );
131  }
132 
133  //- Construct as copy setting internal field reference
135  (
138  );
139 
140  //- Construct and return a clone setting internal field reference
142  (
144  ) const
145  {
146  return tmp<faPatchField<Type>>
147  (
149  );
150  }
151 
152 
153  //- Destructor
154  virtual ~timeVaryingUniformFixedValueFaPatchField() = default;
155 
156 
157  // Member functions
158 
159  // Access
160 
161  //- Return the time series used
162  const interpolationTable<Type>& timeSeries() const
163  {
164  return timeSeries_;
165  }
166 
167 
168  // Evaluation functions
169 
170  //- Update the coefficients associated with the patch field
171  virtual void updateCoeffs();
172 
173 
174  //- Write
175  virtual void write(Ostream&) const;
176 };
177 
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 } // End namespace Foam
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 #ifdef NoRepository
187 #endif
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 #endif
192 
193 // ************************************************************************* //
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
interpolationTable.H
Foam::faPatchFieldMapper
Definition: faPatchFieldMapper.H:44
Foam::fixedValueFaPatchField
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
Definition: fixedValueFaPatchField.H:54
Foam::timeVaryingUniformFixedValueFaPatchField::timeVaryingUniformFixedValueFaPatchField
timeVaryingUniformFixedValueFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
Definition: timeVaryingUniformFixedValueFaPatchField.C:36
timeVaryingUniformFixedValueFaPatchField.C
Foam::timeVaryingUniformFixedValueFaPatchField::~timeVaryingUniformFixedValueFaPatchField
virtual ~timeVaryingUniformFixedValueFaPatchField()=default
Destructor.
Foam::timeVaryingUniformFixedValueFaPatchField::write
virtual void write(Ostream &) const
Write.
Definition: timeVaryingUniformFixedValueFaPatchField.C:129
Foam::timeVaryingUniformFixedValueFaPatchField::TypeName
TypeName("timeVaryingUniformFixedValue")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::timeVaryingUniformFixedValueFaPatchField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: timeVaryingUniformFixedValueFaPatchField.C:112
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::timeVaryingUniformFixedValueFaPatchField::timeSeries
const interpolationTable< Type > & timeSeries() const
Return the time series used.
Definition: timeVaryingUniformFixedValueFaPatchField.H:161
Foam::timeVaryingUniformFixedValueFaPatchField
A time-varying form of a uniform fixed value finite area boundary condition.
Definition: timeVaryingUniformFixedValueFaPatchField.H:75
Foam::interpolationTable
An interpolation/look-up table of scalar vs <Type> values. The reference scalar values must be monoto...
Definition: interpolationTable.H:82
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::faPatch
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:65
fixedValueFaPatchField.H
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
Foam::timeVaryingUniformFixedValueFaPatchField::clone
virtual tmp< faPatchField< Type > > clone() const
Construct and return a clone.
Definition: timeVaryingUniformFixedValueFaPatchField.H:124