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::alphaContactAngleFvPatchScalarField 00026 00027 Description 00028 Abstract base class for alphaContactAngle boundary conditions. 00029 00030 Derived classes must implement the theta() fuction which returns the 00031 wall contact angle field. 00032 00033 The essential entry "limit" controls the gradient of alpha1 on the wall: 00034 00035 limit none; // Calculate the gradient from the contact-angle without 00036 // limiter 00037 00038 limit gradient; // Limit the wall-gradient such that alpha1 remains 00039 // bounded on the wall 00040 00041 limit alpha; // Bound the calculated alpha1 on the wall 00042 00043 limit zeroGradient; // Set the gradient of alpha1 to 0 on the wall 00044 // i.e. reproduce previous behaviour 00045 00046 Note that if any of the first three options are used the boundary condition 00047 on p_rgh must set to guarantee that the flux is corrected to be zero at the 00048 wall e.g. 00049 00050 walls 00051 { 00052 type fixedFluxPressure; 00053 adjoint no; 00054 } 00055 00056 If "limit zeroGradient;" is used the pressure BCs can be left as before. 00057 00058 SourceFiles 00059 alphaContactAngleFvPatchScalarField.C 00060 00061 \*---------------------------------------------------------------------------*/ 00062 00063 #ifndef alphaContactAngleFvPatchScalarField_H 00064 #define alphaContactAngleFvPatchScalarField_H 00065 00066 #include <finiteVolume/fixedGradientFvPatchFields.H> 00067 #include <finiteVolume/fvsPatchFields.H> 00068 00069 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00070 00071 namespace Foam 00072 { 00073 00074 /*---------------------------------------------------------------------------*\ 00075 Class alphaContactAngleFvPatch Declaration 00076 \*---------------------------------------------------------------------------*/ 00077 00078 class alphaContactAngleFvPatchScalarField 00079 : 00080 public fixedGradientFvPatchScalarField 00081 { 00082 00083 public: 00084 00085 //- Runtime type information 00086 TypeName("alphaContactAngle"); 00087 00088 //- Alpha limit options 00089 enum limitControls 00090 { 00091 lcNone, 00092 lcGradient, 00093 lcZeroGradient, 00094 lcAlpha 00095 }; 00096 00097 static const NamedEnum<limitControls, 4> limitControlNames_; 00098 limitControls limit_; 00099 00100 // Constructors 00101 00102 //- Construct from patch and internal field 00103 alphaContactAngleFvPatchScalarField 00104 ( 00105 const fvPatch&, 00106 const DimensionedField<scalar, volMesh>& 00107 ); 00108 00109 //- Construct from patch, internal field and dictionary 00110 alphaContactAngleFvPatchScalarField 00111 ( 00112 const fvPatch&, 00113 const DimensionedField<scalar, volMesh>&, 00114 const dictionary& 00115 ); 00116 00117 //- Construct by mapping given alphaContactAngleFvPatchScalarField 00118 // onto a new patch 00119 alphaContactAngleFvPatchScalarField 00120 ( 00121 const alphaContactAngleFvPatchScalarField&, 00122 const fvPatch&, 00123 const DimensionedField<scalar, volMesh>&, 00124 const fvPatchFieldMapper& 00125 ); 00126 00127 //- Construct as copy 00128 alphaContactAngleFvPatchScalarField 00129 ( 00130 const alphaContactAngleFvPatchScalarField& 00131 ); 00132 00133 //- Construct as copy setting internal field reference 00134 alphaContactAngleFvPatchScalarField 00135 ( 00136 const alphaContactAngleFvPatchScalarField&, 00137 const DimensionedField<scalar, volMesh>& 00138 ); 00139 00140 00141 // Member functions 00142 00143 //- Return the contact angle 00144 virtual tmp<scalarField> theta 00145 ( 00146 const fvPatchVectorField& Up, 00147 const fvsPatchVectorField& nHat 00148 ) const = 0; 00149 00150 //- Evaluate the patch field 00151 virtual void evaluate 00152 ( 00153 const Pstream::commsTypes commsType=Pstream::blocking 00154 ); 00155 00156 //- Write 00157 virtual void write(Ostream&) const; 00158 }; 00159 00160 00161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00162 00163 } // End namespace Foam 00164 00165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00166 00167 #endif 00168 00169 // ************************ vim: set sw=4 sts=4 et: ************************ //