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
multiphaseInterFoam
multiphaseMixture
alphaContactAngle
alphaContactAngleFvPatchScalarField.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
24
Class
25
Foam::alphaContactAngleFvPatchScalarField
26
27
Description
28
Contact-angle boundary condition for multi-phase interface-capturing
29
simulations. Used in conjuction with multiphaseMixture.
30
31
SourceFiles
32
alphaContactAngleFvPatchScalarField.C
33
34
\*---------------------------------------------------------------------------*/
35
36
#ifndef alphaContactAngleFvPatchScalarField_H
37
#define alphaContactAngleFvPatchScalarField_H
38
39
#include <
finiteVolume/zeroGradientFvPatchFields.H
>
40
#include <
multiphaseMixture/multiphaseMixture.H
>
41
42
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44
namespace
Foam
45
{
46
47
/*---------------------------------------------------------------------------*\
48
Class alphaContactAngleFvPatch Declaration
49
\*---------------------------------------------------------------------------*/
50
51
class
alphaContactAngleFvPatchScalarField
52
:
53
public
zeroGradientFvPatchScalarField
54
{
55
public
:
56
57
class
interfaceThetaProps
58
{
59
//- Equilibrium contact angle
60
scalar theta0_;
61
62
//- Dynamic contact angle velocity scale
63
scalar uTheta_;
64
65
//- Limiting advancing contact angle
66
scalar thetaA_;
67
68
//- Limiting receeding contact angle
69
scalar thetaR_;
70
71
72
public
:
73
74
// Constructors
75
interfaceThetaProps
()
76
{}
77
78
interfaceThetaProps
(
Istream
&);
79
80
81
// Member functions
82
83
//- Return the equilibrium contact angle theta0
84
scalar
theta0
(
bool
matched=
true
)
const
85
{
86
if
(matched)
return
theta0_;
87
else
return
180.0 - theta0_;
88
}
89
90
//- Return the dynamic contact angle velocity scale
91
scalar
uTheta
()
const
92
{
93
return
uTheta_;
94
}
95
96
//- Return the limiting advancing contact angle
97
scalar
thetaA
(
bool
matched=
true
)
const
98
{
99
if
(matched)
return
thetaA_;
100
else
return
180.0 - thetaA_;
101
}
102
103
//- Return the limiting receeding contact angle
104
scalar
thetaR
(
bool
matched=
true
)
const
105
{
106
if
(matched)
return
thetaR_;
107
else
return
180.0 - thetaR_;
108
}
109
110
111
// IO functions
112
113
friend
Istream
&
operator>>
(
Istream
&,
interfaceThetaProps
&);
114
friend
Ostream
&
operator<<
(
Ostream
&,
const
interfaceThetaProps
&);
115
};
116
117
typedef
HashTable
118
<
119
interfaceThetaProps,
120
multiphaseMixture::interfacePair
,
121
multiphaseMixture::interfacePair::hash
122
>
thetaPropsTable
;
123
124
125
private
:
126
127
// Private data
128
129
thetaPropsTable
thetaProps_;
130
131
132
public
:
133
134
//- Runtime type information
135
TypeName
(
"alphaContactAngle"
);
136
137
138
// Constructors
139
140
//- Construct from patch and internal field
141
alphaContactAngleFvPatchScalarField
142
(
143
const
fvPatch
&,
144
const
DimensionedField<scalar, volMesh>
&
145
);
146
147
//- Construct from patch, internal field and dictionary
148
alphaContactAngleFvPatchScalarField
149
(
150
const
fvPatch
&,
151
const
DimensionedField<scalar, volMesh>
&,
152
const
dictionary
&
153
);
154
155
//- Construct by mapping given alphaContactAngleFvPatchScalarField
156
// onto a new patch
157
alphaContactAngleFvPatchScalarField
158
(
159
const
alphaContactAngleFvPatchScalarField
&,
160
const
fvPatch
&,
161
const
DimensionedField<scalar, volMesh>
&,
162
const
fvPatchFieldMapper
&
163
);
164
165
//- Construct and return a clone
166
virtual
tmp<fvPatchScalarField>
clone
()
const
167
{
168
return
tmp<fvPatchScalarField>
169
(
170
new
alphaContactAngleFvPatchScalarField
(*
this
)
171
);
172
}
173
174
//- Construct as copy setting internal field reference
175
alphaContactAngleFvPatchScalarField
176
(
177
const
alphaContactAngleFvPatchScalarField
&,
178
const
DimensionedField<scalar, volMesh>
&
179
);
180
181
//- Construct and return a clone setting internal field reference
182
virtual
tmp<fvPatchScalarField>
clone
183
(
184
const
DimensionedField<scalar, volMesh>
& iF
185
)
const
186
{
187
return
tmp<fvPatchScalarField>
188
(
189
new
alphaContactAngleFvPatchScalarField
(*
this
, iF)
190
);
191
}
192
193
194
// Member functions
195
196
//- Return the contact angle properties
197
const
thetaPropsTable
&
thetaProps
()
const
198
{
199
return
thetaProps_;
200
}
201
202
//- Write
203
virtual
void
write
(
Ostream
&)
const
;
204
};
205
206
207
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208
209
}
// End namespace Foam
210
211
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212
213
#endif
214
215
// ************************ vim: set sw=4 sts=4 et: ************************ //