rotatingTotalPressureFvPatchScalarField.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) 2011-2024 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::rotatingTotalPressureFvPatchScalarField
26 
27 Description
28  This boundary condition provides a total pressure condition for patches
29  in a rotating frame.
30 
31 Usage
32  \table
33  Property | Description | Required | Default value
34  U | velocity field name | no | U
35  phi | flux field name | no | phi
36  rho | density field name | no | none
37  psi | compressibility field name | no | none
38  gamma | ratio of specific heats (Cp/Cv) | yes |
39  p0 | static pressure reference | yes |
40  origin | origin of rotation in Cartesian co-ordinates | yes|
41  axis | axis of rotation | yes |
42  omega | angular velocity of the frame | no |
43  \endtable
44 
45  Example of the boundary condition specification:
46  \verbatim
47  <patchName>
48  {
49  type rotatingTotalPressure;
50  U U;
51  phi phi;
52  rho rho;
53  psi psi;
54  gamma 1.4;
55  p0 uniform 1e5;
56  origin (0 0 0);
57  axis (0 0 1);
58  omega 100 [rpm];
59  }
60  \endverbatim
61 
62  The \c omega entry is a Function1 of time, see Foam::Function1s.
63 
64 See also
65  Foam::totalPressureFvPatchScalarField
66  Foam::Function1s
67 
68 SourceFiles
69  rotatingTotalPressureFvPatchScalarField.C
70 
71 \*---------------------------------------------------------------------------*/
72 
73 #ifndef rotatingTotalPressureFvPatchScalarField_H
74 #define rotatingTotalPressureFvPatchScalarField_H
75 
77 #include "omega1.H"
78 
79 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
80 
81 namespace Foam
82 {
83 
84 /*---------------------------------------------------------------------------*\
85  Class rotatingTotalPressureFvPatchScalarField Declaration
86 \*---------------------------------------------------------------------------*/
87 
88 class rotatingTotalPressureFvPatchScalarField
89 :
90  public totalPressureFvPatchScalarField
91 {
92  // Private Data
93 
94  //- Origin of the rotation
95  vector origin_;
96 
97  //- Axis of the rotation
98  vector axis_;
99 
100  //- Angular velocity of the frame
101  Function1s::omega omega_;
102 
103 
104 public:
105 
106  //- Runtime type information
107  TypeName("rotatingTotalPressure");
108 
109 
110  // Constructors
111 
112  //- Construct from patch, internal field and dictionary
114  (
115  const fvPatch&,
116  const DimensionedField<scalar, volMesh>&,
117  const dictionary&
118  );
119 
120  //- Construct by mapping given rotatingTotalPressureFvPatchScalarField
121  // onto a new patch
123  (
125  const fvPatch&,
126  const DimensionedField<scalar, volMesh>&,
127  const fieldMapper&
128  );
129 
130  //- Disallow copy without setting internal field reference
132  (
134  ) = delete;
135 
136  //- Copy constructor setting internal field reference
138  (
141  );
142 
143  //- Construct and return a clone setting internal field reference
145  (
147  ) const
148  {
150  (
152  );
153  }
154 
155 
156  // Member Functions
157 
158  // Evaluation functions
159 
160  //- Update the coefficients associated with the patch field
161  virtual void updateCoeffs();
162 
163 
164  //- Write
165  virtual void write(Ostream&) const;
166 };
167 
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 } // End namespace Foam
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #endif
176 
177 // ************************************************************************* //
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 a total pressure condition for patches in a rotating frame.
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.
rotatingTotalPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
TypeName("rotatingTotalPressure")
Runtime type information.
A class for managing temporary objects.
Definition: tmp.H:55
const scalar omega
Namespace for OpenFOAM.
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:49