entrainmentPressureFvPatchScalarField.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) 2020-2023 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::entrainmentPressureFvPatchScalarField
26 
27 Description
28  This boundary condition provides an entrainment pressure condition. The
29  condition is the same as totalPressure condition except that where the
30  total pressure uses the square of the velocity magnitude, this uses the
31  signed square of the normal velocity. In the incompressible case, that
32  means the formulation is as follows:
33 
34  \f[
35  p_p = p_0 + 0.5 Un |Un|
36  \f]
37  where
38  \vartable
39  p_p | pressure at patch [m^2/s^2]
40  p_0 | reference pressure [m^2/s^2]
41  Un | patch normal velocity [m/s]
42  \endvartable
43 
44  This condition is particularly suitable for boundaries on which the flow
45  direction changes frequently and/or when the inlet/outlet direction is not
46  well defined.
47 
48 Usage
49  \table
50  Property | Description | Required | Default value
51  phi | Flux field name | no | phi
52  rho | Density field name | no | rho
53  psi | Compressibility field name | no | none
54  gamma | (Cp/Cv) | no | 1
55  p0 | Reference pressure | yes |
56  \endtable
57 
58  Example of the boundary condition specification:
59  \verbatim
60  <patchName>
61  {
62  type entrainmentPressure;
63  p0 uniform 1e5;
64  }
65  \endverbatim
66 
67 See also
68  Foam::dynamicPressureFvPatchScalarField
69  Foam::totalPressureFvPatchScalarField
70  Foam::fixedValueFvPatchField
71 
72 SourceFiles
73  entrainmentPressureFvPatchScalarField.C
74 
75 \*---------------------------------------------------------------------------*/
76 
77 #ifndef entrainmentPressureFvPatchScalarField_H
78 #define entrainmentPressureFvPatchScalarField_H
79 
81 
82 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83 
84 namespace Foam
85 {
86 
87 /*---------------------------------------------------------------------------*\
88  Class entrainmentPressureFvPatchScalarField Declaration
89 \*---------------------------------------------------------------------------*/
90 
91 class entrainmentPressureFvPatchScalarField
92 :
93  public dynamicPressureFvPatchScalarField
94 {
95  // Private Data
96 
97  //- Name of the flux field
98  const word phiName_;
99 
100 
101 public:
102 
103  //- Runtime type information
104  TypeName("entrainmentPressure");
105 
106 
107  // Constructors
108 
109  //- Construct from patch, internal field and dictionary
111  (
112  const fvPatch&,
113  const DimensionedField<scalar, volMesh>&,
114  const dictionary&
115  );
116 
117  //- Construct by mapping given entrainmentPressureFvPatchScalarField
118  // onto a new patch
120  (
122  const fvPatch&,
123  const DimensionedField<scalar, volMesh>&,
124  const fvPatchFieldMapper&
125  );
126 
127  //- Disallow copy without setting internal field reference
129  (
131  ) = delete;
132 
133  //- Copy constructor setting internal field reference
135  (
138  );
139 
140  //- Construct and return a clone setting internal field reference
142  (
144  ) const
145  {
147  (
149  );
150  }
151 
152 
153  // Member Functions
154 
155  // Evaluation functions
156 
157  //- Update the coefficients associated with the patch field
158  virtual void updateCoeffs();
159 
160 
161  //- Write
162  virtual void write(Ostream&) const;
163 };
164 
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 } // End namespace Foam
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #endif
173 
174 // ************************************************************************* //
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
This boundary condition provides an entrainment pressure condition. The condition is the same as tota...
entrainmentPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("entrainmentPressure")
Runtime type information.
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.