KinematicReynoldsNumber.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) 2021 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::KinematicReynoldsNumber
28
29Group
30 grpLagrangianIntermediateFunctionObjects
31
32Description
33 Calculates and writes particle Reynolds number field on the cloud.
34 The normalisation factors are calculated without thermal effects.
35
36 \f[
37 \mathrm{Re}_p =
38 \frac{\rho_c \, | \mathbf{u}_\mathrm{rel} | \, d_p}{\mu_c}
39 \f]
40
41 \vartable
42 \mathrm{Re}_p | Particle Reynolds number
43 d_p | Particle diameter
44 \rho_c | Density of carrier
45 \mu_c | Dynamic viscosity of carrier
46 \mathbf{u}_\mathrm{rel} | Relative velocity between particle and carrier
47 \endvartable
48
49 Operands:
50 \table
51 Operand | Type | Location
52 input | - | -
53 output file | - | -
54 output field | scalarField | <time>/lagrangian/<cloud>/Re
55 \endtable
56
57Usage
58 Minimal example by using \c constant/<CloudProperties>:
59 \verbatim
60 cloudFunctions
61 {
62 KinematicReynoldsNumber1
63 {
64 // Mandatory entries
65 type ReynoldsNumber;
66 }
67 }
68 \endverbatim
69
70 where the entries mean:
71 \table
72 Property | Description | Type | Reqd | Deflt
73 type | Type name: ReynoldsNumber | word | yes | -
74 \endtable
75
76See also
77 - Foam::ThermoReynoldsNumber
78
79SourceFiles
80 KinematicReynoldsNumber.C
81
82\*---------------------------------------------------------------------------*/
83
84#ifndef KinematicReynoldsNumber_H
85#define KinematicReynoldsNumber_H
86
87#include "CloudFunctionObject.H"
88
89// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90
91namespace Foam
92{
93
94/*---------------------------------------------------------------------------*\
95 Class KinematicReynoldsNumber Declaration
96\*---------------------------------------------------------------------------*/
97
98template<class CloudType>
99class KinematicReynoldsNumber
100:
101 public CloudFunctionObject<CloudType>
102{
103 // Private Data
104
105 // Typedefs
106
107 //- Convenience typedef for parcel type
108 typedef typename CloudType::parcelType parcelType;
109
110
111public:
112
113 //- Runtime type information
114 TypeName("ReynoldsNumber");
115
116
117 // Generated Methods
118
119 //- No copy assignment
120 void operator=(const KinematicReynoldsNumber<CloudType>&) = delete;
121
122
123 // Constructors
124
125 //- Construct from dictionary
127 (
128 const dictionary& dict,
130 const word& modelName
131 );
132
133 //- Copy construct
134 KinematicReynoldsNumber(const KinematicReynoldsNumber<CloudType>& vf);
135
136 //- Construct and return a clone
137 virtual autoPtr<CloudFunctionObject<CloudType>> clone() const
138 {
139 return autoPtr<CloudFunctionObject<CloudType>>
140 (
141 new KinematicReynoldsNumber<CloudType>(*this)
142 );
143 }
144
145
146 //- Destructor
147 virtual ~KinematicReynoldsNumber() = default;
148
149
150 // Member Functions
151
152 //- Post-evolve hook
153 virtual void postEvolve(const typename parcelType::trackingData& td);
154};
155
156
157// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158
159} // End namespace Foam
160
161// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163#ifdef NoRepository
165#endif
166
167// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168
169#endif
170
171// ************************************************************************* //
Templated cloud function object base class.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
Calculates and writes particle Reynolds number field on the cloud. The normalisation factors are calc...
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
TypeName("ReynoldsNumber")
Runtime type information.
KinematicReynoldsNumber(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
void operator=(const KinematicReynoldsNumber< CloudType > &)=delete
No copy assignment.
virtual void postEvolve(const typename parcelType::trackingData &td)
Post-evolve hook.
virtual ~KinematicReynoldsNumber()=default
Destructor.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Class used to pass data into container.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:107
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
DSMCCloud< dsmcParcel > CloudType
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73