dynamicAlphaContactAngleFvPatchScalarField.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-2020 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::dynamicAlphaContactAngleFvPatchScalarField
26 
27 Description
28  A dynamic alphaContactAngle scalar boundary condition
29 
30 Usage
31  Standard properties:
32  \table
33  Property | Description | Required | Default value
34  theta0 | Equilibrium contact angle | yes |
35  uTheta | Velocity scale | yes |
36  \endtable
37 
38  The advancing and receding contact angles can be either specified with
39  respect to the interface normal direction:
40  \table
41  Property | Description | Required | Default value
42  thetaA | Limiting advancing contact angle | yes |
43  thetaR | Limiting receding contact angle | yes |
44  \endtable
45 
46  or with respect to the phase outward direction:
47  \table
48  Property | Description | Required | Default value
49  thetaAdv | Limiting advancing contact angle | yes |
50  thetaRec | Limiting receding contact angle | yes |
51  \endtable
52 
53  Example of the boundary condition specification using the interface
54  normal direction convention:
55  \verbatim
56  <patchName>
57  {
58  type dynamicAlphaContactAngle;
59  uTheta 1;
60  theta0 90;
61  thetaA 70;
62  thetaR 110;
63  limit gradient;
64  value uniform 0;
65  }
66  \endverbatim
67 
68  Example of the boundary condition specification using the phase outward
69  direction convention (opposite to the normal direction):
70  \verbatim
71  <patchName>
72  {
73  type dynamicAlphaContactAngle;
74  uTheta 1;
75  theta0 90;
76  thetaAdv 110;
77  thetaRec 70;
78  limit gradient;
79  value uniform 0;
80  }
81  \endverbatim
82 
83 See also
84  Foam::alphaContactAngleFvPatchScalarField
85  Foam::constantAlphaContactAngleFvPatchScalarField
86 
87 SourceFiles
88  dynamicAlphaContactAngleFvPatchScalarField.C
89 
90 \*---------------------------------------------------------------------------*/
91 
92 #ifndef dynamicAlphaContactAngleFvPatchScalarField_H
93 #define dynamicAlphaContactAngleFvPatchScalarField_H
94 
95 #include "alphaContactAngleFvPatchScalarField.H"
96 
97 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98 
99 namespace Foam
100 {
101 
102 /*---------------------------------------------------------------------------*\
103  Class dynamicAlphaContactAngleFvPatch Declaration
104 \*---------------------------------------------------------------------------*/
105 
106 class dynamicAlphaContactAngleFvPatchScalarField
107 :
108  public alphaContactAngleFvPatchScalarField
109 {
110  // Private Data
111 
112  //- Equilibrium contact angle
113  scalar theta0_;
114 
115  //- Dynamic contact angle velocity scale
116  scalar uTheta_;
117 
118  //- Limiting advancing contact angle
119  scalar thetaA_;
120 
121  //- Limiting receding contact angle
122  scalar thetaR_;
123 
124 
125 public:
126 
127  //- Runtime type information
128  TypeName("dynamicAlphaContactAngle");
129 
130 
131  // Constructors
132 
133  //- Construct from patch and internal field
135  (
136  const fvPatch&,
137  const DimensionedField<scalar, volMesh>&
138  );
139 
140  //- Construct from patch, internal field and dictionary
142  (
143  const fvPatch&,
144  const DimensionedField<scalar, volMesh>&,
145  const dictionary&
146  );
147 
148  //- Construct by mapping given
149  // dynamicAlphaContactAngleFvPatchScalarField
150  // onto a new patch
152  (
154  const fvPatch&,
156  const fvPatchFieldMapper&
157  );
158 
159  //- Disallow copy without setting internal field reference
161  (
163  ) = delete;
164 
165  //- Copy constructor setting internal field reference
167  (
170  );
171 
172  //- Construct and return a clone setting internal field reference
174  (
176  ) const
177  {
179  (
181  );
182  }
183 
184 
185  // Member Functions
186 
187  //- Evaluate and return dynamic contact-angle
188  virtual tmp<scalarField> theta
189  (
190  const fvPatchVectorField& Up,
191  const fvsPatchVectorField& nHat
192  ) const;
193 
194  //- Write
195  virtual void write(Ostream&) const;
196 };
197 
198 
199 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200 
201 } // End namespace Foam
202 
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 
205 #endif
206 
207 // ************************************************************************* //
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:62
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:66
A dynamic alphaContactAngle scalar boundary condition.
Foam::fvPatchFieldMapper.
dynamicAlphaContactAngleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
TypeName("dynamicAlphaContactAngle")
Runtime type information.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: PtrList.H:53
virtual tmp< scalarField > theta(const fvPatchVectorField &Up, const fvsPatchVectorField &nHat) const
Evaluate and return dynamic contact-angle.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Definition: fvsPatchField.H:65
Namespace for OpenFOAM.