functionalFixedValueFvPatchField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2026 OpenFOAM Foundation
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::functionalFixedValueFvPatchField
26 
27 Description
28  Functional fixed value boundary condition using a run-time selected function
29  to set the value field as a function of space and/or time.
30 
31 Usage
32  \table
33  Property | Description | Required | Default value
34  value | Value function | yes |
35  \endtable
36 
37  Example of the boundary condition specification using the \c zonal function:
38  \verbatim
39  <patchName>
40  {
41  type functionalFixedValue;
42 
43  value
44  {
45  type zonal;
46 
47  defaultValue 300;
48 
49  zones
50  {
51  hotFaces
52  {
53  type box;
54 
55  zone
56  {
57  type patch;
58  patch floor;
59  }
60 
61  box (4.5 -1000 4.5) (5.5 1e-5 5.5);
62 
63  value 600;
64  }
65  }
66  }
67  }
68  \endverbatim
69 
70 See also
71  Foam::fixedValueFvPatchField
72 
73 SourceFiles
74  functionalFixedValueFvPatchField.C
75 
76 \*---------------------------------------------------------------------------*/
77 
78 #ifndef functionalFixedValueFvPatchField_H
79 #define functionalFixedValueFvPatchField_H
80 
83 
84 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85 
86 namespace Foam
87 {
88 
89 /*---------------------------------------------------------------------------*\
90  Class functionalFixedValueFvPatchField Declaration
91 \*---------------------------------------------------------------------------*/
92 
93 template<class Type>
94 class functionalFixedValueFvPatchField
95 :
96  public fixedValueFvPatchField<Type>
97 {
98  // Private Data
99 
100  //- DimensionedField and function
101  UFunctionalDimensionedField<Type, fvPatch> dimensionedValue_;
102 
103 
104 public:
105 
106  //- Runtime type information
107  TypeName("functionalFixedValue");
108 
109 
110  // Constructors
111 
112  //- Construct from patch, internal field and dictionary
114  (
115  const fvPatch&,
117  const dictionary&
118  );
119 
120  //- Construct by mapping given functionalFixedValueFvPatchField
121  // onto a new patch
123  (
125  const fvPatch&,
127  const fieldMapper&
128  );
129 
130  //- Disallow copy without setting internal field reference
132  (
134  ) = delete;
135 
136  //- Copy constructor setting internal field reference
138  (
141  );
142 
143  //- Construct and return a clone setting internal field reference
145  (
147  ) const
148  {
149  return tmp<fvPatchField<Type>>
150  (
152  );
153  }
154 
155 
156  // Member Functions
157 
158  // Mapping functions
159 
160  //- Map the given fvPatchField onto this fvPatchField
161  virtual void map(const fvPatchField<Type>&, const fieldMapper&);
162 
163  //- Reset the fvPatchField to the given fvPatchField
164  // Used for mesh to mesh mapping
165  virtual void reset(const fvPatchField<Type>&);
166 
167 
168  //- Update the coefficients associated with the patch field
169  virtual void updateCoeffs();
170 
171  //- Write
172  virtual void write(Ostream&) const;
173 
174 
175  // Member Operators
176 
177  //- Inherit assignment
179 };
180 
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 } // End namespace Foam
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 #ifdef NoRepository
190 #endif
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 
194 #endif
195 
196 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Abstract base class for field mapping.
Definition: fieldMapper.H:48
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
Functional fixed value boundary condition using a run-time selected function to set the value field a...
TypeName("functionalFixedValue")
Runtime type information.
functionalFixedValueFvPatchField(const fvPatch &, const DimensionedField< Type, fvMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void reset(const fvPatchField< Type > &)
Reset the fvPatchField to the given fvPatchField.
virtual void map(const fvPatchField< Type > &, const fieldMapper &)
Map the given fvPatchField onto this fvPatchField.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:90
tmp< fvPatchField< Type > > clone() const
Disallow clone without setting internal field reference.
Definition: fvPatchField.H:215
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:58
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.