variableHeightFlowRateFvPatchField.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) 2012-2016 OpenFOAM Foundation
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::variableHeightFlowRateFvPatchScalarField
28
29Group
30 grpInletBoundaryConditions
31
32Description
33 This boundary condition provides a phase fraction condition based on the
34 local flow conditions, whereby the values are constrained to lay between
35 user-specified upper and lower bounds. The behaviour is described by:
36
37 if alpha > upperBound:
38 - apply a fixed value condition, with a uniform level of the upper bound
39
40 if lower bound <= alpha <= upper bound:
41 - apply a zero-gradient condition
42
43 if alpha < lowerBound:
44 - apply a fixed value condition, with a uniform level of the lower bound
45
46Usage
47 \table
48 Property | Description | Required | Default value
49 phi | flux field name | no | phi
50 lowerBound | lower bound for clipping | yes |
51 upperBound | upper bound for clipping | yes |
52 \endtable
53
54 Example of the boundary condition specification:
55 \verbatim
56 <patchName>
57 {
58 type variableHeightFlowRate;
59 lowerBound 0.0;
60 upperBound 0.9;
61 value uniform 0;
62 }
63 \endverbatim
64
65SourceFiles
66 variableHeightFlowRateFvPatchScalarField.C
67
68\*---------------------------------------------------------------------------*/
69
70#ifndef variableHeightFlowRateFvPatchScalarField_H
71#define variableHeightFlowRateFvPatchScalarField_H
72
73#include "mixedFvPatchFields.H"
74
75// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76
77namespace Foam
78{
79
80/*---------------------------------------------------------------------------*\
81 Class variableHeightFlowRateFvPatchScalarField Declaration
82\*---------------------------------------------------------------------------*/
83
84class variableHeightFlowRateFvPatchScalarField
85:
86 public mixedFvPatchScalarField
87{
88
89protected:
90
91 // Protected data
92
93 //- Name of flux field
94 word phiName_;
95
96 //- Lower bound for alpha1
97 scalar lowerBound_;
98
99 //- Upper bound for alpha1
100 scalar upperBound_;
101
102
103public:
104
105 //- Runtime scalar information
106 TypeName("variableHeightFlowRate");
107
108
109 // Constructors
110
111 //- Construct from patch and internal field
114 const fvPatch&,
116 );
117
118 //- Construct from patch, internal field and dictionary
120 (
121 const fvPatch&,
123 const dictionary&
124 );
126 //- Construct by mapping given
127 // variableHeightFlowRateFvPatchScalarField onto a new patch
129 (
131 const fvPatch&,
133 const fvPatchFieldMapper&
134 );
135
136 //- Construct as copy
138 (
140 );
141
142 //- Construct and return a clone
143 virtual tmp<fvPatchField<scalar>> clone() const
144 {
146 (
148 );
149 }
150
151 //- Construct as copy setting internal field reference
153 (
156 );
157
158 //- Construct and return a clone setting internal field reference
160 (
162 ) const
163 {
165 (
167 );
168 }
169
170
171 // Member functions
172
173 //- Update the coefficients associated with the patch field
174 virtual void updateCoeffs();
175
176 //- Write
177 virtual void write(Ostream&) const;
179
180
181// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182
183} // End namespace Foam
184
185// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186
187#endif
188
189// ************************************************************************* //
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.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
A class for managing temporary objects.
Definition: tmp.H:65
This boundary condition provides a phase fraction condition based on the local flow conditions,...
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual tmp< fvPatchField< scalar > > clone() const
Construct and return a clone.
TypeName("variableHeightFlowRate")
Runtime scalar information.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
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