threePhaseInterfaceProperties.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-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::threePhaseInterfaceProperties
28
29Description
30 Properties to aid interFoam :
31 1. Correct the alpha boundary condition for dynamic contact angle.
32 2. Calculate interface curvature.
33
34SourceFiles
35 threePhaseInterfaceProperties.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef threePhaseInterfaceProperties_H
40#define threePhaseInterfaceProperties_H
41
43#include "surfaceFields.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class threePhaseInterfaceProperties Declaration
52\*---------------------------------------------------------------------------*/
55{
56 // Private data
57
58 const incompressibleThreePhaseMixture& mixture_;
59
60 //- Compression coefficient
61 scalar cAlpha_;
62
63 //- Surface tension 1-2
64 dimensionedScalar sigma12_;
65
66 //- Surface tension 1-3
67 dimensionedScalar sigma13_;
68
69 //- Stabilisation for normalisation of the interface normal
70 const dimensionedScalar deltaN_;
71
72 surfaceScalarField nHatf_;
74
75
76 // Private Member Functions
77
78 //- No copy construct
80 (
82 ) = delete;
83
84 //- No copy assignment
85 void operator=(const threePhaseInterfaceProperties&) = delete;
86
87
88 //- Correction for the boundary condition on the unit normal nHat on
89 // walls to produce the correct contact dynamic angle.
90 // Calculated from the component of U parallel to the wall
91 void correctContactAngle
92 (
94 ) const;
95
96 //- Re-calculate the interface curvature
97 void calculateK();
98
99
100public:
101
102 // Constructors
103
104 //- Construct from volume fraction field alpha and IOdictionary
106 (
108 );
109
110
111 // Member Functions
113 scalar cAlpha() const
114 {
115 return cAlpha_;
116 }
118 const dimensionedScalar& deltaN() const
119 {
120 return deltaN_;
121 }
123 const surfaceScalarField& nHatf() const
124 {
125 return nHatf_;
126 }
128 const volScalarField& K() const
129 {
130 return K_;
131 }
134 {
135 volScalarField limitedAlpha2(max(mixture_.alpha2(), scalar(0)));
136 volScalarField limitedAlpha3(max(mixture_.alpha3(), scalar(0)));
137
138 return
139 (limitedAlpha2*sigma12_ + limitedAlpha3*sigma13_)
140 /(limitedAlpha2 + limitedAlpha3 + SMALL);
141 }
144 {
145 return sigma()*K_;
146 }
149
150 //- Indicator of the proximity of the interface
151 // Field values are 1 near and 0 away for the interface.
154 void correct()
155 {
156 calculateK();
157 }
158};
159
160
161// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163} // End namespace Foam
164
165// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167#endif
168
169// ************************************************************************* //
Properties to aid interFoam : 1. Correct the alpha boundary condition for dynamic contact angle....
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
tmp< surfaceScalarField > surfaceTensionForce() const
threePhaseInterfaceProperties(const incompressibleThreePhaseMixture &mixture)
Construct from volume fraction field alpha and IOdictionary.
const dimensionedScalar & deltaN() const
const surfaceScalarField & nHatf() const
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
Foam::surfaceFields.