interfaceProperties.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 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 "volFields.H"
44 #include "surfaceFields.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class interfaceProperties Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 {
57  // Private data
58 
59  //- Keep a reference to the transportProperties dictionary
60  const dictionary& transportPropertiesDict_;
61 
62  //- Compression coefficient
63  scalar cAlpha_;
64 
65  //- Surface tension
66  dimensionedScalar sigma_;
67 
68  //- Stabilisation for normalisation of the interface normal
69  const dimensionedScalar deltaN_;
70 
71  const volScalarField& alpha1_;
72  const volVectorField& U_;
73  surfaceScalarField nHatf_;
74  volScalarField K_;
75 
76 
77  // Private Member Functions
78 
79  //- Disallow default bitwise copy construct and assignment
81  void operator=(const interfaceProperties&);
82 
83  //- Correction for the boundary condition on the unit normal nHat on
84  // walls to produce the correct contact dynamic angle
85  // calculated from the component of U parallel to the wall
86  void correctContactAngle
87  (
88  surfaceVectorField::GeometricBoundaryField& nHat,
89  surfaceVectorField::GeometricBoundaryField& gradAlphaf
90  ) const;
91 
92  //- Re-calculate the interface curvature
93  void calculateK();
94 
95 
96 public:
97 
98  //- Conversion factor for degrees into radians
99  static const scalar convertToRad;
100 
101 
102  // Constructors
103 
104  //- Construct from volume fraction field gamma and IOdictionary
106  (
107  const volScalarField& alpha1,
108  const volVectorField& U,
109  const IOdictionary&
110  );
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  }
130  const volScalarField& K() const
131  {
132  return K_;
133  }
135  const dimensionedScalar& sigma() const
136  {
137  return sigma_;
138  }
141  {
142  return sigma_*K_;
143  }
144 
146 
147  //- Indicator of the proximity of the interface
148  // Field values are 1 near and 0 away for the interface.
151  void correct()
152  {
153  calculateK();
154  }
155 
156  //- Read transportProperties dictionary
157  bool read();
158 };
159 
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 } // End namespace Foam
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 #endif
168 
169 // ************************************************************************* //
static const scalar convertToRad
Conversion factor for degrees into radians.
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
const volScalarField & K() const
Foam::surfaceFields.
bool read()
Read transportProperties dictionary.
tmp< volScalarField > sigmaK() const
const dimensionedScalar & deltaN() const
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
const surfaceScalarField & nHatf() const
Namespace for OpenFOAM.
const dimensionedScalar & sigma() const
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
Contains the interface properties.
volScalarField & alpha1
Definition: createFields.H:15
tmp< surfaceScalarField > surfaceTensionForce() const
A class for managing temporary objects.
Definition: PtrList.H:118
U
Definition: pEqn.H:82