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
src
transportModels
twoPhaseInterfaceProperties
alphaContactAngle
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
Abstract base class for alphaContactAngle boundary conditions.
29
30
Derived classes must implement the theta() fuction which returns the
31
wall contact angle field.
32
33
The essential entry "limit" controls the gradient of alpha1 on the wall:
34
35
limit none; // Calculate the gradient from the contact-angle without
36
// limiter
37
38
limit gradient; // Limit the wall-gradient such that alpha1 remains
39
// bounded on the wall
40
41
limit alpha; // Bound the calculated alpha1 on the wall
42
43
limit zeroGradient; // Set the gradient of alpha1 to 0 on the wall
44
// i.e. reproduce previous behaviour
45
46
Note that if any of the first three options are used the boundary condition
47
on p_rgh must set to guarantee that the flux is corrected to be zero at the
48
wall e.g.
49
50
walls
51
{
52
type fixedFluxPressure;
53
adjoint no;
54
}
55
56
If "limit zeroGradient;" is used the pressure BCs can be left as before.
57
58
SourceFiles
59
alphaContactAngleFvPatchScalarField.C
60
61
\*---------------------------------------------------------------------------*/
62
63
#ifndef alphaContactAngleFvPatchScalarField_H
64
#define alphaContactAngleFvPatchScalarField_H
65
66
#include <
finiteVolume/fixedGradientFvPatchFields.H
>
67
#include <
finiteVolume/fvsPatchFields.H
>
68
69
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70
71
namespace
Foam
72
{
73
74
/*---------------------------------------------------------------------------*\
75
Class alphaContactAngleFvPatch Declaration
76
\*---------------------------------------------------------------------------*/
77
78
class
alphaContactAngleFvPatchScalarField
79
:
80
public
fixedGradientFvPatchScalarField
81
{
82
83
public
:
84
85
//- Runtime type information
86
TypeName
(
"alphaContactAngle"
);
87
88
//- Alpha limit options
89
enum
limitControls
90
{
91
lcNone
,
92
lcGradient
,
93
lcZeroGradient
,
94
lcAlpha
95
};
96
97
static
const
NamedEnum<limitControls, 4>
limitControlNames_
;
98
limitControls
limit_
;
99
100
// Constructors
101
102
//- Construct from patch and internal field
103
alphaContactAngleFvPatchScalarField
104
(
105
const
fvPatch
&,
106
const
DimensionedField<scalar, volMesh>
&
107
);
108
109
//- Construct from patch, internal field and dictionary
110
alphaContactAngleFvPatchScalarField
111
(
112
const
fvPatch
&,
113
const
DimensionedField<scalar, volMesh>
&,
114
const
dictionary
&
115
);
116
117
//- Construct by mapping given alphaContactAngleFvPatchScalarField
118
// onto a new patch
119
alphaContactAngleFvPatchScalarField
120
(
121
const
alphaContactAngleFvPatchScalarField
&,
122
const
fvPatch
&,
123
const
DimensionedField<scalar, volMesh>
&,
124
const
fvPatchFieldMapper
&
125
);
126
127
//- Construct as copy
128
alphaContactAngleFvPatchScalarField
129
(
130
const
alphaContactAngleFvPatchScalarField
&
131
);
132
133
//- Construct as copy setting internal field reference
134
alphaContactAngleFvPatchScalarField
135
(
136
const
alphaContactAngleFvPatchScalarField
&,
137
const
DimensionedField<scalar, volMesh>
&
138
);
139
140
141
// Member functions
142
143
//- Return the contact angle
144
virtual
tmp<scalarField>
theta
145
(
146
const
fvPatchVectorField
& Up,
147
const
fvsPatchVectorField
& nHat
148
)
const
= 0;
149
150
//- Evaluate the patch field
151
virtual
void
evaluate
152
(
153
const
Pstream::commsTypes
commsType=
Pstream::blocking
154
);
155
156
//- Write
157
virtual
void
write
(
Ostream
&)
const
;
158
};
159
160
161
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163
}
// End namespace Foam
164
165
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167
#endif
168
169
// ************************ vim: set sw=4 sts=4 et: ************************ //