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
88  autoPtr<Function1<scalar>> theta0_;
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 and return a clone
132  virtual tmp<fvPatchScalarField> clone() const
133  {
135  (
137  (
138  *this
139  )
140  );
141  }
142 
143  //- Construct as copy setting internal field reference
145  (
148  );
149 
150  //- Construct and return a clone setting internal field reference
152  (
154  ) const
155  {
157  (
159  (
160  *this,
161  iF
162  )
163  );
164  }
165 
166 
167  // Member functions
168 
169  //- Return the equilibrium contact-angle
170  virtual tmp<scalarField> theta
171  (
172  const fvPatchVectorField& Up,
173  const fvsPatchVectorField& nHat
174  ) const;
175 
176  //- Write
177  virtual void write(Ostream&) const;
178 };
179 
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 } // End namespace Foam
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************************************************************* //
Foam::fvPatchField< vector >
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: temperatureDependentAlphaContactAngleFvPatchScalarField.H:146
Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::temperatureDependentAlphaContactAngleFvPatchScalarField
temperatureDependentAlphaContactAngleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: temperatureDependentAlphaContactAngleFvPatchScalarField.C:38
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Function1.H
Foam::fvsPatchField
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Definition: fvsPatchField.H:68
Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::TypeName
TypeName("temperatureDependentAlphaContactAngle")
Runtime type information.
Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: temperatureDependentAlphaContactAngleFvPatchScalarField.C:122
Foam::alphaContactAngleTwoPhaseFvPatchScalarField
Abstract base class for two-phase alphaContactAngle boundary conditions.
Definition: alphaContactAngleTwoPhaseFvPatchScalarField.H:78
Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::theta
virtual tmp< scalarField > theta(const fvPatchVectorField &Up, const fvsPatchVectorField &nHat) const
Return the equilibrium contact-angle.
Definition: temperatureDependentAlphaContactAngleFvPatchScalarField.C:109
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
alphaContactAngleTwoPhaseFvPatchScalarField.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
Foam::temperatureDependentAlphaContactAngleFvPatchScalarField
Temperature-dependent alphaContactAngle scalar boundary condition.
Definition: temperatureDependentAlphaContactAngleFvPatchScalarField.H:92