transonicEntrainmentPressureFvPatchScalarField.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) 2021-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::transonicEntrainmentPressureFvPatchScalarField
26 
27 Description
28  This boundary condition provides an entrainment condition for pressure
29  including support for supersonic jets exiting the domain.
30 
31 Usage
32  \table
33  Property | Description | Required | Default value
34  rho | Density field name | no | rho
35  psi | Compressibility field name | no | psi
36  gamma | Heat capacity ratio (cp/Cv) | yes |
37  Mb | Blending Mach No | no | 0.5
38  phi | Flux field name | no | phi
39  p0 | Reference pressure | yes |
40  \endtable
41 
42  Example of the boundary condition specification:
43  \verbatim
44  <patchName>
45  {
46  type transonicEntrainmentPressure;
47  gamma 1.4;
48  p0 uniform 1e5;
49  }
50  \endverbatim
51 
52 See also
53  Foam::entrainmentPressureFvPatchScalarField
54  Foam::mixedFvPatchField
55 
56 SourceFiles
57  transonicEntrainmentPressureFvPatchScalarField.C
58 
59 \*---------------------------------------------------------------------------*/
60 
61 #ifndef transonicEntrainmentPressureFvPatchScalarField_H
62 #define transonicEntrainmentPressureFvPatchScalarField_H
63 
64 #include "fvPatchFields.H"
65 #include "mixedFvPatchFields.H"
66 
67 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 
69 namespace Foam
70 {
71 
72 /*---------------------------------------------------------------------------*\
73  Class transonicEntrainmentPressureFvPatchScalarField Declaration
74 \*---------------------------------------------------------------------------*/
75 
76 class transonicEntrainmentPressureFvPatchScalarField
77 :
78  public mixedFvPatchScalarField
79 {
80  // Private Data
81 
82  //- Name of density field field, default = "rho"
83  const word rhoName_;
84 
85  //- Name of compressibility field, default = "psi"
86  const word psiName_;
87 
88  //- Name of the flux field
89  const word phiName_;
90 
91  //- Heat capacity ratio
92  const scalar gamma_;
93 
94  //-
95  const scalar Mb_;
96 
97  //- Reference pressure
98  scalarField p0_;
99 
100 
101 public:
102 
103  //- Runtime type information
104  TypeName("transonicEntrainmentPressure");
105 
106 
107  // Constructors
108 
109  //- Construct from patch, internal field and dictionary
111  (
112  const fvPatch&,
114  const dictionary&
115  );
116 
117  //- Construct by mapping given
118  // transonicEntrainmentPressureFvPatchScalarField onto a new patch
120  (
122  const fvPatch&,
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  // Mapping functions
156 
157  //- Map the given fvPatchField onto this fvPatchField
158  virtual void map
159  (
160  const fvPatchScalarField&,
161  const fvPatchFieldMapper&
162  );
163 
164  //- Reset the fvPatchField to the given fvPatchField
165  // Used for mesh to mesh mapping
166  virtual void reset(const fvPatchScalarField&);
167 
168 
169  // Evaluation functions
170 
171  //- Update the coefficients associated with the patch field
172  virtual void updateCoeffs();
173 
174 
175  //- Write
176  virtual void write(Ostream&) const;
177 };
178 
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 } // End namespace Foam
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 #endif
187 
188 // ************************************************************************* //
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 keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Foam::fvPatchFieldMapper.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:87
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
A class for managing temporary objects.
Definition: tmp.H:55
This boundary condition provides an entrainment condition for pressure including support for superson...
TypeName("transonicEntrainmentPressure")
Runtime type information.
virtual void reset(const fvPatchScalarField &)
Reset the fvPatchField to the given fvPatchField.
transonicEntrainmentPressureFvPatchScalarField(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.
virtual void map(const fvPatchScalarField &, const fvPatchFieldMapper &)
Map the given fvPatchField onto this fvPatchField.
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.