meanInletOutletFvPatchScalarField.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) 2025-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::meanInletOutletFvPatchScalarField
26 
27 Description
28  This boundary condition provides an outflow condition for scalars
29  where the patch adjacent mean is applied in the case of reverse flow.
30 
31 Usage
32  \table
33  Property | Description | Required | Default value
34  phi | flux field name | no | phi
35  \endtable
36 
37  Example of the boundary condition specification:
38  \verbatim
39  <patchName>
40  {
41  type meanInletOutlet;
42  phi phi;
43  value uniform 0;
44  }
45  \endverbatim
46 
47 See also
48  Foam::inletOutletFvPatchField
49 
50 SourceFiles
51  meanInletOutletFvPatchScalarField.C
52 
53 \*---------------------------------------------------------------------------*/
54 
55 #ifndef meanInletOutletFvPatchScalarField_H
56 #define meanInletOutletFvPatchScalarField_H
57 
59 
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 
62 namespace Foam
63 {
64 
65 /*---------------------------------------------------------------------------*\
66  Class meanInletOutletFvPatchScalarField Declaration
67 \*---------------------------------------------------------------------------*/
68 
69 class meanInletOutletFvPatchScalarField
70 :
71  public inletOutletFvPatchScalarField
72 {
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("meanInletOutlet");
78 
79 
80  // Constructors
81 
82  //- Construct from patch, internal field and dictionary
84  (
85  const fvPatch&,
87  const dictionary&
88  );
89 
90  //- Construct by mapping given
91  // meanInletOutletFvPatchScalarField onto a new patch
93  (
95  const fvPatch&,
97  const fieldMapper&
98  );
99 
100  //- Disallow copy without setting internal field reference
102  (
104  ) = delete;
105 
106  //- Copy constructor setting internal field reference
108  (
111  );
112 
113  //- Construct and return a clone setting internal field reference
115  (
117  ) const
118  {
120  (
121  new meanInletOutletFvPatchScalarField(*this, iF)
122  );
123  }
124 
125 
126  // Member Functions
127 
128  // Evaluation functions
129 
130  //- Update the coefficients associated with the patch field
131  virtual void updateCoeffs();
132 
133 
134  //- Write
135  virtual void write(Ostream&) const;
136 
137 
138  // Member Operators
139 
140  //- Inherit assignment
141  using inletOutletFvPatchScalarField::operator=;
142 };
143 
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 } // End namespace Foam
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 #endif
152 
153 // ************************************************************************* //
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
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:58
This boundary condition provides an outflow condition for scalars where the patch adjacent mean is ap...
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, fvMesh > &iF) const
Construct and return a clone setting internal field reference.
TypeName("meanInletOutlet")
Runtime type information.
meanInletOutletFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, fvMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.