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-2019 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  //- Compression coefficient
64  scalar cAlpha_;
65 
66  //- Surface tension
68 
69  //- Stabilisation for normalisation of the interface normal
70  const dimensionedScalar deltaN_;
71 
72  const volScalarField& alpha1_;
73  const volVectorField& U_;
74  surfaceScalarField nHatf_;
75  volScalarField K_;
76 
77 
78  // Private Member Functions
79 
80  //- Correction for the boundary condition on the unit normal nHat on
81  // walls to produce the correct contact dynamic angle
82  // calculated from the component of U parallel to the wall
83  void correctContactAngle
84  (
85  surfaceVectorField::Boundary& nHat,
86  const surfaceVectorField::Boundary& gradAlphaf
87  ) const;
88 
89  //- Re-calculate the interface curvature
90  void calculateK();
91 
92 
93 public:
94 
95  //- Conversion factor for degrees into radians
96  static const scalar convertToRad;
97 
98 
99  // Constructors
100 
101  //- Construct from volume fraction field gamma and IOdictionary
103  (
104  const volScalarField& alpha1,
105  const volVectorField& U,
106  const IOdictionary&
107  );
108 
109  //- Disallow default bitwise copy construction
110  interfaceProperties(const interfaceProperties&) = delete;
111 
112 
113  // Member Functions
115  scalar cAlpha() const
116  {
117  return cAlpha_;
118  }
120  const dimensionedScalar& deltaN() const
121  {
122  return deltaN_;
123  }
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 for the interface.
137 
138  void correct();
139 
140  //- Read transportProperties dictionary
141  bool read();
142 
143 
144  // Member Operators
145 
146  //- Disallow default bitwise assignment
147  void operator=(const interfaceProperties&) = delete;
148 };
149 
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 } // End namespace Foam
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 #endif
158 
159 // ************************************************************************* //
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
Contains the interface properties.
const volScalarField & alpha1
static const scalar convertToRad
Conversion factor for degrees into radians.
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.