KinematicWeberNumber.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) 2023 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::KinematicWeberNumber
28 
29 Group
30  grpLagrangianIntermediateFunctionObjects
31 
32 Description
33  Calculates and writes particle Weber number field on the cloud.
34 
35  \f[
36  \mathrm{We}_p =
37  \frac{\rho_c \, | \mathbf{u}_\mathrm{rel} |^2 \, d_p }{\sigma}
38  \f]
39 
40  \vartable
41  \mathrm{We}_p | Particle Weber number
42  \rho_c | Density of carrier
43  d_p | Particle diameter
44  \mathbf{u}_\mathrm{rel} | Relative velocity between particle and carrier
45  \endvartable
46 
47  Operands:
48  \table
49  Operand | Type | Location
50  input | - | -
51  output file | - | -
52  output field | scalarField | <time>/lagrangian/<cloud>/We
53  \endtable
54 
55 Usage
56  Minimal example by using \c constant/<CloudProperties>:
57  \verbatim
58  cloudFunctions
59  {
60  KinematicWeberNumber1
61  {
62  // Mandatory entries
63  type WeberNumber;
64  sigma <scalar>;
65  }
66  }
67  \endverbatim
68 
69  where the entries mean:
70  \table
71  Property | Description | Type | Reqd | Deflt
72  type | Type name: WeberNumber | word | yes | -
73  sigma | Surface tension [N/m] | scalar | yes | -
74  \endtable
75 
76 See also
77  - Foam::ReactingWeberNumber
78 
79 SourceFiles
80  KinematicWeberNumber.C
81 
82 \*---------------------------------------------------------------------------*/
83 
84 #ifndef KinematicWeberNumber_H
85 #define KinematicWeberNumber_H
86 
87 #include "CloudFunctionObject.H"
88 
89 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90 
91 namespace Foam
92 {
93 
94 /*---------------------------------------------------------------------------*\
95  Class KinematicWeberNumber Declaration
96 \*---------------------------------------------------------------------------*/
97 
98 template<class CloudType>
99 class KinematicWeberNumber
100 :
101  public CloudFunctionObject<CloudType>
102 {
103  // Private Typedefs
104 
105  //- Convenience typedef for parcel type
106  typedef typename CloudType::parcelType parcelType;
107 
108 
109  // Private Data
110 
111  //- Surface tension [N/m]
112  scalar sigma_;
113 
114 
115 public:
116 
117  //- Runtime type information
118  TypeName("WeberNumber");
119 
120 
121  // Generated Methods
122 
123  //- No copy assignment
124  void operator=(const KinematicWeberNumber<CloudType>&) = delete;
125 
126 
127  // Constructors
128 
129  //- Construct from dictionary
131  (
132  const dictionary& dict,
133  CloudType& owner,
134  const word& modelName
135  );
136 
137  //- Copy construct
138  KinematicWeberNumber(const KinematicWeberNumber<CloudType>& vf);
139 
140  //- Construct and return a clone
141  virtual autoPtr<CloudFunctionObject<CloudType>> clone() const
142  {
143  return autoPtr<CloudFunctionObject<CloudType>>
144  (
146  );
147  }
148 
149 
150  //- Destructor
151  virtual ~KinematicWeberNumber() = default;
152 
153 
154  // Member Functions
155 
156  //- Post-evolve hook
157  virtual void postEvolve(const typename parcelType::trackingData& td);
158 };
159 
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 } // End namespace Foam
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 #ifdef NoRepository
168  #include "KinematicWeberNumber.C"
169 #endif
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 #endif
174 
175 // ************************************************************************* //
DSMCCloud< dsmcParcel > CloudType
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
virtual void postEvolve(const typename parcelType::trackingData &td)
Post-evolve hook.
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:98
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:104
void operator=(const KinematicWeberNumber< CloudType > &)=delete
No copy assignment.
const CloudType & owner() const
Return const access to the owner cloud.
virtual ~KinematicWeberNumber()=default
Destructor.
TypeName("WeberNumber")
Runtime type information.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:290
KinematicWeberNumber(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
Namespace for OpenFOAM.
Calculates and writes particle Weber number field on the cloud.