alphaContactAngleFvPatchScalarField.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 | Copyright (C) 2011-2016 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 Group
28  grpWallBoundaryConditions grpGenericBoundaryConditions
29 
30 Description
31  Abstract base class for alphaContactAngle boundary conditions.
32 
33  Derived classes must implement the theta() fuction which returns the
34  wall contact angle field.
35 
36  The essential entry "limit" controls the gradient of alpha1 on the wall:
37  - none - Calculate the gradient from the contact-angle without limiter
38  - gradient - Limit the wall-gradient such that alpha1 remains bounded
39  on the wall
40  - alpha - Bound the calculated alpha1 on the wall
41  - zeroGradient - Set the gradient of alpha1 to 0 on the wall, i.e.
42  reproduce previous behaviour, the pressure BCs can be left as before.
43 
44  Note that if any of the first three options are used the boundary condition
45  on \c p_rgh must set to guarantee that the flux is corrected to be zero at
46  the wall e.g.:
47 
48  \verbatim
49  <patchName>
50  {
51  type alphaContactAngle;
52  limit none;
53  }
54  \endverbatim
55 
56 SourceFiles
57  alphaContactAngleFvPatchScalarField.C
58 
59 \*---------------------------------------------------------------------------*/
60 
61 #ifndef alphaContactAngleFvPatchScalarField_H
62 #define alphaContactAngleFvPatchScalarField_H
63 
65 #include "fvsPatchFields.H"
66 
67 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 
69 namespace Foam
70 {
71 
72 /*---------------------------------------------------------------------------*\
73  Class alphaContactAngleFvPatchScalarField Declaration
74 \*---------------------------------------------------------------------------*/
75 
77 :
78  public fixedGradientFvPatchScalarField
79 {
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("alphaContactAngle");
85 
86  //- Alpha limit options
87  enum limitControls
88  {
92  lcAlpha
93  };
94 
97 
98  // Constructors
99 
100  //- Construct from patch and internal field
102  (
103  const fvPatch&,
105  );
106 
107  //- Construct from patch, internal field and dictionary
109  (
110  const fvPatch&,
112  const dictionary&
113  );
114 
115  //- Construct by mapping given alphaContactAngleFvPatchScalarField
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 
139  // Member functions
140 
141  //- Return the contact angle
142  virtual tmp<scalarField> theta
143  (
144  const fvPatchVectorField& Up,
145  const fvsPatchVectorField& nHat
146  ) const = 0;
147 
148  //- Evaluate the patch field
149  virtual void evaluate
150  (
151  const Pstream::commsTypes commsType=Pstream::blocking
152  );
153 
154  //- Write
155  virtual void write(Ostream&) const;
156 };
157 
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #endif
166 
167 // ************************************************************************* //
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:65
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
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.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::blocking)
Evaluate the patch field.
alphaContactAngleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
Definition: PtrList.H:54
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.