interfaceProperties.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-2022 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::interfaceProperties
26 
27 Description
28  Contains the interface properties. Surface tension, interface curvature,
29  and functionality to correct alpha contact angle boundary conditions.
30 
31 SourceFiles
32  interfaceProperties.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef interfaceProperties_H
37 #define interfaceProperties_H
38 
39 #include "IOdictionary.H"
40 #include "surfaceTensionModel.H"
41 #include "volFields.H"
42 #include "surfaceFields.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class interfaceProperties Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55  // Private Data
56 
57  //- Keep a reference to the phaseProperties dictionary
58  const dictionary& phasePropertiesDict_;
59 
60  //- Volume fraction of phase 1
61  volScalarField& alpha1_;
62 
63  //- Volume fraction of phase 2
64  volScalarField& alpha2_;
65 
66  //- Mixture velocity
67  const volVectorField& U_;
68 
69  //- Surface tension
71 
72  //- Stabilisation for normalisation of the interface normal
73  const dimensionedScalar deltaN_;
74 
75  //- ...
76  surfaceScalarField nHatf_;
77 
78  //- ...
79  volScalarField K_;
80 
81 
82  // Private Member Functions
83 
84  //- Correction for the boundary condition on the unit normal nHat on
85  // walls to produce the correct contact dynamic angle
86  // calculated from the component of U parallel to the wall
88  (
90  const surfaceVectorField::Boundary& gradAlphaf
91  );
92 
93  //- Re-calculate the interface curvature
94  void calculateK();
95 
96 
97 public:
98 
99  // Constructors
100 
101  //- Construct from dictionary, volume fraction fields and mixture
102  // velocity
104  (
105  const IOdictionary& dict,
106  volScalarField& alpha1,
107  volScalarField& alpha2,
108  const volVectorField& U
109  );
110 
111  //- Disallow default bitwise copy construction
112  interfaceProperties(const interfaceProperties&) = delete;
113 
114 
115  //- Destructor
116  virtual ~interfaceProperties()
117  {}
118 
119 
120  // Member Functions
121 
122  inline const volVectorField& U() const
123  {
124  return U_;
125  }
126 
127  const dimensionedScalar& deltaN() const
128  {
129  return deltaN_;
130  }
131 
132  const surfaceScalarField& nHatf() const
133  {
134  return nHatf_;
135  }
136 
137  tmp<volVectorField> n() const;
138 
139  tmp<volScalarField> sigmaK() const;
140 
142 
143  //- Indicator of the proximity of the interface
144  // Field values are 1 near and 0 away from the interface.
146 
147  //- Correct the curvature
148  void correct();
149 
150  //- Read phaseProperties dictionary
151  bool read();
152 
153 
154  // Member Operators
155 
156  //- Disallow default bitwise assignment
157  void operator=(const interfaceProperties&) = delete;
158 };
159 
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 } // End namespace Foam
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 #endif
168 
169 // ************************************************************************* //
Generic GeometricBoundaryField class.
Generic GeometricField class.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Correction for the boundary condition on the unit normal nHat on walls to produce the correct contact...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Contains the interface properties. Surface tension, interface curvature, and functionality to correct...
tmp< surfaceScalarField > surfaceTensionForce() const
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
void correct()
Correct the curvature.
interfaceProperties(const IOdictionary &dict, volScalarField &alpha1, volScalarField &alpha2, const volVectorField &U)
Construct from dictionary, volume fraction fields and mixture.
const volVectorField & U() const
const dimensionedScalar & deltaN() const
virtual ~interfaceProperties()
Destructor.
tmp< volVectorField > n() const
void operator=(const interfaceProperties &)=delete
Disallow default bitwise assignment.
tmp< volScalarField > sigmaK() const
bool read()
Read phaseProperties dictionary.
const surfaceScalarField & nHatf() const
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
dictionary dict
Foam::surfaceFields.