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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::functionObjects::PecletNo
29
30Group
31 grpFieldFunctionObjects
32
33Description
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
44Usage
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
78See also
79 - Foam::functionObject
80 - Foam::functionObjects::fvMeshFunctionObject
81 - Foam::functionObjects::fieldExpression
82 - ExtendedCodeGuide::functionObjects::field::PecletNo
83
84SourceFiles
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
97namespace Foam
98{
99namespace functionObjects
100{
101
102/*---------------------------------------------------------------------------*\
103 Class PecletNo Declaration
104\*---------------------------------------------------------------------------*/
105
106class 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
125public:
126
127 //- Runtime type information
128 TypeName("PecletNo");
129
130
131 // Constructors
132
133 //- Construct from Time and dictionary
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
168// ************************************************************************* //
surfaceScalarField & phi
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const word & name() const noexcept
Return the name of this functionObject.
Computes the Peclet number as a surfaceScalarField.
Definition: PecletNo.H:148
PecletNo(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: PecletNo.C:126
PecletNo(const PecletNo &)=delete
No copy construct.
TypeName("PecletNo")
Runtime type information.
void operator=(const PecletNo &)=delete
No copy assignment.
virtual ~PecletNo()=default
Destructor.
virtual bool read(const dictionary &)
Read the PecletNo data.
Definition: PecletNo.C:142
Intermediate class for handling field expression function objects (e.g. blendingFactor etc....
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
engineTime & runTime
Namespace for OpenFOAM.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73