OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

interfaceProperties.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::interfaceProperties
00027 
00028 Description
00029     Contains the interface properties.
00030 
00031     Properties to aid interFoam:
00032     -# Correct the alpha boundary condition for dynamic contact angle.
00033     -# Calculate interface curvature.
00034 
00035 SourceFiles
00036     interfaceProperties.C
00037 
00038 \*---------------------------------------------------------------------------*/
00039 
00040 #ifndef interfaceProperties_H
00041 #define interfaceProperties_H
00042 
00043 #include "IOdictionary.H"
00044 #include "volFields.H"
00045 #include "surfaceFields.H"
00046 
00047 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00048 
00049 namespace Foam
00050 {
00051 
00052 /*---------------------------------------------------------------------------*\
00053                            Class interfaceProperties Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 class interfaceProperties
00057 {
00058     // Private data
00059 
00060         //- Keep a reference to the transportProperties dictionary
00061         const dictionary& transportPropertiesDict_;
00062 
00063         //- Compression coefficient
00064         scalar cAlpha_;
00065 
00066         //- Surface tension
00067         dimensionedScalar sigma_;
00068 
00069         //- Stabilisation for normalisation of the interface normal
00070         const dimensionedScalar deltaN_;
00071 
00072         const volScalarField& alpha1_;
00073         const volVectorField& U_;
00074         surfaceScalarField nHatf_;
00075         volScalarField K_;
00076 
00077 
00078     // Private Member Functions
00079 
00080         //- Disallow default bitwise copy construct and assignment
00081         interfaceProperties(const interfaceProperties&);
00082         void operator=(const interfaceProperties&);
00083 
00084         //- Correction for the boundary condition on the unit normal nHat on
00085         //  walls to produce the correct contact dynamic angle
00086         //  calculated from the component of U parallel to the wall
00087         void correctContactAngle
00088         (
00089             surfaceVectorField::GeometricBoundaryField& nHat
00090         ) const;
00091 
00092         //- Re-calculate the interface curvature
00093         void calculateK();
00094 
00095 
00096 public:
00097 
00098     //- Conversion factor for degrees into radians
00099     static const scalar convertToRad;
00100 
00101 
00102     // Constructors
00103 
00104         //- Construct from volume fraction field gamma and IOdictionary
00105         interfaceProperties
00106         (
00107             const volScalarField& alpha1,
00108             const volVectorField& U,
00109             const IOdictionary&
00110         );
00111 
00112 
00113     // Member Functions
00114 
00115         scalar cAlpha() const
00116         {
00117             return cAlpha_;
00118         }
00119 
00120         const dimensionedScalar& deltaN() const
00121         {
00122             return deltaN_;
00123         }
00124 
00125         const surfaceScalarField& nHatf() const
00126         {
00127             return nHatf_;
00128         }
00129 
00130         const volScalarField& K() const
00131         {
00132             return K_;
00133         }
00134 
00135         const dimensionedScalar& sigma() const
00136         {
00137             return sigma_;
00138         }
00139 
00140         tmp<volScalarField> sigmaK() const
00141         {
00142             return sigma_*K_;
00143         }
00144 
00145         void correct()
00146         {
00147             calculateK();
00148         }
00149 };
00150 
00151 
00152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00153 
00154 } // End namespace Foam
00155 
00156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00157 
00158 #endif
00159 
00160 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd