alphaContactAngleTwoPhaseFvPatchScalarField.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) 2011-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::alphaContactAngleTwoPhaseFvPatchScalarField
29 
30 Group
31  grpWallBoundaryConditions grpGenericBoundaryConditions
32 
33 Description
34  Abstract base class for two-phase alphaContactAngle boundary conditions.
35 
36  Derived classes must implement the theta() function which returns the
37  wall contact angle field.
38 
39  The essential entry "limit" controls the gradient of alpha1 on the wall:
40  - none - Calculate the gradient from the contact-angle without limiter
41  - gradient - Limit the wall-gradient such that alpha1 remains bounded
42  on the wall
43  - alpha - Bound the calculated alpha1 on the wall
44  - zeroGradient - Set the gradient of alpha1 to 0 on the wall, i.e.
45  reproduce previous behaviour, the pressure BCs can be left as before.
46 
47  Note that if any of the first three options are used the boundary condition
48  on \c p_rgh must set to guarantee that the flux is corrected to be zero at
49  the wall e.g.:
50 
51  \verbatim
52  <patchName>
53  {
54  type alphaContactAngle;
55  limit none;
56  }
57  \endverbatim
58 
59 SourceFiles
60  alphaContactAngleTwoPhaseFvPatchScalarField.C
61 
62 \*---------------------------------------------------------------------------*/
63 
64 #ifndef alphaContactAngleTwoPhaseFvPatchScalarField_H
65 #define alphaContactAngleTwoPhaseFvPatchScalarField_H
66 
68 #include "fvsPatchFields.H"
69 
70 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 
72 namespace Foam
73 {
74 
75 /*---------------------------------------------------------------------------*\
76  Class alphaContactAngleTwoPhaseFvPatchScalarField Declaration
77 \*---------------------------------------------------------------------------*/
78 
80 :
81  public fixedGradientFvPatchScalarField
82 {
84  typedef fixedGradientFvPatchScalarField parent_bctype;
85 
86 public:
87 
88  // Abstract class, no runtime information
89 
90  //- Alpha limit options
92  {
94  lcGradient,
97  };
98 
101 
102  // Constructors
103 
104  //- Construct from patch and internal field
106  (
107  const fvPatch&,
109  );
110 
111  //- Construct from patch, internal field and dictionary
113  (
114  const fvPatch&,
116  const dictionary&
117  );
118 
119  //- Construct by mapping onto a new patch
121  (
122  const this_bctype&,
123  const fvPatch&,
125  const fvPatchFieldMapper&
126  );
127 
128  //- Construct as copy setting internal field reference
130  (
131  const this_bctype&,
133  );
134 
135  //- No copy without an internal field
137  (
138  const this_bctype&
139  ) = delete;
140 
141 
142  // Member Functions
143 
144  //- Return the contact angle
145  virtual tmp<scalarField> theta
146  (
147  const fvPatchVectorField& Up,
148  const fvsPatchVectorField& nHat
149  ) const = 0;
150 
151  //- Evaluate the patch field
152  virtual void evaluate
153  (
155  );
156 
157  //- Write
158  virtual void write(Ostream& os) const;
159 
160 
161  // Member Operators
162 
163  //- Inherit assignment operators
165 };
166 
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 } // End namespace Foam
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 #endif
175 
176 // ************************************************************************* //
commsTypes
Communications types.
Definition: UPstream.H:81
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:130
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
A FieldMapper for finite-volume patch fields.
Abstract base class for two-phase alphaContactAngle boundary conditions.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field.
alphaContactAngleTwoPhaseFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual tmp< scalarField > theta(const fvPatchVectorField &Up, const fvsPatchVectorField &nHat) const =0
Return the contact angle.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: HashPtrTable.H:50
"buffered" : (MPI_Bsend, MPI_Recv)
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Namespace for OpenFOAM.