alphaContactAngleFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::alphaContactAngleFvPatchScalarField
26 
27 Description
28  Contact-angle boundary condition for multi-phase interface-capturing
29  simulations.
30 
31 SourceFiles
32  alphaContactAngleFvPatchScalarField.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef alphaContactAngleFvPatchScalarField_H
37 #define alphaContactAngleFvPatchScalarField_H
38 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class alphaContactAngleFvPatchScalarField Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
52  public zeroGradientFvPatchScalarField
53 {
54 public:
55 
57  {
58  // Private Data
59 
60  //- Equilibrium contact angle
61  scalar theta0_;
62 
63  //- Is this contact angle dynamic?
64  bool dynamic_;
65 
66  //- Dynamic contact angle velocity scale
67  scalar uTheta_;
68 
69  //- Limiting advancing contact angle
70  scalar thetaA_;
71 
72  //- Limiting receding contact angle
73  scalar thetaR_;
74 
75 
76  public:
77 
78  // Constructors
79 
80  //- Construct null
82 
83  //- Construct non-dynamic properties from components
84  contactAngleProperties(const scalar theta0);
85 
86  //- Construct dynamic properties from components
88  (
89  const scalar theta0,
90  const scalar uTheta,
91  const scalar thetaA,
92  const scalar thetaR
93  );
94 
95  //- Construct from a dictionary
97 
98 
99  // Member Functions
100 
101  // Access
102 
103  //- Return the equilibrium contact angle theta0
104  inline scalar theta0() const
105  {
106  return theta0_;
107  }
108 
109  //- Return if this contact angle is dynamic
110  inline bool dynamic() const
111  {
112  return dynamic_;
113  }
114 
115  //- Return the dynamic contact angle velocity scale
116  inline scalar uTheta() const
117  {
118  return uTheta_;
119  }
120 
121  //- Return the limiting advancing contact angle
122  inline scalar thetaA() const
123  {
124  return thetaA_;
125  }
126 
127  //- Return the limiting receding contact angle
128  inline scalar thetaR() const
129  {
130  return thetaR_;
131  }
132 
133 
134  //- Return the contact angle properties for the reverse of this
135  // interface (e.g., convert air_water to water_air).
137 
138  //- Write to stream
139  void write(Ostream& os) const;
140 
141 
142  // Member operators
143 
144  //- Check equality between two sets of contact angle properties
145  bool operator==(const contactAngleProperties& thetaProps) const;
146 
147  //- Check inequality between two sets of contact angle properties
148  bool operator!=(const contactAngleProperties& thetaProps) const;
149  };
150 
151 
152 private:
153 
154  // Private Data
155 
156  //- Table of contact angle properties
158 
159 
160 public:
161 
162  //- Runtime type information
163  TypeName("alphaContactAngle");
164 
165 
166  // Constructors
167 
168  //- Construct from patch and internal field
170  (
171  const fvPatch&,
173  );
174 
175  //- Construct from patch, internal field and dictionary
177  (
178  const fvPatch&,
180  const dictionary&
181  );
182 
183  //- Construct by mapping given alphaContactAngleFvPatchScalarField
184  // onto a new patch
186  (
188  const fvPatch&,
190  const fvPatchFieldMapper&
191  );
192 
193  //- Construct as copy setting internal field reference
195  (
198  );
199 
200  //- Construct and return a clone setting internal field reference
202  (
204  ) const
205  {
207  (
209  );
210  }
211 
212 
213  // Member Functions
214 
215  //- Return the contact angle properties
217  {
218  return thetaProps_;
219  }
220 
221  //- Write
222  virtual void write(Ostream&) const;
223 };
224 
225 
226 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
227 
228 } // End namespace Foam
229 
230 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
231 
232 #endif
233 
234 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
bool operator!=(const contactAngleProperties &thetaProps) const
Check inequality between two sets of contact angle properties.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:63
scalar thetaR() const
Return the limiting receding contact angle.
scalar theta0() const
Return the equilibrium contact angle theta0.
const HashTable< contactAngleProperties > & thetaProps() const
Return the contact angle properties.
TypeName("alphaContactAngle")
Runtime type information.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
Foam::fvPatchFieldMapper.
contactAngleProperties reversed() const
Return the contact angle properties for the reverse of this.
An STL-conforming hash table.
Definition: HashTable.H:61
scalar uTheta() const
Return the dynamic contact angle velocity scale.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
bool operator==(const contactAngleProperties &thetaProps) const
Check equality between two sets of contact angle properties.
scalar thetaA() const
Return the limiting advancing contact angle.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Contact-angle boundary condition for multi-phase interface-capturing simulations. ...
alphaContactAngleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.