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-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::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 [rad/s] | no |
43  rpm | angular velocity of the frame [rpm] | no |
44  \endtable
45 
46  Example of the boundary condition specification:
47  \verbatim
48  <patchName>
49  {
50  type rotatingTotalPressure;
51  U U;
52  phi phi;
53  rho rho;
54  psi psi;
55  gamma 1.4;
56  p0 uniform 1e5;
57  origin (0 0 0);
58  axis (0 0 1);
59  rpm 100;
60  }
61  \endverbatim
62 
63  The \c omega or \c rpm entries are Function1 of time, see Foam::Function1s.
64 
65 See also
66  Foam::totalPressureFvPatchScalarField
67  Foam::Function1s
68 
69 SourceFiles
70  rotatingTotalPressureFvPatchScalarField.C
71 
72 \*---------------------------------------------------------------------------*/
73 
74 #ifndef rotatingTotalPressureFvPatchScalarField_H
75 #define rotatingTotalPressureFvPatchScalarField_H
76 
78 #include "omega.H"
79 
80 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
81 
82 namespace Foam
83 {
84 
85 /*---------------------------------------------------------------------------*\
86  Class rotatingTotalPressureFvPatchScalarField Declaration
87 \*---------------------------------------------------------------------------*/
88 
89 class rotatingTotalPressureFvPatchScalarField
90 :
91  public totalPressureFvPatchScalarField
92 {
93  // Private Data
94 
95  //- Origin of the rotation
96  vector origin_;
97 
98  //- Axis of the rotation
99  vector axis_;
100 
101  //- Angular velocity of the frame (rad/sec)
102  Function1s::omega omega_;
103 
104 
105 public:
106 
107  //- Runtime type information
108  TypeName("rotatingTotalPressure");
109 
110 
111  // Constructors
112 
113  //- Construct from patch, internal field and dictionary
115  (
116  const fvPatch&,
117  const DimensionedField<scalar, volMesh>&,
118  const dictionary&
119  );
120 
121  //- Construct by mapping given rotatingTotalPressureFvPatchScalarField
122  // onto a new patch
124  (
126  const fvPatch&,
127  const DimensionedField<scalar, volMesh>&,
128  const fvPatchFieldMapper&
129  );
130 
131  //- Disallow copy without setting internal field reference
133  (
135  ) = delete;
136 
137  //- Copy constructor setting internal field reference
139  (
141  const DimensionedField<scalar, volMesh>&
142  );
143 
144  //- Construct and return a clone setting internal field reference
146  (
148  ) const
149  {
151  (
153  );
154  }
155 
156 
157  // Member Functions
158 
159  // Evaluation functions
160 
161  //- Update the coefficients associated with the patch field
162  virtual void updateCoeffs();
163 
164 
165  //- Write
166  virtual void write(Ostream&) const;
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #endif
177 
178 // ************************************************************************* //
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
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