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