filmContactAngleFvPatchScalarField.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) 2023 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::filmContactAngleFvPatchScalarField
26 
27 Description
28  Film contact angle boundary condition.
29 
30 Usage
31  Examples of the contact angle specification:
32 
33  Simple constant equilibrium contact angle:
34  \verbatim
35  <patchName>
36  {
37  type filmContactAngle;
38 
39  contactAngle
40  {
41  type constant;
42  theta0 70;
43  }
44  }
45  \endverbatim
46 
47  Same as above but using the simpler specification:
48  \verbatim
49  <patchName>
50  {
51  type filmContactAngle;
52 
53  theta0 70;
54  }
55  \endverbatim
56 
57  Dynamic contact angle evaluated from the velocity:
58  \verbatim
59  <patchName>
60  {
61  type filmContactAngle;
62 
63  contactAngle
64  {
65  type dynamic;
66  uTheta 1;
67  theta0 70;
68  thetaAdv 100;
69  thetaRec 50;
70  }
71  }
72  \endverbatim
73 
74 See also
75  Foam::contactAngleModel
76  Foam::contactAngleModels::constant
77  Foam::contactAngleModels::dynamic
78 
79 SourceFiles
80  filmContactAngleFvPatchScalarField.C
81 
82 \*---------------------------------------------------------------------------*/
83 
84 #ifndef filmContactAngleFvPatchScalarField_H
85 #define filmContactAngleFvPatchScalarField_H
86 
88 #include "contactAngleModel.H"
89 
90 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91 
92 namespace Foam
93 {
94 
95 /*---------------------------------------------------------------------------*\
96  Class filmContactAngleFvPatchScalarField Declaration
97 \*---------------------------------------------------------------------------*/
98 
100 :
101  public zeroGradientFvPatchScalarField
102 {
103  // Private Data
104 
105  //- Equilibrium contact angle function
106  autoPtr<contactAngleModel> contactAngle_;
107 
108 
109 public:
110 
111  //- Runtime type information
112  TypeName("filmContactAngle");
113 
114 
115  // Constructors
116 
117  //- Construct from patch, internal field and dictionary
119  (
120  const fvPatch&,
122  const dictionary&
123  );
124 
125  //- Construct by mapping given filmContactAngleFvPatchScalarField
126  // onto a new patch
128  (
130  const fvPatch&,
132  const fvPatchFieldMapper&
133  );
134 
135  //- Disallow copy without setting internal field reference
137  (
139  ) = delete;
140 
141  //- Copy constructor setting internal field reference
143  (
146  );
147 
148 
149  // Member Functions
150 
151  //- Return the cosine of the contact angle
153  (
154  const fvPatchVectorField& Up,
155  const vectorField& nHat
156  ) const;
157 
158  //- Write
159  virtual void write(Ostream&) const;
160 };
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace Foam
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
TypeName("filmContactAngle")
Runtime type information.
tmp< scalarField > cosTheta(const fvPatchVectorField &Up, const vectorField &nHat) const
Return the cosine of the contact angle.
filmContactAngleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
Foam::fvPatchFieldMapper.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:87
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.