threePhaseInterfaceProperties.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::threePhaseInterfaceProperties
26 
27 Description
28  Properties to aid interFoam :
29  1. Correct the alpha boundary condition for dynamic contact angle.
30  2. Calculate interface curvature.
31 
32 SourceFiles
33  threePhaseInterfaceProperties.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef threePhaseInterfaceProperties_H
38 #define threePhaseInterfaceProperties_H
39 
41 #include "surfaceFields.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class threePhaseInterfaceProperties Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 {
54  // Private Data
55 
56  const incompressibleThreePhaseMixture& mixture_;
57 
58  //- Compression coefficient
59  scalar cAlpha_;
60 
61  //- Surface tension 1-2
62  dimensionedScalar sigma12_;
63 
64  //- Surface tension 1-3
65  dimensionedScalar sigma13_;
66 
67  //- Stabilisation for normalisation of the interface normal
68  const dimensionedScalar deltaN_;
69 
70  surfaceScalarField nHatf_;
71  volScalarField K_;
72 
73 
74  // Private Member Functions
75 
76  //- Correction for the boundary condition on the unit normal nHat on
77  // walls to produce the correct contact dynamic angle.
78  // Calculated from the component of U parallel to the wall
79  void correctContactAngle
80  (
81  surfaceVectorField::Boundary& nHat
82  ) const;
83 
84  //- Re-calculate the interface curvature
85  void calculateK();
86 
87 
88 public:
89 
90  //- Conversion factor for degrees into radians
91  static const scalar convertToRad;
92 
93 
94  // Constructors
95 
96  //- Construct from volume fraction field alpha and IOdictionary
98  (
100  );
101 
102  //- Disallow default bitwise copy construction
104  (
106  ) = delete;
107 
108 
109  // Member Functions
111  scalar cAlpha() const
112  {
113  return cAlpha_;
114  }
116  const dimensionedScalar& deltaN() const
117  {
118  return deltaN_;
119  }
121  const surfaceScalarField& nHatf() const
122  {
123  return nHatf_;
124  }
126  const volScalarField& K() const
127  {
128  return K_;
129  }
131  tmp<volScalarField> sigma() const
132  {
133  volScalarField limitedAlpha2(max(mixture_.alpha2(), scalar(0)));
134  volScalarField limitedAlpha3(max(mixture_.alpha3(), scalar(0)));
135 
136  return
137  (limitedAlpha2*sigma12_ + limitedAlpha3*sigma13_)
138  /(limitedAlpha2 + limitedAlpha3 + small);
139  }
142  {
143  return sigma()*K_;
144  }
145 
147 
148  //- Indicator of the proximity of the interface
149  // Field values are 1 near and 0 away for the interface.
152  void correct()
153  {
154  calculateK();
155  }
156 
157 
158  // Member Operators
159 
160  //- Disallow default bitwise assignment
161  void operator=(const threePhaseInterfaceProperties&) = delete;
162 };
163 
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
Foam::surfaceFields.
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const surfaceScalarField & nHatf() const
Properties to aid interFoam : 1. Correct the alpha boundary condition for dynamic contact angle...
tmp< surfaceScalarField > surfaceTensionForce() const
static const scalar convertToRad
Conversion factor for degrees into radians.
void operator=(const threePhaseInterfaceProperties &)=delete
Disallow default bitwise assignment.
threePhaseInterfaceProperties(const incompressibleThreePhaseMixture &mixture)
Construct from volume fraction field alpha and IOdictionary.
const dimensionedScalar & deltaN() const
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.