Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
applications
solvers
multiphase
interMixingFoam
threePhaseInterfaceProperties
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 | Copyright (C) 1991-2010 OpenCFD Ltd.
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
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24
25
Class
26
threePhaseInterfaceProperties
27
28
Description
29
Properties to aid interFoam :
30
1. Correct the alpha boundary condition for dynamic contact angle.
31
2. Calculate interface curvature.
32
33
SourceFiles
34
threePhaseInterfaceProperties.C
35
36
\*---------------------------------------------------------------------------*/
37
38
#ifndef threePhaseInterfaceProperties_H
39
#define threePhaseInterfaceProperties_H
40
41
#include "
../incompressibleThreePhaseMixture/threePhaseMixture.H
"
42
#include <
finiteVolume/surfaceFields.H
>
43
44
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46
namespace
Foam
47
{
48
49
/*---------------------------------------------------------------------------*\
50
Class threePhaseInterfaceProperties Declaration
51
\*---------------------------------------------------------------------------*/
52
53
class
threePhaseInterfaceProperties
54
{
55
// Private data
56
57
const
threePhaseMixture
& mixture_;
58
59
//- Compression coefficient
60
scalar cAlpha_;
61
62
//- Surface tension 1-2
63
dimensionedScalar
sigma12_;
64
65
//- Surface tension 1-3
66
dimensionedScalar
sigma13_;
67
68
//- Stabilisation for normalisation of the interface normal
69
const
dimensionedScalar
deltaN_;
70
71
surfaceScalarField
nHatf_;
72
volScalarField
K_;
73
74
75
// Private Member Functions
76
77
//- Disallow default bitwise copy construct and assignment
78
threePhaseInterfaceProperties
(
const
threePhaseInterfaceProperties
&);
79
void
operator=(
const
threePhaseInterfaceProperties
&);
80
81
//- Correction for the boundary condition on the unit normal nHat on
82
// walls to produce the correct contact dynamic angle
83
// calculated from the component of U parallel to the wall
84
void
correctContactAngle
85
(
86
surfaceVectorField::GeometricBoundaryField
& nHat
87
)
const
;
88
89
//- Re-calculate the interface curvature
90
void
calculateK();
91
92
93
public
:
94
95
//- Conversion factor for degrees into radians
96
static
const
scalar
convertToRad
;
97
98
99
// Constructors
100
101
//- Construct from volume fraction field alpha and IOdictionary
102
threePhaseInterfaceProperties
(
const
threePhaseMixture
&
mixture
);
103
104
105
// Member Functions
106
107
scalar
cAlpha
()
const
108
{
109
return
cAlpha_;
110
}
111
112
const
dimensionedScalar
&
deltaN
()
const
113
{
114
return
deltaN_;
115
}
116
117
const
surfaceScalarField
&
nHatf
()
const
118
{
119
return
nHatf_;
120
}
121
122
const
volScalarField
&
K
()
const
123
{
124
return
K_;
125
}
126
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
}
136
137
tmp<volScalarField>
sigmaK
()
const
138
{
139
return
sigma
()*K_;
140
}
141
142
void
correct
()
143
{
144
calculateK();
145
}
146
};
147
148
149
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150
151
}
// End namespace Foam
152
153
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154
155
#endif
156
157
// ************************************************************************* //