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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::interfaceProperties
28 
29 Description
30  Contains the interface properties.
31 
32  Properties to aid interFoam:
33  -# Correct the alpha boundary condition for dynamic contact angle.
34  -# Calculate interface curvature.
35 
36 SourceFiles
37  interfaceProperties.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef interfaceProperties_H
42 #define interfaceProperties_H
43 
44 #include "IOdictionary.H"
45 #include "surfaceTensionModel.H"
46 #include "volFields.H"
47 #include "surfaceFields.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class interfaceProperties Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 {
60  // Private data
61 
62  //- Keep a reference to the transportProperties dictionary
63  const dictionary& transportPropertiesDict_;
64 
65  //- Compression coefficient
66  scalar cAlpha_;
67 
68  //- Surface tension
70 
71  //- Stabilisation for normalisation of the interface normal
72  const dimensionedScalar deltaN_;
73 
74  const volScalarField& alpha1_;
75  const volVectorField& U_;
76  surfaceScalarField nHatf_;
77  volScalarField K_;
78 
79 
80  // Private Member Functions
81 
82  //- No copy construct
84 
85  //- No copy assignment
86  void operator=(const interfaceProperties&) = delete;
87 
88  //- Correction for the boundary condition on the unit normal nHat on
89  // walls to produce the correct contact dynamic angle
90  // calculated from the component of U parallel to the wall
91  void correctContactAngle
92  (
93  surfaceVectorField::Boundary& nHat,
94  const surfaceVectorField::Boundary& gradAlphaf
95  ) const;
96 
97  //- Re-calculate the interface curvature
98  void calculateK();
99 
100 
101 public:
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
115 
116  scalar cAlpha() const
117  {
118  return cAlpha_;
119  }
120 
121  const dimensionedScalar& deltaN() const
122  {
123  return deltaN_;
124  }
125 
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 // ************************************************************************* //
volFields.H
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::interfaceProperties::nHatf
const surfaceScalarField & nHatf() const
Definition: interfaceProperties.H:125
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::interfaceProperties::sigmaK
tmp< volScalarField > sigmaK() const
Definition: interfaceProperties.C:207
surfaceFields.H
Foam::surfaceFields.
alpha1
const volScalarField & alpha1
Definition: setRegionFluidFields.H:8
Foam::interfaceProperties
Contains the interface properties.
Definition: interfaceProperties.H:57
Foam::interfaceProperties::deltaN
const dimensionedScalar & deltaN() const
Definition: interfaceProperties.H:120
Foam::interfaceProperties::nearInterface
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
Definition: interfaceProperties.C:221
Foam::interfaceProperties::correct
void correct()
Definition: interfaceProperties.C:227
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::interfaceProperties::surfaceTensionForce
tmp< surfaceScalarField > surfaceTensionForce() const
Definition: interfaceProperties.C:214
Foam::interfaceProperties::cAlpha
scalar cAlpha() const
Definition: interfaceProperties.H:115
Foam::dimensioned< scalar >
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
IOdictionary.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
U
U
Definition: pEqn.H:72
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::interfaceProperties::read
bool read()
Read transportProperties dictionary.
Definition: interfaceProperties.C:233