curvatureSeparation.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) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::regionModels::areaSurfaceFilmModels::curvatureSeparation
29 
30 Description
31  Curvature film separation model
32 
33  Assesses film curvature via the mesh geometry and calculates a force
34  balance of the form:
35 
36  F_sum = F_inertial + F_body + F_surface
37 
38  If F_sum < 0, the film separates. Similarly, if F_sum > 0 the film will
39  remain attached.
40 
41  Reference:
42  \verbatim
43  Owen, I., & Ryley, D. J. (1985).
44  The flow of thin liquid films around corners.
45  International journal of multiphase flow, 11(1), 51-62.
46  \endverbatim
47 
48 Usage
49  Example of the model specification:
50  \verbatim
51  injectionModels
52  (
53  curvatureSeparation
54  );
55 
56  curvatureSeparationCoeffs
57  {
58  // Optional entries
59  deltaByR1Min <scalar>;
60  definedPatchRadii <scalar>;
61  fThreshold <scalar>;
62  minInvR1 <scalar>;
63 
64  // Inherited entries
65  ...
66  }
67  \endverbatim
68 
69  where the entries mean:
70  \table
71  Property | Description | Type | Reqd | Deflt
72  deltaByR1Min | Minimum gravity driven film thickness | scalar | no | 0
73  definedPatchRadii | Patch radius i | scalar | no | 0
74  fThreshold | Threshold force for separation | scalar | no | 1e-8
75  minInvR1 | Minimum inv R1 for separation | scalar | no | 5
76  \endtable
77 
78  The inherited entries are elaborated in:
79  - \link injectionModel.H \endlink
80 
81 SourceFiles
82  curvatureSeparation.C
83 
84 \*---------------------------------------------------------------------------*/
85 
86 #ifndef curvatureSeparation_H
87 #define curvatureSeparation_H
88 
89 #include "injectionModel.H"
90 
91 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92 
93 namespace Foam
94 {
95 namespace regionModels
96 {
97 namespace areaSurfaceFilmModels
98 {
99 
100 /*---------------------------------------------------------------------------*\
101  Class curvatureSeparation Declaration
102 \*---------------------------------------------------------------------------*/
103 
104 class curvatureSeparation
105 :
106  public injectionModel
107 {
108  // Private Member Functions
109 
110  //- No copy construct
111  curvatureSeparation(const curvatureSeparation&) = delete;
112 
113  //- No copy assignment
114  void operator=(const curvatureSeparation&) = delete;
115 
116 
117 protected:
118 
119  // Protected Data
120 
121  //- Gradient of surface normals
123 
124  //- Minimum gravity driven film thickness (non-dimensionalised delta/R1)
125  scalar deltaByR1Min_;
126 
127  //- Patch radius
128  scalar definedPatchRadii_;
130  //- Magnitude of gravity vector
131  scalar magG_;
132 
133  //- Direction of gravity vector
134  vector gHat_;
135 
136  //- Threshold force for separation
137  scalar fThreshold_;
138 
139  //- Minimum inv R1 for separation
140  scalar minInvR1_;
141 
142 
143  // Protected Member Functions
144 
145  //- Calculate local (inverse) radius of curvature
147  (
148  const areaVectorField& U,
150  ) const;
151 
152  //- Calculate the cosine of the angle between gravity vector and
153  //- cell out flow direction
155 
156 
157 public:
159  //- Runtime type information
160  TypeName("curvatureSeparation");
161 
162 
163  // Constructors
164 
165  //- Construct from surface film model
167  (
169  const dictionary& dict
170  );
171 
172 
173  //- Destructor
174  virtual ~curvatureSeparation() = default;
175 
176 
177  // Member Functions
179  // Evolution
180 
181  //- Correct
182  virtual void correct
183  (
184  scalarField& availableMass,
185  scalarField& massToInject,
186  scalarField& diameterToInject
187  );
188 };
189 
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 } // End namespace areaSurfaceFilmModels
194 } // End namespace regionModels
195 } // End namespace Foam
196 
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 
199 #endif
200 
201 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
scalar deltaByR1Min_
Minimum gravity driven film thickness (non-dimensionalised delta/R1)
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:104
areaTensorField gradNHat_
Gradient of surface normals.
tmp< scalarField > calcCosAngle(const edgeScalarField &phi) const
Calculate the cosine of the angle between gravity vector and cell out flow direction.
tmp< areaScalarField > calcInvR1(const areaVectorField &U, const scalarField &calcCosAngle) const
Calculate local (inverse) radius of curvature.
TypeName("curvatureSeparation")
Runtime type information.
GeometricField< tensor, faPatchField, areaMesh > areaTensorField
Definition: areaFieldsFwd.H:88
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
U
Definition: pEqn.H:72
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.
const liquidFilmBase & film() const
Return const access to the film surface film model.