ThermoReynoldsNumber.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::ThermoReynoldsNumber
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 with 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 in the film surrounding particle
45  \mu_c | Dynamic viscosity of carrier in the film surrounding particle
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>/thermoRe
55  \endtable
56 
57 Usage
58  Minimal example by using \c constant/<CloudProperties>:
59  \verbatim
60  cloudFunctions
61  {
62  ThermoReynoldsNumber1
63  {
64  // Mandatory entries
65  type ThermoReynoldsNumber;
66  }
67  }
68  \endverbatim
69 
70  where the entries mean:
71  \table
72  Property | Description | Type | Reqd | Deflt
73  type | Type name: ThermoReynoldsNumber | word | yes | -
74  \endtable
75 
76 Note
77  - Normalisation factors \c rhoc and \c muc are based on temperature
78  dependent values calculated inside the film surrounding the particle
79  rather than freestream values; therefore, \c ThermoReynoldsNumber should not
80  be expected to operate with kinematic (non-thermo) applications.
81 
82 See also
83  - Foam::KinematicReynoldsNumber
84 
85 SourceFiles
86  ThermoReynoldsNumber.C
87 
88 \*---------------------------------------------------------------------------*/
89 
90 #ifndef ThermoReynoldsNumber_H
91 #define ThermoReynoldsNumber_H
92 
93 #include "CloudFunctionObject.H"
94 
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 
97 namespace Foam
98 {
99 
100 /*---------------------------------------------------------------------------*\
101  Class ThermoReynoldsNumber Declaration
102 \*---------------------------------------------------------------------------*/
103 
104 template<class CloudType>
105 class ThermoReynoldsNumber
106 :
107  public CloudFunctionObject<CloudType>
108 {
109  // Private Data
110 
111  // Typedefs
112 
113  //- Convenience typedef for parcel type
114  typedef typename CloudType::parcelType parcelType;
115 
116 
117 public:
118 
119  //- Runtime type information
120  TypeName("ReynoldsNumber");
121 
122 
123  // Generated Methods
124 
125  //- No copy assignment
126  void operator=(const ThermoReynoldsNumber<CloudType>&) = delete;
127 
128 
129  // Constructors
130 
131  //- Construct from dictionary
133  (
134  const dictionary& dict,
135  CloudType& owner,
136  const word& modelName
137  );
138 
139  //- Copy construct
140  ThermoReynoldsNumber(const ThermoReynoldsNumber<CloudType>& vf);
141 
142  //- Construct and return a clone
143  virtual autoPtr<CloudFunctionObject<CloudType>> clone() const
144  {
145  return autoPtr<CloudFunctionObject<CloudType>>
146  (
147  new ThermoReynoldsNumber<CloudType>(*this)
148  );
149  }
150 
151 
152  //- Destructor
153  virtual ~ThermoReynoldsNumber() = default;
154 
155 
156  // Member Functions
157 
158  //- Post-evolve hook
159  virtual void postEvolve(const typename parcelType::trackingData& td);
160 };
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace Foam
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #ifdef NoRepository
170  #include "ThermoReynoldsNumber.C"
171 #endif
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #endif
176 
177 // ************************************************************************* //
Foam::ThermoReynoldsNumber::clone
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
Definition: ThermoReynoldsNumber.H:190
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::ThermoReynoldsNumber::~ThermoReynoldsNumber
virtual ~ThermoReynoldsNumber()=default
Destructor.
Foam::ThermoReynoldsNumber::operator=
void operator=(const ThermoReynoldsNumber< CloudType > &)=delete
No copy assignment.
Foam::subModelBase::modelName
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:107
CloudFunctionObject.H
Foam::subModelBase::dict
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
ThermoReynoldsNumber.C
Foam::ThermoReynoldsNumber::postEvolve
virtual void postEvolve(const typename parcelType::trackingData &td)
Post-evolve hook.
Definition: ThermoReynoldsNumber.C:59
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::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::ThermoReynoldsNumber
Calculates and writes particle Reynolds number field on the cloud. The normalisation factors are calc...
Definition: ThermoReynoldsNumber.H:152
Foam::ThermoReynoldsNumber::ThermoReynoldsNumber
ThermoReynoldsNumber(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
Definition: ThermoReynoldsNumber.C:35
Foam::ThermoReynoldsNumber::TypeName
TypeName("ReynoldsNumber")
Runtime type information.