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-2020 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 transportProperties dictionary
61  const dictionary& transportPropertiesDict_;
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
81  void correctContactAngle
82  (
83  surfaceVectorField::Boundary& nHat,
84  const surfaceVectorField::Boundary& gradAlphaf
85  );
86 
87  //- Re-calculate the interface curvature
88  void calculateK();
89 
90 
91 public:
92 
93  // Constructors
94 
95  //- Construct from volume fraction field gamma and IOdictionary
97  (
100  const volVectorField& U,
101  const IOdictionary&
102  );
103 
104  //- Disallow default bitwise copy construction
105  interfaceProperties(const interfaceProperties&) = delete;
106 
107 
108  // Member Functions
110  const dimensionedScalar& deltaN() const
111  {
112  return deltaN_;
113  }
115  const surfaceScalarField& nHatf() const
116  {
117  return nHatf_;
118  }
119 
120  tmp<volScalarField> sigmaK() const;
121 
123 
124  //- Indicator of the proximity of the interface
125  // Field values are 1 near and 0 away for the interface.
127 
128  void correct();
129 
130  //- Read transportProperties dictionary
131  bool read();
132 
133 
134  // Member Operators
135 
136  //- Disallow default bitwise assignment
137  void operator=(const interfaceProperties&) = delete;
138 };
139 
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 } // End namespace Foam
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 #endif
148 
149 // ************************************************************************* //
Foam::surfaceFields.
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 transportProperties dictionary.
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.
tmp< volScalarField > sigmaK() const
U
Definition: pEqn.H:72
interfaceProperties(volScalarField &alpha1, volScalarField &alpha2, const volVectorField &U, const IOdictionary &)
Construct from volume fraction field gamma and IOdictionary.
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.