MachNo.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) 2016 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::functionObjects::MachNo
29 
30 Group
31  grpFieldFunctionObjects
32 
33 Description
34  Computes the Mach number as a \c volScalarField.
35 
36  Operands:
37  \table
38  Operand | Type | Location
39  input | volVectorField | <time>/inputField
40  output file | - | -
41  output field | volScalarField | <time>/outputField
42  \endtable
43 
44 Usage
45  Minimal example by using \c system/controlDict.functions:
46  \verbatim
47  MachNoFO
48  {
49  // Mandatory entries
50  type MachNo;
51  libs (fieldFunctionObjects);
52 
53  // Inherited entries
54  ...
55  }
56  \endverbatim
57 
58  where the entries mean:
59  \table
60  Property | Description | Type | Reqd | Deflt
61  type | Type name: MachNo | word | yes | -
62  libs | Library name: fieldFunctionObjects | word | yes | -
63  \endtable
64 
65  The inherited entries are elaborated in:
66  - \link fieldExpression.H \endlink
67 
68 SourceFiles
69  MachNo.C
70 
71 \*---------------------------------------------------------------------------*/
72 
73 #ifndef Foam_functionObjects_MachNo_H
74 #define Foam_functionObjects_MachNo_H
75 
76 #include "fieldExpression.H"
77 
78 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79 
80 namespace Foam
81 {
82 namespace functionObjects
83 {
84 
85 /*---------------------------------------------------------------------------*\
86  Class MachNo Declaration
87 \*---------------------------------------------------------------------------*/
88 
89 class MachNo
90 :
91  public fieldExpression
92 {
93  // Private Member Functions
94 
95  //- Calculate the Mach number field and return true if successful
96  virtual bool calc();
97 
98 
99 public:
100 
101  //- Runtime type information
102  TypeName("MachNo");
103 
104 
105  // Constructors
106 
107  //- Construct for given objectRegistry and dictionary.
108  // Allow the possibility to load fields from files
109  MachNo
110  (
111  const word& name,
112  const Time& runTime,
113  const dictionary& dict
114  );
115 
116  //- No copy construct
117  MachNo(const MachNo&) = delete;
119  //- No copy assignment
120  void operator=(const MachNo&) = delete;
121 
122 
123  //- Destructor
124  virtual ~MachNo() = default;
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace functionObjects
131 } // End namespace Foam
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
dictionary dict
Computes the Mach number as a volScalarField.
Definition: MachNo.H:118
engineTime & runTime
virtual ~MachNo()=default
Destructor.
const word & name() const noexcept
Return the name of this functionObject.
TypeName("MachNo")
Runtime type information.
MachNo(const word &name, const Time &runTime, const dictionary &dict)
Construct for given objectRegistry and dictionary.
Definition: MachNo.C:67
void operator=(const MachNo &)=delete
No copy assignment.
Namespace for OpenFOAM.