OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen 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-2007 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     interfaceProperties
00027 
00028 Description
00029     Properties to aid interFoam :
00030     1. Correct the gamma boundary condition for dynamic contact angle.
00031     2. Calculate interface curvature.
00032 
00033 SourceFiles
00034     interfaceProperties.C
00035 
00036 \*---------------------------------------------------------------------------*/
00037 
00038 #ifndef interfaceProperties_H
00039 #define interfaceProperties_H
00040 
00041 #include "IOdictionary.H"
00042 #include "volFields.H"
00043 #include "surfaceFields.H"
00044 
00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00046 
00047 namespace Foam
00048 {
00049 
00050 /*---------------------------------------------------------------------------*\
00051                            Class interfaceProperties Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class interfaceProperties
00055 {
00056     // Private data
00057 
00058         //- Keep a reference to the transportProperties dictionary
00059         const dictionary& transportPropertiesDict_;
00060 
00061         //- Compression coefficient
00062         scalar cGamma_;
00063 
00064         //- Surface tension
00065         dimensionedScalar sigma_;
00066 
00067         //- Stabilisation for normalisation of the interface normal
00068         const dimensionedScalar deltaN_;
00069 
00070         const volScalarField& gamma_;
00071         const volVectorField& U_;
00072         surfaceScalarField nHatf_;
00073         volScalarField K_;
00074 
00075 
00076     // Private Member Functions
00077 
00078         //- Disallow default bitwise copy construct and assignment
00079         interfaceProperties(const interfaceProperties&);
00080         void operator=(const interfaceProperties&);
00081 
00082         //- Correction for the boundary condition on the unit normal nHat on
00083         //  walls to produce the correct contact dynamic angle
00084         //  calculated from the component of U parallel to the wall
00085         void correctContactAngle
00086         (
00087             surfaceVectorField::GeometricBoundaryField& nHat
00088         ) const;
00089 
00090         //- Re-calculate the interface curvature
00091         void calculateK();
00092 
00093 
00094 public:
00095 
00096     //- Conversion factor for degrees into radians
00097     static const scalar convertToRad;
00098 
00099 
00100     // Constructors
00101 
00102         //- Construct from volume fraction field gamma and IOdictionary
00103         interfaceProperties
00104         (
00105             const volScalarField& gamma,
00106             const volVectorField& U,
00107             const IOdictionary&
00108         );
00109 
00110 
00111     // Member Functions
00112 
00113         scalar cGamma() const
00114         {
00115             return cGamma_;
00116         }
00117 
00118         const dimensionedScalar& deltaN() const
00119         {
00120             return deltaN_;
00121         }
00122 
00123         const surfaceScalarField& nHatf() const
00124         {
00125             return nHatf_;
00126         }
00127 
00128         const volScalarField& K() const
00129         {
00130             return K_;
00131         }
00132 
00133         const dimensionedScalar& sigma() const
00134         {
00135             return sigma_;
00136         }
00137 
00138         tmp<volScalarField> sigmaK() const
00139         {
00140             return sigma_*K_;
00141         }
00142 
00143         void correct()
00144         {
00145             calculateK();
00146         }
00147 };
00148 
00149 
00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00151 
00152 } // End namespace Foam
00153 
00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00155 
00156 #endif
00157 
00158 // ************************************************************************* //
Copyright © 2000-2007 OpenCFD Ltd