interfaceProperties.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) 2022 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::interfaceProperties
29 
30 Description
31  Contains the interface properties.
32 
33  Properties to aid interFoam:
34  -# Correct the alpha boundary condition for dynamic contact angle.
35  -# Calculate interface curvature.
36 
37  References:
38  \verbatim
39  Smoother algorithm for interface curvatures (tag:YK):
40  Yamamoto, T. & Komarov, S. V. (2022).
41  Evaluation on different volume of fluid methods in
42  unstructured solver under the optimized condition. Preprint.
43  DOI:10.13140/RG.2.2.17223.37281
44  \endverbatim
45 
46 SourceFiles
47  interfaceProperties.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef interfaceProperties_H
52 #define interfaceProperties_H
53 
54 #include "IOdictionary.H"
55 #include "surfaceTensionModel.H"
56 #include "volFields.H"
57 #include "surfaceFields.H"
58 
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 
61 namespace Foam
62 {
63 
64 /*---------------------------------------------------------------------------*\
65  Class interfaceProperties Declaration
66 \*---------------------------------------------------------------------------*/
67 
69 {
70  // Private data
71 
72  //- Keep a reference to the transportProperties dictionary
73  const dictionary& transportPropertiesDict_;
74 
75  //- Number of iterations to smooth interfacial curvatures
76  int nAlphaSmoothCurvature_;
77 
78  //- Compression coefficient
79  scalar cAlpha_;
80 
81  //- Surface tension
83 
84  //- Stabilisation for normalisation of the interface normal
85  const dimensionedScalar deltaN_;
86 
87  const volScalarField& alpha1_;
88  const volVectorField& U_;
89  surfaceScalarField nHatf_;
90  volScalarField K_;
91 
92 
93  // Private Member Functions
94 
95  //- No copy construct
97 
98  //- No copy assignment
99  void operator=(const interfaceProperties&) = delete;
100 
101  //- Correction for the boundary condition on the unit normal nHat on
102  // walls to produce the correct contact dynamic angle
103  // calculated from the component of U parallel to the wall
104  void correctContactAngle
105  (
107  const surfaceVectorField::Boundary& gradAlphaf
108  ) const;
109 
110  //- Re-calculate the interface curvature
111  void calculateK();
112 
113 
114 public:
115 
116  // Constructors
117 
118  //- Construct from volume fraction field gamma and IOdictionary
120  (
121  const volScalarField& alpha1,
122  const volVectorField& U,
123  const IOdictionary&
124  );
125 
126 
127  // Member Functions
128 
129  scalar cAlpha() const
130  {
131  return cAlpha_;
132  }
133 
134  const dimensionedScalar& deltaN() const
135  {
136  return deltaN_;
137  }
138 
139  const surfaceScalarField& nHatf() const
140  {
141  return nHatf_;
142  }
143 
144  tmp<volScalarField> sigmaK() const;
147 
148  //- Indicator of the proximity of the interface
149  // Field values are 1 near and 0 away for the interface.
151 
152  void correct();
153 
154  //- Read transportProperties dictionary
155  bool read();
156 };
157 
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #endif
166 
167 // ************************************************************************* //
Foam::surfaceFields.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
bool read()
Read transportProperties dictionary.
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
tmp< surfaceScalarField > surfaceTensionForce() const
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:50
const surfaceScalarField & nHatf() const
Contains the interface properties.
tmp< volScalarField > sigmaK() const
U
Definition: pEqn.H:72
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
const dimensionedScalar & deltaN() const
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.
const volScalarField & alpha1