constantContactAngle.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::constant
26 
27 Description
28  Uniform constant contact angle model.
29 
30 Usage
31  Example of the contact angle specification:
32  \verbatim
33  contactAngle
34  {
35  type constant;
36  theta0 70;
37  }
38  \endverbatim
39 
40 See also
41  Foam::contactAngleModel
42 
43 SourceFiles
44  constantContactAngle.C
45 
46 \*---------------------------------------------------------------------------*/
47 
48 #ifndef constantContactAngle_H
49 #define constantContactAngle_H
50 
51 #include "contactAngleModel.H"
52 
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 
55 namespace Foam
56 {
57 
58 namespace contactAngleModels
59 {
60 
61 /*---------------------------------------------------------------------------*\
62  Class constant Declaration
63 \*---------------------------------------------------------------------------*/
64 
65 class constant
66 :
67  public contactAngleModel
68 {
69  // Private Data
70 
71  //- Equilibrium contact angle
72  scalar theta0_;
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("constant");
79 
80 
81  // Constructors
82 
83  //- Construct from dictionary
84  constant(const dictionary& dict);
85 
86  //- Construct and return a clone
87  virtual autoPtr<contactAngleModel> clone() const
88  {
89  return autoPtr<contactAngleModel>(new constant(*this));
90  }
91 
92 
93  //- Destructor
94  virtual ~constant();
95 
96 
97  // Member Functions
98 
99  //- Cosine of the contact angle
100  virtual tmp<scalarField> cosTheta
101  (
102  const fvPatchVectorField& Up,
103  const vectorField& nHat
104  ) const;
105 
106  //- Write data in dictionary format
107  virtual void write(Ostream& os) const;
108 };
109 
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace contactAngleModels
114 } // End namespace Foam
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 #endif
119 
120 // ************************************************************************* //
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
Abstract base-class for contact-angle models which return the cosine contact angle field.
Uniform constant contact angle model.
constant(const dictionary &dict)
Construct from dictionary.
virtual autoPtr< contactAngleModel > clone() const
Construct and return a clone.
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.
TypeName("constant")
Runtime type information.
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