00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2010 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 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your 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, see <http://www.gnu.org/licenses/>. 00023 00024 Class 00025 Foam::interfaceProperties 00026 00027 Description 00028 Contains the interface properties. 00029 00030 Properties to aid interFoam: 00031 -# Correct the alpha boundary condition for dynamic contact angle. 00032 -# Calculate interface curvature. 00033 00034 SourceFiles 00035 interfaceProperties.C 00036 00037 \*---------------------------------------------------------------------------*/ 00038 00039 #ifndef interfaceProperties_H 00040 #define interfaceProperties_H 00041 00042 #include <OpenFOAM/IOdictionary.H> 00043 #include <finiteVolume/volFields.H> 00044 #include <finiteVolume/surfaceFields.H> 00045 00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00047 00048 namespace Foam 00049 { 00050 00051 /*---------------------------------------------------------------------------*\ 00052 Class interfaceProperties Declaration 00053 \*---------------------------------------------------------------------------*/ 00054 00055 class interfaceProperties 00056 { 00057 // Private data 00058 00059 //- Keep a reference to the transportProperties dictionary 00060 const dictionary& transportPropertiesDict_; 00061 00062 //- Compression coefficient 00063 scalar cAlpha_; 00064 00065 //- Surface tension 00066 dimensionedScalar sigma_; 00067 00068 //- Stabilisation for normalisation of the interface normal 00069 const dimensionedScalar deltaN_; 00070 00071 const volScalarField& alpha1_; 00072 const volVectorField& U_; 00073 surfaceScalarField nHatf_; 00074 volScalarField K_; 00075 00076 00077 // Private Member Functions 00078 00079 //- Disallow default bitwise copy construct and assignment 00080 interfaceProperties(const interfaceProperties&); 00081 void operator=(const interfaceProperties&); 00082 00083 //- Correction for the boundary condition on the unit normal nHat on 00084 // walls to produce the correct contact dynamic angle 00085 // calculated from the component of U parallel to the wall 00086 void correctContactAngle 00087 ( 00088 surfaceVectorField::GeometricBoundaryField& nHat, 00089 surfaceVectorField::GeometricBoundaryField& gradAlphaf 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 // ************************ vim: set sw=4 sts=4 et: ************************ //