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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2018 OpenFOAM Foundation
9 Copyright (C) 2021-2022 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::alphaContactAngleFvPatchScalarField
29
30Description
31 Contact-angle boundary condition for multi-phase interface-capturing
32 simulations. Used in conjunction with \c multiphaseSystem.
33
34Usage
35 Example of the boundary condition specification:
36 \verbatim
37 <patch>
38 {
39 // Mandatory entries
40 type alphaContactAngle;
41 thetaProperties
42 (
43 (<phase1> <phase2>) <scalar1> <scalar2> <scalar3> <scalar4>
44 (<phase3> <phase2>) <scalar1> <scalar2> <scalar3> <scalar4>
45 ...
46 );
47
48 // Inherited entries
49 ...
50 }
51 \endverbatim
52
53 where the entries mean:
54 \table
55 Property | Description | Type | Reqd | Deflt
56 type | Type name: alphaContactAngle | word | yes | -
57 thetaProperties | Contact-angle properties | dict | yes | -
58 <scalar1> | Equilibrium contact angle | scalar | yes |-
59 <scalar2> | Dynamic contact angle velocity scale | scalar | yes |-
60 <scalar3> | Limiting advancing contact angle | scalar | yes |-
61 <scalar4> | Limiting receding contact angle | scalar | yes |-
62 \endtable
63
64 The inherited entries are elaborated in:
65 - \link zeroGradientFvPatchFields.H \endlink
66
67SourceFiles
68 alphaContactAngleFvPatchScalarField.C
69
70\*---------------------------------------------------------------------------*/
71
72#ifndef Foam_reactingMultiphaseEuler_alphaContactAngleFvPatchScalarField_H
73#define Foam_reactingMultiphaseEuler_alphaContactAngleFvPatchScalarField_H
74
76#include "multiphaseSystem.H"
77
78// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79
80namespace Foam
81{
82namespace reactingMultiphaseEuler
83{
84
85/*---------------------------------------------------------------------------*\
86 Class alphaContactAngleFvPatch Declaration
87\*---------------------------------------------------------------------------*/
88
89class alphaContactAngleFvPatchScalarField
90:
91 public zeroGradientFvPatchScalarField
92{
93public:
94
95 class interfaceThetaProps
96 {
97 //- Equilibrium contact angle
98 scalar theta0_;
99
100 //- Dynamic contact angle velocity scale
101 scalar uTheta_;
102
103 //- Limiting advancing contact angle
104 scalar thetaA_;
105
106 //- Limiting receding contact angle
107 scalar thetaR_;
108
109
110 public:
111
112 // Constructors
113
114 //- Default construct
116 {}
117
118 //- Construct from Istream
119 interfaceThetaProps(Istream&);
120
121
122 // Member Functions
123
124 //- Return the equilibrium contact angle theta0
125 scalar theta0(bool matched=true) const
126 {
127 if (matched) return theta0_;
128 else return 180.0 - theta0_;
129 }
131 //- Return the dynamic contact angle velocity scale
132 scalar uTheta() const noexcept
133 {
134 return uTheta_;
135 }
137 //- Return the limiting advancing contact angle
138 scalar thetaA(bool matched=true) const
139 {
140 if (matched) return thetaA_;
141 else return 180.0 - thetaA_;
142 }
143
144 //- Return the limiting receding contact angle
145 scalar thetaR(bool matched=true) const
146 {
147 if (matched) return thetaR_;
148 else return 180.0 - thetaR_;
149 }
150
151
152 // IOstream operators
153
156 };
157
158 typedef HashTable
159 <
164
165
166private:
167
168 // Private Data
169
170 //- Interface properties
171 thetaPropsTable thetaProps_;
172
174public:
175
176 //- Runtime type information
177 TypeName("reactingMultiphaseEuler::alphaContactAngle");
178
180 // Constructors
181
182 //- Construct from patch and internal field
184 (
185 const fvPatch&,
187 );
188
189 //- Construct from patch, internal field and dictionary
191 (
192 const fvPatch&,
194 const dictionary&
195 );
196
197 //- Construct by mapping given alphaContactAngleFvPatchScalarField
198 //- onto a new patch
200 (
202 const fvPatch&,
205 );
206
207 //- Construct and return a clone
208 virtual tmp<fvPatchScalarField> clone() const
209 {
211 (
213 );
214 }
215
216 //- Construct as copy setting internal field reference
221 );
222
223 //- Construct and return a clone setting internal field reference
225 (
227 ) const
228 {
230 (
232 );
233 }
234
235
236 // Member Functions
237
238 //- Return the contact angle properties
239 const thetaPropsTable& thetaProps() const noexcept
240 {
241 return thetaProps_;
242 }
243
244 //- Write
245 virtual void write(Ostream&) const;
246};
247
248
249// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
250
251} // End namespace reactingMultiphaseEuler
252} // End namespace Foam
253
254// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
255
256#endif
257
258// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A HashTable similar to std::unordered_map.
Definition: HashTable.H:123
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
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
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:68
scalar theta0(bool matched=true) const
Return the equilibrium contact angle theta0.
scalar thetaR(bool matched=true) const
Return the limiting receding contact angle.
scalar thetaA(bool matched=true) const
Return the limiting advancing contact angle.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
TypeName("reactingMultiphaseEuler::alphaContactAngle")
Runtime type information.
const thetaPropsTable & thetaProps() const noexcept
Return the contact angle properties.
HashTable< interfaceThetaProps, phasePairKey, phasePairKey::hash > thetaPropsTable
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
const direction noexcept
Definition: Scalar.H:223
runTime write()
Hashing functor for phasePairKey.
Definition: phasePairKey.H:123
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73