mappedMixedFvPatchField.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) 2019-2020 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::mappedMixedFvPatchField
28
29Group
30 grpGenericBoundaryConditions grpCoupledBoundaryConditions
31
32Description
33 This boundary condition maps the value at a set of cells or patch faces
34 back to *this.
35
36 The sample mode is set by the underlying mapping engine, provided by the
37 mappedPatchBase class.
38
39Usage
40 \table
41 Property | Description | Required | Default
42 field | Name of field to be mapped | no | this field name
43 weightField | Name of field to use as weight | no |
44 setAverage | Use average value | no | false |
45 average | Average value to use if \c setAverage = yes | partly |
46 \endtable
47
48 Example of the boundary condition specification:
49 \verbatim
50 <patchName>
51 {
52 type mappedMixed;
53 field T; // optional field name
54
55 value uniform 273.0;
56
57 refValue $value;
58 refGradient uniform 0.0;
59 valueFraction uniform 1.0;
60 }
61 \endverbatim
62
63Note
64 Supports multi-world operation:
65
66 +----+ +----+
67 | | | |
68 | | | |
69 +----+ +----+
70 worldA worldB
71 regionA regionB
72 patchA patchB
73
74
75See also
76 Foam::mappedPatchBase
77 Foam::mappedPolyPatch
78 Foam::mappedFvPatch
79 Foam::mappedFieldFvPatchField
80 Foam::mixedFvPatchField
81
82SourceFiles
83 mappedMixedFvPatchField.C
84
85\*---------------------------------------------------------------------------*/
86
87#ifndef mappedMixedFvPatchField_H
88#define mappedMixedFvPatchField_H
89
91#include "mixedFvPatchFields.H"
92
93// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94
95namespace Foam
96{
97
98/*---------------------------------------------------------------------------*\
99 Class mappedMixedFvPatchField Declaration
100\*---------------------------------------------------------------------------*/
101
102template<class Type>
103class mappedMixedFvPatchField
104:
105 public mixedFvPatchField<Type>,
106 public mappedPatchFieldBase<Type>
107{
108
109 //- Name of weight field to sample
110 word weightFieldName_;
111
112
113public:
114
115 //- Runtime type information
116 TypeName("mappedMixed");
117
118
119 // Constructors
120
121 //- Construct from patch and internal field
123 (
124 const fvPatch&,
125 const DimensionedField<Type, volMesh>&
126 );
127
128 //- Construct from patch, internal field and dictionary
130 (
131 const fvPatch&,
133 const dictionary&
134 );
135
136 //- Construct by mapping given
137 // mappedMixedFvPatchField
138 // onto a new patch
140 (
142 const fvPatch&,
144 const fvPatchFieldMapper&
145 );
146
147 //- Construct as copy
149 (
151 );
152
153 //- Construct and return a clone
154 virtual tmp<fvPatchField<Type>> clone() const
155 {
157 (
159 (
160 *this
161 )
162 );
163 }
164
165 //- Construct as copy setting internal field reference
167 (
170 );
171
172 //- Construct and return a clone setting internal field reference
174 (
176 ) const
177 {
181 (
182 *this,
183 iF
184 )
185 );
186 }
187
188
189 // Member functions
190
191 // Mapping functions
192
193 //- Map (and resize as needed) from self given a mapping object
194 virtual void autoMap
195 (
196 const fvPatchFieldMapper&
197 );
199 //- Reverse map the given fvPatchField onto this fvPatchField
200 virtual void rmap
201 (
202 const fvPatchField<Type>&,
203 const labelList&
204 );
205
206
207 // Evaluation functions
208
209 //- Update the coefficients associated with the patch field
210 virtual void updateCoeffs();
211
212
213 //- Write
214 virtual void write(Ostream&) const;
215};
216
217
218// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
219
220} // End namespace Foam
221
222// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
223
224#ifdef NoRepository
226#endif
227
228// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
229
230#endif
231
232// ************************************************************************* //
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:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:82
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
This boundary condition maps the value at a set of cells or patch faces back to *this.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
TypeName("mappedMixed")
Runtime type information.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
mappedMixedFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchField< Type > > clone(const DimensionedField< Type, volMesh > &iF) const
Construct and return a clone setting internal field reference.
Functionality for sampling fields using mappedPatchBase. Every call to mappedField() returns a sample...
This boundary condition provides a base class for 'mixed' type boundary conditions,...
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73