temperatureDependentAlphaContactAngleFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2015-2017 OpenFOAM Foundation
9  Copyright (C) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::temperatureDependentAlphaContactAngleFvPatchScalarField
29 
30 Description
31  Temperature-dependent alphaContactAngle scalar boundary condition.
32 
33  The contact angle is evaluated from the specified Foam::Function1 for the
34  temperature field looked-up from the mesh database the name of which
35  may optionally be provided.
36 
37 Usage
38  \table
39  Property | Description | Required | Default value
40  T | Temperature field name | no | T
41  theta0 | Contact angle function | yes |
42  \endtable
43 
44  Example of the boundary condition specification:
45  \verbatim
46  <patchName>
47  {
48  type temperatureDependentAlphaContactAngle;
49  theta0 constant 60;
50  }
51  \endverbatim
52 
53 See also
54  Foam::alphaContactAngleTwoPhaseFvPatchScalarField
55  Foam::constantAlphaContactAngleFvPatchScalarField
56  Foam::Function1
57 
58 SourceFiles
59  temperatureDependentAlphaContactAngleFvPatchScalarField.C
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef temperatureDependentAlphaContactAngleFvPatchScalarField_H
64 #define temperatureDependentAlphaContactAngleFvPatchScalarField_H
65 
67 #include "Function1.H"
68 
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 
71 namespace Foam
72 {
73 
74 /*---------------------------------------------------------------------------*\
75  Class temperatureDependentAlphaContactAngleFvPatch Declaration
76 \*---------------------------------------------------------------------------*/
77 
78 class temperatureDependentAlphaContactAngleFvPatchScalarField
79 :
80  public alphaContactAngleTwoPhaseFvPatchScalarField
81 {
82  // Private data
83 
84  //- Name of temperature field, default = "T"
85  word TName_;
86 
87  //- Equilibrium contact angle function
89 
90 
91 public:
92 
93  //- Runtime type information
94  TypeName("temperatureDependentAlphaContactAngle");
95 
96 
97  // Constructors
98 
99  //- Construct from patch and internal field
101  (
102  const fvPatch&,
104  );
105 
106  //- Construct from patch, internal field and dictionary
108  (
109  const fvPatch&,
111  const dictionary&
112  );
113 
114  //- Construct by mapping given
115  // temperatureDependentAlphaContactAngleFvPatchScalarField
116  // onto a new patch
118  (
120  const fvPatch&,
122  const fvPatchFieldMapper&
123  );
124 
125  //- Construct as copy
127  (
129  );
130 
131  //- Construct as copy setting internal field reference
133  (
136  );
137 
138  //- Return a clone
139  virtual tmp<fvPatchField<scalar>> clone() const
140  {
141  return fvPatchField<scalar>::Clone(*this);
142  }
143 
144  //- Clone with an internal field reference
146  (
148  ) const
149  {
150  return fvPatchField<scalar>::Clone(*this, iF);
151  }
152 
153 
154  // Member functions
155 
156  //- Return the equilibrium contact-angle
157  virtual tmp<scalarField> theta
158  (
159  const fvPatchVectorField& Up,
160  const fvsPatchVectorField& nHat
161  ) const;
162 
163  //- Write
164  virtual void write(Ostream&) const;
165 };
166 
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 } // End namespace Foam
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 #endif
175 
176 // ************************************************************************* //
fvsPatchField< vector > fvsPatchVectorField
fvPatchField< vector > fvPatchVectorField
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
temperatureDependentAlphaContactAngleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
virtual tmp< scalarField > theta(const fvPatchVectorField &Up, const fvsPatchVectorField &nHat) const
Return the equilibrium contact-angle.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:597
A FieldMapper for finite-volume patch fields.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
TypeName("temperatureDependentAlphaContactAngle")
Runtime type information.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.