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-2020 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
80  (
82  ) const;
83 
84  //- Re-calculate the interface curvature
85  void calculateK();
86 
87 
88 public:
89 
90  // Constructors
91 
92  //- Construct from volume fraction field alpha and IOdictionary
94  (
96  );
97 
98  //- Disallow default bitwise copy construction
100  (
102  ) = delete;
103 
104 
105  // Member Functions
107  scalar cAlpha() const
108  {
109  return cAlpha_;
110  }
112  const dimensionedScalar& deltaN() const
113  {
114  return deltaN_;
115  }
117  const surfaceScalarField& nHatf() const
118  {
119  return nHatf_;
120  }
122  const volScalarField& K() const
123  {
124  return K_;
125  }
127  tmp<volScalarField> sigma() const
128  {
129  volScalarField limitedAlpha2(max(mixture_.alpha2(), scalar(0)));
130  volScalarField limitedAlpha3(max(mixture_.alpha3(), scalar(0)));
131 
132  return
133  (limitedAlpha2*sigma12_ + limitedAlpha3*sigma13_)
134  /(limitedAlpha2 + limitedAlpha3 + small);
135  }
138  {
139  return sigma()*K_;
140  }
141 
143 
144  //- Indicator of the proximity of the interface
145  // Field values are 1 near and 0 away for the interface.
148  void correct()
149  {
150  calculateK();
151  }
152 
153 
154  // Member Operators
155 
156  //- Disallow default bitwise assignment
157  void operator=(const threePhaseInterfaceProperties&) = delete;
158 };
159 
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 } // End namespace Foam
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 #endif
168 
169 // ************************************************************************* //
Foam::surfaceFields.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
const surfaceScalarField & nHatf() const
Properties to aid interFoam : 1. Correct the alpha boundary condition for dynamic contact angle...
tmp< surfaceScalarField > surfaceTensionForce() const
void operator=(const threePhaseInterfaceProperties &)=delete
Disallow default bitwise assignment.
threePhaseInterfaceProperties(const incompressibleThreePhaseMixture &mixture)
Construct from volume fraction field alpha and IOdictionary.
Correction for the boundary condition on the unit normal nHat on walls to produce the correct contact...
const dimensionedScalar & deltaN() const
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.