gravitationalContactAngle.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::contactAngleModels::gravitational
26 
27 Description
28  Gravitational acceleration based contact angle model.
29 
30 Usage:
31  \table
32  Property | Description | Required | Default value
33  theta0 | Equilibrium contact angle | yes |
34  gTheta | Gravitational acceleration scale | yes |
35  thetaAdv | Limiting advancing contact angle | yes |
36  thetaRec | Limiting receding contact angle | yes |
37  \endtable
38 
39  Example:
40  \verbatim
41  contactAngle
42  {
43  type gravitational;
44  gTheta 0.1;
45  theta0 70;
46  thetaAdv 100;
47  thetaRec 50;
48  }
49  \endverbatim
50 
51 See also
52  Foam::contactAngleModel
53 
54 SourceFiles
55  gravitationalContactAngle.C
56 
57 \*---------------------------------------------------------------------------*/
58 
59 #ifndef gravitationalContactAngle_H
60 #define gravitationalContactAngle_H
61 
62 #include "contactAngleModel.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 
69 namespace contactAngleModels
70 {
71 
72 /*---------------------------------------------------------------------------*\
73  Class gravitational Declaration
74 \*---------------------------------------------------------------------------*/
75 
76 class gravitational
77 :
78  public contactAngleModel
79 {
80  // Private Data
81 
82  //- Equilibrium contact angle
83  scalar theta0_;
84 
85  //- Gavitational acceleration scale
86  scalar gTheta_;
87 
88  //- Limiting advancing contact angle
89  scalar thetaAdv_;
90 
91  //- Limiting receding contact angle
92  scalar thetaRec_;
93 
94 
95 public:
96 
97  //- Runtime type information
98  TypeName("gravitational");
99 
100 
101  // Constructors
102 
103  //- Construct from dictionary
104  gravitational(const dictionary& dict);
105 
106  //- Construct and return a clone
107  virtual autoPtr<contactAngleModel> clone() const
108  {
109  return autoPtr<contactAngleModel>(new gravitational(*this));
110  }
111 
112 
113  //- Destructor
114  virtual ~gravitational();
115 
116 
117  // Member Functions
118 
119  //- Cosine of the contact angle
120  virtual tmp<scalarField> cosTheta
121  (
123  const vectorField& nHat
124  ) const;
125 
126  //- Write data in dictionary format
127  virtual void write(Ostream& os) const;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace contactAngleModels
134 } // End namespace Foam
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
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
virtual autoPtr< contactAngleModel > clone() const
Construct and return a clone.
TypeName("gravitational")
Runtime type information.
virtual void write(Ostream &os) const
Write data in dictionary format.
virtual tmp< scalarField > cosTheta(const fvPatchVectorField &Up, const vectorField &nHat) const
Cosine of the contact angle.
gravitational(const dictionary &dict)
Construct from dictionary.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:87
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
dictionary dict