initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / transportModels / interfaceProperties / interfaceProperties.H
blob89ccb8a3e26cbda8f020157ca2ccac7cbd87cd59
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
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.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::interfaceProperties
28 Description
29     Contains the interface properties.
31     Properties to aid interFoam:
32     -# Correct the alpha boundary condition for dynamic contact angle.
33     -# Calculate interface curvature.
35 SourceFiles
36     interfaceProperties.C
38 \*---------------------------------------------------------------------------*/
40 #ifndef interfaceProperties_H
41 #define interfaceProperties_H
43 #include "IOdictionary.H"
44 #include "volFields.H"
45 #include "surfaceFields.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 namespace Foam
52 /*---------------------------------------------------------------------------*\
53                            Class interfaceProperties Declaration
54 \*---------------------------------------------------------------------------*/
56 class interfaceProperties
58     // Private data
60         //- Keep a reference to the transportProperties dictionary
61         const dictionary& transportPropertiesDict_;
63         //- Compression coefficient
64         scalar cAlpha_;
66         //- Surface tension
67         dimensionedScalar sigma_;
69         //- Stabilisation for normalisation of the interface normal
70         const dimensionedScalar deltaN_;
72         const volScalarField& alpha1_;
73         const volVectorField& U_;
74         surfaceScalarField nHatf_;
75         volScalarField K_;
78     // Private Member Functions
80         //- Disallow default bitwise copy construct and assignment
81         interfaceProperties(const interfaceProperties&);
82         void operator=(const interfaceProperties&);
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::GeometricBoundaryField& nHat
90         ) const;
92         //- Re-calculate the interface curvature
93         void calculateK();
96 public:
98     //- Conversion factor for degrees into radians
99     static const scalar convertToRad;
102     // Constructors
104         //- Construct from volume fraction field gamma and IOdictionary
105         interfaceProperties
106         (
107             const volScalarField& alpha1,
108             const volVectorField& U,
109             const IOdictionary&
110         );
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         }
140         tmp<volScalarField> sigmaK() const
141         {
142             return sigma_*K_;
143         }
145         void correct()
146         {
147             calculateK();
148         }
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 } // End namespace Foam
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 #endif
160 // ************************************************************************* //