alphaContactAngleTwoPhaseFvPatchScalarField.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-2017 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::alphaContactAngleTwoPhaseFvPatchScalarField
29
30Group
31 grpWallBoundaryConditions grpGenericBoundaryConditions
32
33Description
34 Abstract base class for two-phase alphaContactAngle boundary conditions.
35
36 Derived classes must implement the theta() function which returns the
37 wall contact angle field.
38
39 The essential entry "limit" controls the gradient of alpha1 on the wall:
40 - none - Calculate the gradient from the contact-angle without limiter
41 - gradient - Limit the wall-gradient such that alpha1 remains bounded
42 on the wall
43 - alpha - Bound the calculated alpha1 on the wall
44 - zeroGradient - Set the gradient of alpha1 to 0 on the wall, i.e.
45 reproduce previous behaviour, the pressure BCs can be left as before.
46
47 Note that if any of the first three options are used the boundary condition
48 on \c p_rgh must set to guarantee that the flux is corrected to be zero at
49 the wall e.g.:
50
51 \verbatim
52 <patchName>
53 {
54 type alphaContactAngle;
55 limit none;
56 }
57 \endverbatim
58
59SourceFiles
60 alphaContactAngleTwoPhaseFvPatchScalarField.C
61
62\*---------------------------------------------------------------------------*/
63
64#ifndef alphaContactAngleTwoPhaseFvPatchScalarField_H
65#define alphaContactAngleTwoPhaseFvPatchScalarField_H
66
68#include "fvsPatchFields.H"
69
70// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71
72namespace Foam
73{
74
75/*---------------------------------------------------------------------------*\
76 Class alphaContactAngleTwoPhaseFvPatchScalarField Declaration
77\*---------------------------------------------------------------------------*/
80:
81 public fixedGradientFvPatchScalarField
82{
83public:
84
85 // Abstract class, no runtime information
86
87 //- Alpha limit options
88 enum limitControls
89 {
94 };
98
99 // Constructors
100
101 //- Construct from patch and internal field
103 (
104 const fvPatch&,
106 );
107
108 //- Construct from patch, internal field and dictionary
110 (
111 const fvPatch&,
113 const dictionary&
114 );
115
116 //- Construct by mapping onto a new patch
118 (
120 const fvPatch&,
122 const fvPatchFieldMapper&
123 );
124
125 //- Construct as copy
127 (
129 );
130
131 //- Construct as copy setting internal field reference
133 (
136 );
137
138
139 // Member functions
140
141 //- Return the contact angle
142 virtual tmp<scalarField> theta
143 (
144 const fvPatchVectorField& Up,
145 const fvsPatchVectorField& nHat
146 ) const = 0;
147
148 //- Evaluate the patch field
149 virtual void evaluate
150 (
152 );
153
154 //- Write
155 virtual void write(Ostream& os) const;
156};
157
158
159// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160
161} // End namespace Foam
162
163// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164
165#endif
166
167// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition: Enum.H:61
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
commsTypes
Types of communications.
Definition: UPstream.H:67
Abstract base class for two-phase alphaContactAngle boundary conditions.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
virtual tmp< scalarField > theta(const fvPatchVectorField &Up, const fvsPatchVectorField &nHat) const =0
Return the contact angle.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
A class for managing temporary objects.
Definition: tmp.H:65
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
runTime write()