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) 2013 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::alphaContactAngleFvPatchScalarField
28
29Description
30 Contact-angle boundary condition for multi-phase interface-capturing
31 simulations. Used in conjunction with multiphaseMixture.
32
33SourceFiles
34 alphaContactAngleFvPatchScalarField.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef alphaContactAngleFvPatchScalarField_H
39#define alphaContactAngleFvPatchScalarField_H
40
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
49/*---------------------------------------------------------------------------*\
50 Class alphaContactAngleFvPatch Declaration
51\*---------------------------------------------------------------------------*/
52
55 public zeroGradientFvPatchScalarField
56{
57public:
58
60 {
61 //- Equilibrium contact angle
62 scalar theta0_;
63
64 //- Dynamic contact angle velocity scale
65 scalar uTheta_;
66
67 //- Limiting advancing contact angle
68 scalar thetaA_;
69
70 //- Limiting receding contact angle
71 scalar thetaR_;
72
73
74 public:
75
76 // Constructors
78 {}
79
82
83 // Member functions
84
85 //- Return the equilibrium contact angle theta0
86 scalar theta0(bool matched=true) const
87 {
88 if (matched) return theta0_;
89 else return 180.0 - theta0_;
90 }
92 //- Return the dynamic contact angle velocity scale
93 scalar uTheta() const
94 {
95 return uTheta_;
96 }
97
98 //- Return the limiting advancing contact angle
99 scalar thetaA(bool matched=true) const
101 if (matched) return thetaA_;
102 else return 180.0 - thetaA_;
103 }
104
105 //- Return the limiting receding contact angle
106 scalar thetaR(bool matched=true) const
107 {
108 if (matched) return thetaR_;
109 else return 180.0 - thetaR_;
110 }
111
112
113 // IO functions
114
117 };
118
119 typedef HashTable
120 <
125
127private:
128
129 // Private data
130
131 thetaPropsTable thetaProps_;
132
133
134public:
136 //- Runtime type information
137 TypeName("alphaContactAngle");
138
139
140 // Constructors
141
142 //- Construct from patch and internal field
144 (
145 const fvPatch&,
147 );
148
149 //- Construct from patch, internal field and dictionary
151 (
152 const fvPatch&,
154 const dictionary&
155 );
156
157 //- Construct by mapping given alphaContactAngleFvPatchScalarField
158 // onto a new patch
160 (
162 const fvPatch&,
164 const fvPatchFieldMapper&
165 );
166
167 //- Construct as copy setting internal field reference
169 (
172 );
173
174 //- Return a clone
175 virtual tmp<fvPatchField<scalar>> clone() const
176 {
177 return fvPatchField<scalar>::Clone(*this);
178 }
180 //- Clone with an internal field reference
182 (
184 ) const
185 {
186 return fvPatchField<scalar>::Clone(*this, iF);
187 }
188
189
190 // Member functions
191
192 //- Return the contact angle properties
193 const thetaPropsTable& thetaProps() const
194 {
195 return thetaProps_;
196 }
197
198 //- Write
199 virtual void write(Ostream&) const;
200};
201
202
203// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204
205} // End namespace Foam
206
207// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208
209#endif
210
211// ************************************************************************* //
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
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.
friend Istream & operator>>(Istream &, interfaceThetaProps &)
friend Ostream & operator<<(Ostream &, const interfaceThetaProps &)
scalar uTheta() const
Return the dynamic contact angle velocity scale.
alphaContactAngleFvPatchScalarField(const alphaContactAngleFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
Construct as copy setting internal field reference.
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, multiphaseMixtureThermo::interfacePair, multiphaseMixtureThermo::interfacePair::hash > thetaPropsTable
alphaContactAngleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
TypeName("alphaContactAngle")
Runtime type information.
const thetaPropsTable & thetaProps() const
Return the contact angle properties.
alphaContactAngleFvPatchScalarField(const alphaContactAngleFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
Construct by mapping given alphaContactAngleFvPatchScalarField.
alphaContactAngleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &) const
Write.
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
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