alphaContactAngleFvPatchScalarField.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) 2011-2018 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::alphaContactAngleFvPatchScalarField
26 
27 Description
28  Abstract base class for alphaContactAngle boundary conditions.
29 
30  Derived classes must implement the theta() function which returns the
31  wall contact angle field.
32 
33  The essential entry "limit" controls the gradient of alpha1 on the wall:
34  - none - Calculate the gradient from the contact-angle without limiter
35  - gradient - Limit the wall-gradient such that alpha1 remains bounded
36  on the wall
37  - alpha - Bound the calculated alpha1 on the wall
38  - zeroGradient - Set the gradient of alpha1 to 0 on the wall, i.e.
39  reproduce previous behaviour, the pressure BCs can be left as before.
40 
41  Note that if any of the first three options are used the boundary condition
42  on \c p_rgh must set to guarantee that the flux is corrected to be zero at
43  the wall e.g.:
44 
45  \verbatim
46  <patchName>
47  {
48  type alphaContactAngle;
49  limit none;
50  }
51  \endverbatim
52 
53 SourceFiles
54  alphaContactAngleFvPatchScalarField.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef alphaContactAngleFvPatchScalarField_H
59 #define alphaContactAngleFvPatchScalarField_H
60 
62 #include "fvsPatchFields.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class alphaContactAngleFvPatchScalarField Declaration
71 \*---------------------------------------------------------------------------*/
72 
74 :
75  public fixedGradientFvPatchScalarField
76 {
77 
78 public:
79 
80  //- Runtime type information
81  TypeName("alphaContactAngle");
82 
83  //- Alpha limit options
84  enum limitControls
85  {
89  lcAlpha
90  };
91 
94 
95  // Constructors
96 
97  //- Construct from patch and internal field
99  (
100  const fvPatch&,
102  );
103 
104  //- Construct from patch, internal field and dictionary
106  (
107  const fvPatch&,
109  const dictionary&
110  );
111 
112  //- Construct by mapping given alphaContactAngleFvPatchScalarField
113  // onto a new patch
115  (
117  const fvPatch&,
119  const fvPatchFieldMapper&
120  );
121 
122  //- Construct as copy
124  (
126  );
127 
128  //- Construct as copy setting internal field reference
130  (
133  );
134 
135 
136  // Member functions
137 
138  //- Return the contact angle
139  virtual tmp<scalarField> theta
140  (
141  const fvPatchVectorField& Up,
142  const fvsPatchVectorField& nHat
143  ) const = 0;
144 
145  //- Evaluate the patch field
146  virtual void evaluate
147  (
149  );
150 
151  //- Write
152  virtual void write(Ostream&) const;
153 };
154 
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 } // End namespace Foam
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 #endif
163 
164 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
commsTypes
Types of communications.
Definition: UPstream.H:64
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:66
TypeName("alphaContactAngle")
Runtime type information.
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
static const NamedEnum< limitControls, 4 > limitControlNames_
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Abstract base class for alphaContactAngle boundary conditions.
virtual tmp< scalarField > theta(const fvPatchVectorField &Up, const fvsPatchVectorField &nHat) const =0
Return the contact angle.
alphaContactAngleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
Definition: PtrList.H:53
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Definition: fvsPatchField.H:65
Namespace for OpenFOAM.