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-2012 OpenFOAM Foundation
9 Copyright (C) 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 multiphaseSystem.
33
34SourceFiles
35 alphaContactAngleFvPatchScalarField.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef Foam_multiphaseEuler_alphaContactAngleFvPatchScalarField_H
40#define Foam_multiphaseEuler_alphaContactAngleFvPatchScalarField_H
41
43#include "multiphaseSystem.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49namespace multiphaseEuler
50{
52/*---------------------------------------------------------------------------*\
53 Class alphaContactAngleFvPatch Declaration
54\*---------------------------------------------------------------------------*/
55
58 public zeroGradientFvPatchScalarField
59{
60public:
61
63 {
64 //- Equilibrium contact angle
65 scalar theta0_;
66
67 //- Dynamic contact angle velocity scale
68 scalar uTheta_;
69
70 //- Limiting advancing contact angle
71 scalar thetaA_;
72
73 //- Limiting receding contact angle
74 scalar thetaR_;
75
76
77 public:
78
79 // Constructors
81 {}
82
85
86 // Member functions
87
88 //- Return the equilibrium contact angle theta0
89 scalar theta0(bool matched=true) const
90 {
91 if (matched) return theta0_;
92 else return 180.0 - theta0_;
93 }
95 //- Return the dynamic contact angle velocity scale
96 scalar uTheta() const
97 {
98 return uTheta_;
99 }
100
101 //- Return the limiting advancing contact angle
102 scalar thetaA(bool matched=true) const
104 if (matched) return thetaA_;
105 else return 180.0 - thetaA_;
106 }
107
108 //- Return the limiting receding contact angle
109 scalar thetaR(bool matched=true) const
110 {
111 if (matched) return thetaR_;
112 else return 180.0 - thetaR_;
113 }
114
115
116 // IO functions
117
120 };
121
122 typedef HashTable
123 <
128
129
130private:
131
132 // Private data
133
134 thetaPropsTable thetaProps_;
135
136
137public:
139 //- Runtime type information
140 TypeName("multiphaseEuler::alphaContactAngle");
141
142
143 // Constructors
144
145 //- Construct from patch and internal field
147 (
148 const fvPatch&,
150 );
151
152 //- Construct from patch, internal field and dictionary
154 (
155 const fvPatch&,
157 const dictionary&
158 );
159
160 //- Construct by mapping given alphaContactAngleFvPatchScalarField
161 // onto a new patch
163 (
165 const fvPatch&,
167 const fvPatchFieldMapper&
168 );
169
170 //- Construct as copy setting internal field reference
172 (
175 );
176
177 //- Return a clone
178 virtual tmp<fvPatchField<scalar>> clone() const
179 {
180 return fvPatchField<scalar>::Clone(*this);
181 }
182
183 //- Clone with an internal field reference
185 (
187 ) const
188 {
189 return fvPatchField<scalar>::Clone(*this, iF);
190 }
191
192
193 // Member functions
194
195 //- Return the contact angle properties
196 const thetaPropsTable& thetaProps() const
197 {
198 return thetaProps_;
199 }
200
201 //- Write
202 virtual void write(Ostream&) const;
203};
204
205
206// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207
208} // End namespace multiphaseEuler
209} // End namespace Foam
211// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212
213#endif
214
215// ************************************************************************* //
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
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.
HashTable< interfaceThetaProps, multiphaseSystem::interfacePair, multiphaseSystem::interfacePair::symmHash > thetaPropsTable
const thetaPropsTable & thetaProps() const
Return the contact angle properties.
alphaContactAngleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
TypeName("multiphaseEuler::alphaContactAngle")
Runtime type information.
Name pair for the interface.
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68