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  const volScalarField& alpha1_;
70  const volVectorField& U_;
71  surfaceScalarField nHatf_;
72  volScalarField K_;
73 
74 
75  // Private Member Functions
76 
77  //- Correction for the boundary condition on the unit normal nHat on
78  // walls to produce the correct contact dynamic angle
79  // calculated from the component of U parallel to the wall
80  void correctContactAngle
81  (
82  surfaceVectorField::Boundary& nHat,
83  const surfaceVectorField::Boundary& gradAlphaf
84  ) const;
85 
86  //- Re-calculate the interface curvature
87  void calculateK();
88 
89 
90 public:
91 
92  // Constructors
93 
94  //- Construct from volume fraction field gamma and IOdictionary
96  (
97  const volScalarField& alpha1,
98  const volVectorField& U,
99  const IOdictionary&
100  );
101 
102  //- Disallow default bitwise copy construction
103  interfaceProperties(const interfaceProperties&) = delete;
104 
105 
106  // Member Functions
108  const dimensionedScalar& deltaN() const
109  {
110  return deltaN_;
111  }
113  const surfaceScalarField& nHatf() const
114  {
115  return nHatf_;
116  }
117 
118  tmp<volScalarField> sigmaK() const;
119 
121 
122  //- Indicator of the proximity of the interface
123  // Field values are 1 near and 0 away for the interface.
125 
126  void correct();
127 
128  //- Read transportProperties dictionary
129  bool read();
130 
131 
132  // Member Operators
133 
134  //- Disallow default bitwise assignment
135  void operator=(const interfaceProperties&) = delete;
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #endif
146 
147 // ************************************************************************* //
Foam::surfaceFields.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
bool read()
Read transportProperties dictionary.
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
tmp< surfaceScalarField > surfaceTensionForce() const
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:52
const surfaceScalarField & nHatf() const
volScalarField & alpha1(mixture.alpha1())
Contains the interface properties.
tmp< volScalarField > sigmaK() const
interfaceProperties(const volScalarField &alpha1, const volVectorField &U, const IOdictionary &)
Construct from volume fraction field gamma and IOdictionary.
U
Definition: pEqn.H:72
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.