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
61 
62  //- Compression coefficient
63  scalar cAlpha_;
64 
65  //- Surface tension
67 
68  //- Stabilisation for normalisation of the interface normal
70 
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
87  (
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
114 
115  scalar cAlpha() const
116  {
117  return cAlpha_;
118  }
119 
120  const dimensionedScalar& deltaN() const
121  {
122  return deltaN_;
123  }
124 
125  const surfaceScalarField& nHatf() const
126  {
127  return nHatf_;
128  }
129 
130  const volScalarField& K() const
131  {
132  return K_;
133  }
134 
135  const dimensionedScalar& sigma() const
136  {
137  return sigma_;
138  }
139 
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.
150 
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 // ************************************************************************* //
volFields.H
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
Foam::interfaceProperties::nHatf_
surfaceScalarField nHatf_
Definition: interfaceProperties.H:72
Foam::interfaceProperties::U_
const volVectorField & U_
Definition: interfaceProperties.H:71
Foam::interfaceProperties::nHatf
const surfaceScalarField & nHatf() const
Definition: interfaceProperties.H:124
Foam::interfaceProperties::alpha1_
const volScalarField & alpha1_
Definition: interfaceProperties.H:70
Foam::interfaceProperties::correctContactAngle
void correctContactAngle(surfaceVectorField::GeometricBoundaryField &nHat, surfaceVectorField::GeometricBoundaryField &gradAlphaf) const
Correction for the boundary condition on the unit normal nHat on.
Definition: interfaceProperties.C:54
Foam::interfaceProperties::K
const volScalarField & K() const
Definition: interfaceProperties.H:129
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::interfaceProperties::interfaceProperties
interfaceProperties(const interfaceProperties &)
Disallow default bitwise copy construct and assignment.
Foam::interfaceProperties::operator=
void operator=(const interfaceProperties &)
Foam::interfaceProperties::calculateK
void calculateK()
Re-calculate the interface curvature.
Definition: interfaceProperties.C:114
surfaceFields.H
Foam::surfaceFields.
Foam::interfaceProperties::K_
volScalarField K_
Definition: interfaceProperties.H:73
Foam::interfaceProperties
Contains the interface properties.
Definition: interfaceProperties.H:54
U
U
Definition: pEqn.H:46
Foam::interfaceProperties::deltaN
const dimensionedScalar & deltaN() const
Definition: interfaceProperties.H:119
Foam::interfaceProperties::deltaN_
const dimensionedScalar deltaN_
Stabilisation for normalisation of the interface normal.
Definition: interfaceProperties.H:68
Foam::interfaceProperties::nearInterface
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
Definition: interfaceProperties.C:224
Foam::interfaceProperties::correct
void correct()
Definition: interfaceProperties.H:150
Foam::interfaceProperties::sigma
const dimensionedScalar & sigma() const
Definition: interfaceProperties.H:134
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::interfaceProperties::cAlpha_
scalar cAlpha_
Compression coefficient.
Definition: interfaceProperties.H:62
Foam::interfaceProperties::surfaceTensionForce
tmp< surfaceScalarField > surfaceTensionForce() const
Definition: interfaceProperties.C:217
Foam::interfaceProperties::cAlpha
scalar cAlpha() const
Definition: interfaceProperties.H:114
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:41
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::interfaceProperties::sigmaK
tmp< volScalarField > sigmaK() const
Definition: interfaceProperties.H:139
alpha1
volScalarField & alpha1
Definition: createFields.H:15
Foam::interfaceProperties::transportPropertiesDict_
const dictionary & transportPropertiesDict_
Keep a reference to the transportProperties dictionary.
Definition: interfaceProperties.H:59
IOdictionary.H
Foam::interfaceProperties::sigma_
dimensionedScalar sigma_
Surface tension.
Definition: interfaceProperties.H:65
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::interfaceProperties::convertToRad
static const scalar convertToRad
Conversion factor for degrees into radians.
Definition: interfaceProperties.H:98
Foam::GeometricField::GeometricBoundaryField
Definition: GeometricField.H:105
Foam::interfaceProperties::read
bool read()
Read transportProperties dictionary.
Definition: interfaceProperties.C:230