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-2020 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 Usage
35  Example of the boundary condition specification:
36  \verbatim
37  <patchName>
38  {
39  // Mandatory entries (unmodifiable)
40  type timeVaryingUniformFixedValue;
41  fileName "<case>/time-series";
42  outOfBounds clamp; // (error|warn|clamp|repeat)
43 
44  // Mandatory/Optional (inherited) entries
45  ...
46  }
47  \endverbatim
48 
49  where the entries mean:
50  \table
51  Property | Description | Type | Reqd | Dflt
52  type | Type name: timeVaryingUniformFixedValue | word | yes | -
53  fileName | Name of operand file | word | yes | -
54  \endtable
55 
56  The inherited entries are elaborated in:
57  - \link faPatchFields.H \endlink
58 
59 Author
60  Zeljko Tukovic, FMENA
61  Hrvoje Jasak, Wikki Ltd.
62 
63 Note
64  This class is derived directly from a fixedValue patch rather than from
65  a uniformFixedValue patch.
66 
67 See also
68  - Foam::interpolationTable
69  - Foam::fixedValueFaPatchField
70 
71 SourceFiles
72  timeVaryingUniformFixedValueFaPatchField.C
73 
74 \*---------------------------------------------------------------------------*/
75 
76 #ifndef timeVaryingUniformFixedValueFaPatchField_H
77 #define timeVaryingUniformFixedValueFaPatchField_H
78 
79 #include "fixedValueFaPatchField.H"
80 #include "interpolationTable.H"
81 
82 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83 
84 namespace Foam
85 {
86 
87 /*---------------------------------------------------------------------------*\
88  Class timeVaryingUniformFixedValueFaPatch Declaration
89 \*---------------------------------------------------------------------------*/
90 
91 template<class Type>
92 class timeVaryingUniformFixedValueFaPatchField
93 :
94  public fixedValueFaPatchField<Type>
95 {
96  // Private Data
97 
98  //- The time series being used, including the bounding treatment
99  interpolationTable<Type> timeSeries_;
100 
101 
102 public:
103 
104  //- Runtime type information
105  TypeName("timeVaryingUniformFixedValue");
106 
107 
108  // Constructors
109 
110  //- Construct from patch and internal field
112  (
113  const faPatch&,
115  );
116 
117  //- Construct from patch, internal field and dictionary
119  (
120  const faPatch&,
122  const dictionary&
123  );
124 
125  //- Construct by mapping given patch field onto a new patch
127  (
129  const faPatch&,
131  const faPatchFieldMapper&
132  );
133 
134  //- Construct as copy
136  (
138  );
139 
140  //- Construct and return a clone
141  virtual tmp<faPatchField<Type>> clone() const
142  {
143  return tmp<faPatchField<Type>>
144  (
146  );
147  }
148 
149  //- Construct as copy setting internal field reference
151  (
154  );
155 
156  //- Construct and return a clone setting internal field reference
158  (
160  ) const
161  {
162  return tmp<faPatchField<Type>>
163  (
165  );
166  }
167 
168 
169  //- Destructor
170  virtual ~timeVaryingUniformFixedValueFaPatchField() = default;
171 
172 
173  // Member Functions
174 
175  // Access
176 
177  //- Return the time series used
178  const interpolationTable<Type>& timeSeries() const
179  {
180  return timeSeries_;
181  }
182 
183 
184  // Evaluation
185 
186  //- Update the coefficients associated with the patch field
187  virtual void updateCoeffs();
188 
189 
190  // IO
191 
192  //- Write
193  virtual void write(Ostream&) const;
194 };
195 
196 
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 
199 } // End namespace Foam
200 
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 
203 #ifdef NoRepository
205 #endif
206 
207 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208 
209 #endif
210 
211 // ************************************************************************* //
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
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:123
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:195
Foam::timeVaryingUniformFixedValueFaPatchField
A time-varying form of a uniform fixed value finite area boundary condition.
Definition: timeVaryingUniformFixedValueFaPatchField.H:109
Foam::interpolationTable
An interpolation/look-up table of scalar vs <Type> values. The reference scalar values must be monoto...
Definition: interpolationTable.H:81
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:69
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:158