Loading...
Searching...
No Matches
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>
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&,
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 as copy setting internal field reference
155 (
158 );
159
160 //- Return a clone
161 virtual tmp<fvPatchField<Type>> clone() const
162 {
163 return fvPatchField<Type>::Clone(*this);
164 }
165
166 //- Clone with an internal field reference
168 (
170 ) const
171 {
172 return fvPatchField<Type>::Clone(*this, iF);
173 }
174
175
176 // Member functions
177
178 // Mapping functions
179
180 //- Map (and resize as needed) from self given a mapping object
181 virtual void autoMap
182 (
183 const fvPatchFieldMapper&
184 );
185
186 //- Reverse map the given fvPatchField onto this fvPatchField
187 virtual void rmap
188 (
189 const fvPatchField<Type>&,
190 const labelList&
191 );
192
193
194 // Evaluation functions
195
196 //- Update the coefficients associated with the patch field
197 virtual void updateCoeffs();
198
200 //- Write
201 virtual void write(Ostream&) const;
202};
203
204
205// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206
207} // End namespace Foam
208
209// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210
211#ifdef NoRepository
213#endif
214
215// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216
217#endif
218
219// ************************************************************************* //
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:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
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...
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
fvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
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
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
Clone with an internal field reference.
Functionality for sampling fields using mappedPatchBase. Every call to mappedField() returns a sample...
mappedPatchFieldBase(const mappedPatchBase &mapper, const fvPatchField< Type > &patchField, const word &fieldName, const bool setAverage, const Type average, const word &interpolationScheme)
Construct from components.
This boundary condition provides a base class for 'mixed' type boundary conditions,...
mixedFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68