Loading...
Searching...
No Matches
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{
83{
84
85/*---------------------------------------------------------------------------*\
86 Class alphaContactAngleFvPatch Declaration
87\*---------------------------------------------------------------------------*/
88
90:
91 public zeroGradientFvPatchScalarField
92{
93public:
94
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
127 if (matched) return theta0_;
128 else return 180.0 - theta0_;
129 }
130
131 //- Return the dynamic contact angle velocity scale
132 scalar uTheta() const noexcept
133 {
134 return uTheta_;
135 }
136
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 <
160 interfaceThetaProps,
161 phasePairKey,
164
165
166private:
167
168 // Private Data
169
170 //- Interface properties
171 thetaPropsTable thetaProps_;
172
173
174public:
175
176 //- Runtime type information
177 TypeName("reactingMultiphaseEuler::alphaContactAngle");
178
179
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&,
204 const fvPatchFieldMapper&
205 );
206
207 //- Construct as copy setting internal field reference
209 (
212 );
213
214 //- Return a clone
215 virtual tmp<fvPatchField<scalar>> clone() const
216 {
217 return fvPatchField<scalar>::Clone(*this);
218 }
219
220 //- Clone with an internal field reference
222 (
224 ) const
225 {
226 return fvPatchField<scalar>::Clone(*this, iF);
227 }
228
229
230 // Member Functions
231
232 //- Return the contact angle properties
233 const thetaPropsTable& thetaProps() const noexcept
234 {
235 return thetaProps_;
236 }
237
238 //- Write
239 virtual void write(Ostream&) const;
240};
241
242
243// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
244
245} // End namespace reactingMultiphaseEuler
246} // End namespace Foam
247
248// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
249
250#endif
251
252// ************************************************************************* //
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:124
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
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.
phasePairKey::hasher hash
Alternative name for functor.
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< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
TypeName("reactingMultiphaseEuler::alphaContactAngle")
Runtime type information.
const thetaPropsTable & thetaProps() const noexcept
Return the contact angle properties.
alphaContactAngleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
HashTable< interfaceThetaProps, phasePairKey, phasePairKey::hash > thetaPropsTable
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
const direction noexcept
Definition scalarImpl.H:265
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68