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-2018 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  //- Disallow default bitwise copy construct and assignment
82  void operator=(const interfaceProperties&);
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
87  void correctContactAngle
88  (
89  surfaceVectorField::Boundary& nHat,
90  const surfaceVectorField::Boundary& gradAlphaf
91  ) const;
92 
93  //- Re-calculate the interface curvature
94  void calculateK();
95 
96 
97 public:
98 
99  //- Conversion factor for degrees into radians
100  static const scalar convertToRad;
101 
102 
103  // Constructors
104 
105  //- Construct from volume fraction field gamma and IOdictionary
107  (
108  const volScalarField& alpha1,
109  const volVectorField& U,
110  const IOdictionary&
111  );
112 
113 
114  // Member Functions
116  scalar cAlpha() const
117  {
118  return cAlpha_;
119  }
121  const dimensionedScalar& deltaN() const
122  {
123  return deltaN_;
124  }
126  const surfaceScalarField& nHatf() const
127  {
128  return nHatf_;
129  }
130 
131  tmp<volScalarField> sigmaK() const;
132 
134 
135  //- Indicator of the proximity of the interface
136  // Field values are 1 near and 0 away for the interface.
138 
139  void correct();
140 
141  //- Read transportProperties dictionary
142  bool read();
143 };
144 
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 } // End namespace Foam
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
Foam::surfaceFields.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
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
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
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.