PecletNo.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) 2013-2016 OpenFOAM Foundation
9  Copyright (C) 2015-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::PecletNo
29 
30 Group
31  grpFieldFunctionObjects
32 
33 Description
34  Computes the Peclet number as a \c surfaceScalarField.
35 
36  Operands:
37  \table
38  Operand | Type | Location
39  input | surfaceScalarField | $FOAM_CASE/<time>/<inpField>
40  output file | - | -
41  output field | surfaceScalarField | $FOAM_CASE/<time>/<outField>
42  \endtable
43 
44 Usage
45  Minimal example by using \c system/controlDict.functions:
46  \verbatim
47  PecletNo1
48  {
49  // Mandatory entries (unmodifiable)
50  type PecletNo;
51  libs (fieldFunctionObjects);
52 
53  // Optional entries (runtime modifiable)
54  rho rho;
55 
56  // Optional (inherited) entries
57  ...
58  }
59  \endverbatim
60 
61  where the entries mean:
62  \table
63  Property | Description | Type | Req'd | Dflt
64  type | Type name: PecletNo | word | yes | -
65  libs | Library name: fieldFunctionObjects | word | yes | -
66  rho | Name of density field | word | no | rho
67  \endtable
68 
69  The inherited entries are elaborated in:
70  - \link functionObject.H \endlink
71  - \link fieldExpression.H \endlink
72 
73  Minimal example by using the \c postProcess utility:
74  \verbatim
75  postProcess -func PecletNo
76  \endverbatim
77 
78 See also
79  - Foam::functionObject
80  - Foam::functionObjects::fvMeshFunctionObject
81  - Foam::functionObjects::fieldExpression
82  - ExtendedCodeGuide::functionObjects::field::PecletNo
83 
84 SourceFiles
85  PecletNo.C
86 
87 \*---------------------------------------------------------------------------*/
88 
89 #ifndef functionObjects_PecletNo_H
90 #define functionObjects_PecletNo_H
91 
92 #include "fieldExpression.H"
93 #include "surfaceFieldsFwd.H"
94 
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 
97 namespace Foam
98 {
99 namespace functionObjects
100 {
101 
102 /*---------------------------------------------------------------------------*\
103  Class PecletNo Declaration
104 \*---------------------------------------------------------------------------*/
105 
106 class PecletNo
107 :
108  public fieldExpression
109 {
110  // Private Data
111 
112  //- Name of density field
113  word rhoName_;
114 
115 
116  // Private Member Functions
117 
118  //- Optionally scale the flux for compressible cases
119  tmp<surfaceScalarField> rhoScale(const surfaceScalarField& phi) const;
120 
121  //- Calculate the Peclet number field and return true if successful
122  virtual bool calc();
123 
124 
125 public:
126 
127  //- Runtime type information
128  TypeName("PecletNo");
129 
130 
131  // Constructors
132 
133  //- Construct from Time and dictionary
134  PecletNo
135  (
136  const word& name,
137  const Time& runTime,
138  const dictionary& dict
139  );
140 
141  //- No copy construct
142  PecletNo(const PecletNo&) = delete;
143 
144  //- No copy assignment
145  void operator=(const PecletNo&) = delete;
146 
147 
148  //- Destructor
149  virtual ~PecletNo() = default;
150 
151 
152  // Member Functions
153 
154  //- Read the PecletNo data
155  virtual bool read(const dictionary&);
156 };
157 
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 } // End namespace functionObjects
162 } // End namespace Foam
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #endif
167 
168 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::functionObjects::PecletNo::TypeName
TypeName("PecletNo")
Runtime type information.
Foam::functionObjects::PecletNo::~PecletNo
virtual ~PecletNo()=default
Destructor.
Foam::functionObjects::PecletNo::PecletNo
PecletNo(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: PecletNo.C:126
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::functionObjects::PecletNo::read
virtual bool read(const dictionary &)
Read the PecletNo data.
Definition: PecletNo.C:142
Foam::functionObject::name
const word & name() const noexcept
Return the name of this functionObject.
Definition: functionObject.C:143
Foam::functionObjects::fieldExpression
Intermediate class for handling field expression function objects (e.g. blendingFactor etc....
Definition: fieldExpression.H:120
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
Foam::functionObjects::PecletNo::operator=
void operator=(const PecletNo &)=delete
No copy assignment.
surfaceFieldsFwd.H
Foam::functionObjects::PecletNo
Computes the Peclet number as a surfaceScalarField.
Definition: PecletNo.H:145
fieldExpression.H
Foam::GeometricField< scalar, fvsPatchField, surfaceMesh >