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 -------------------------------------------------------------------------------
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::KinematicReynoldsNumber
28 
29 Group
30  grpLagrangianIntermediateFunctionObjects
31 
32 Description
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>/kinematicRe
55  \endtable
56 
57 Usage
58  Minimal example by using \c constant/<CloudProperties>:
59  \verbatim
60  cloudFunctions
61  {
62  KinematicReynoldsNumber1
63  {
64  // Mandatory entries
65  type KinematicReynoldsNumber;
66  }
67  }
68  \endverbatim
69 
70  where the entries mean:
71  \table
72  Property | Description | Type | Reqd | Deflt
73  type | Type name: KinematicReynoldsNumber | word | yes | -
74  \endtable
75 
76 See also
77  - Foam::ThermoReynoldsNumber
78 
79 SourceFiles
80  KinematicReynoldsNumber.C
81 
82 \*---------------------------------------------------------------------------*/
83 
84 #ifndef KinematicReynoldsNumber_H
85 #define KinematicReynoldsNumber_H
86 
87 #include "CloudFunctionObject.H"
88 
89 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90 
91 namespace Foam
92 {
93 
94 /*---------------------------------------------------------------------------*\
95  Class KinematicReynoldsNumber Declaration
96 \*---------------------------------------------------------------------------*/
97 
98 template<class CloudType>
99 class 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 
111 public:
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,
129  CloudType& owner,
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
164  #include "KinematicReynoldsNumber.C"
165 #endif
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
Foam::KinematicReynoldsNumber::operator=
void operator=(const KinematicReynoldsNumber< CloudType > &)=delete
No copy assignment.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::subModelBase::modelName
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:107
Foam::KinematicReynoldsNumber::postEvolve
virtual void postEvolve(const typename parcelType::trackingData &td)
Post-evolve hook.
Definition: KinematicReynoldsNumber.C:58
CloudFunctionObject.H
Foam::KinematicReynoldsNumber::clone
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
Definition: KinematicReynoldsNumber.H:184
Foam::subModelBase::dict
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
KinematicReynoldsNumber.C
Foam::CloudType
DSMCCloud< dsmcParcel > CloudType
Definition: makeDSMCParcelBinaryCollisionModels.C:38
Foam::CloudSubModelBase::owner
const CloudType & owner() const
Return const access to the owner cloud.
Definition: CloudSubModelBase.C:106
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:71
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::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::KinematicReynoldsNumber::KinematicReynoldsNumber
KinematicReynoldsNumber(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
Definition: KinematicReynoldsNumber.C:34
Foam::CloudFunctionObject
Templated cloud function object base class.
Definition: CloudFunctionObject.H:62
Foam::DSMCCloud::parcelType
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
Foam::KinematicReynoldsNumber::TypeName
TypeName("ReynoldsNumber")
Runtime type information.
Foam::KinematicReynoldsNumber
Calculates and writes particle Reynolds number field on the cloud. The normalisation factors are calc...
Definition: KinematicReynoldsNumber.H:146
Foam::KinematicReynoldsNumber::~KinematicReynoldsNumber
virtual ~KinematicReynoldsNumber()=default
Destructor.