rotatingTotalPressureFvPatchScalarField.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) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::rotatingTotalPressureFvPatchScalarField
28 
29 Group
30  grpInletBoundaryConditions grpOutletBoundaryConditions
31 
32 Description
33  This boundary condition provides a total pressure condition for patches
34  in a rotating frame.
35 
36 Usage
37  \table
38  Property | Description | Required | Default value
39  U | velocity field name | no | U
40  phi | flux field name | no | phi
41  rho | density field name | no | none
42  psi | compressibility field name | no | none
43  gamma | ratio of specific heats (Cp/Cv) | yes |
44  p0 | static pressure reference | yes |
45  omega | angular velocty of the frame [rad/s] | yes |
46  \endtable
47 
48  Example of the boundary condition specification:
49  \verbatim
50  <patchName>
51  {
52  type rotatingTotalPressure;
53  U U;
54  phi phi;
55  rho rho;
56  psi psi;
57  gamma 1.4;
58  p0 uniform 1e5;
59  omega 100;
60  }
61  \endverbatim
62 
63  The \c omega entry is a Function1 type, able to describe time varying
64  functions.
65 
66 See also
67  Foam::totalPressureFvPatchScalarField
68  Foam::Function1Types
69 
70 SourceFiles
71  rotatingTotalPressureFvPatchScalarField.C
72 
73 \*---------------------------------------------------------------------------*/
74 
75 #ifndef rotatingTotalPressureFvPatchScalarField_H
76 #define rotatingTotalPressureFvPatchScalarField_H
77 
79 #include "Function1.H"
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 namespace Foam
84 {
85 
86 /*---------------------------------------------------------------------------*\
87  Class rotatingTotalPressureFvPatchScalarField Declaration
88 \*---------------------------------------------------------------------------*/
89 
90 class rotatingTotalPressureFvPatchScalarField
91 :
92  public totalPressureFvPatchScalarField
93 {
94  // Private data
95 
96  //- Angular velocity of the frame
97  autoPtr<Function1<vector>> omega_;
98 
99 
100 public:
101 
102  //- Runtime type information
103  TypeName("rotatingTotalPressure");
104 
105 
106  // Constructors
107 
108  //- Construct from patch and internal field
110  (
111  const fvPatch&,
112  const DimensionedField<scalar, volMesh>&
113  );
114 
115  //- Construct from patch, internal field and dictionary
117  (
118  const fvPatch&,
119  const DimensionedField<scalar, volMesh>&,
120  const dictionary&
121  );
122 
123  //- Construct by mapping given rotatingTotalPressureFvPatchScalarField
124  // onto a new patch
126  (
128  const fvPatch&,
130  const fvPatchFieldMapper&
131  );
132 
133  //- Construct as copy
135  (
137  );
138 
139  //- Construct and return a clone
140  virtual tmp<fvPatchScalarField> clone() const
141  {
143  (
145  );
146  }
147 
148  //- Construct as copy setting internal field reference
150  (
153  );
154 
155  //- Construct and return a clone setting internal field reference
157  (
159  ) const
160  {
162  (
164  );
165  }
166 
167 
168  // Member functions
169 
170  // Evaluation functions
171 
172  //- Update the coefficients associated with the patch field
173  virtual void updateCoeffs();
174 
175 
176  //- Write
177  virtual void write(Ostream&) const;
178 };
179 
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 } // End namespace Foam
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************************************************************* //
Foam::rotatingTotalPressureFvPatchScalarField::TypeName
TypeName("rotatingTotalPressure")
Runtime type information.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Function1.H
totalPressureFvPatchScalarField.H
Foam::rotatingTotalPressureFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: rotatingTotalPressureFvPatchScalarField.C:100
Foam::rotatingTotalPressureFvPatchScalarField
This boundary condition provides a total pressure condition for patches in a rotating frame.
Definition: rotatingTotalPressureFvPatchScalarField.H:129
Foam::totalPressureFvPatchScalarField
This boundary condition provides a total pressure condition. Four variants are possible:
Definition: totalPressureFvPatchScalarField.H:256
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::rotatingTotalPressureFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: rotatingTotalPressureFvPatchScalarField.C:124
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::rotatingTotalPressureFvPatchScalarField::rotatingTotalPressureFvPatchScalarField
rotatingTotalPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: rotatingTotalPressureFvPatchScalarField.C:38
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
Foam::rotatingTotalPressureFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: rotatingTotalPressureFvPatchScalarField.H:179