1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 Foam::alphaContactAngleFvPatchScalarField
28 Contact-angle boundary condition for multi-phase interface-capturing
29 simulations. Used in conjuction with multiphaseMixture.
32 alphaContactAngleFvPatchScalarField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef alphaContactAngleFvPatchScalarField_H
37 #define alphaContactAngleFvPatchScalarField_H
39 #include "zeroGradientFvPatchFields.H"
40 #include "multiphaseMixture.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class alphaContactAngleFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 class alphaContactAngleFvPatchScalarField
53 public zeroGradientFvPatchScalarField
57 class interfaceThetaProps
59 //- Equilibrium contact angle
62 //- Dynamic contact angle velocity scale
65 //- Limiting advancing contact angle
68 //- Limiting receeding contact angle
78 interfaceThetaProps(Istream&);
83 //- Return the equilibrium contact angle theta0
84 scalar theta0(bool matched=true) const
86 if (matched) return theta0_;
87 else return 180.0 - theta0_;
90 //- Return the dynamic contact angle velocity scale
96 //- Return the limiting advancing contact angle
97 scalar thetaA(bool matched=true) const
99 if (matched) return thetaA_;
100 else return 180.0 - thetaA_;
103 //- Return the limiting receeding contact angle
104 scalar thetaR(bool matched=true) const
106 if (matched) return thetaR_;
107 else return 180.0 - thetaR_;
113 friend Istream& operator>>(Istream&, interfaceThetaProps&);
114 friend Ostream& operator<<(Ostream&, const interfaceThetaProps&);
120 multiphaseMixture::interfacePair,
121 multiphaseMixture::interfacePair::hash
129 thetaPropsTable thetaProps_;
134 //- Runtime type information
135 TypeName("alphaContactAngle");
140 //- Construct from patch and internal field
141 alphaContactAngleFvPatchScalarField
144 const DimensionedField<scalar, volMesh>&
147 //- Construct from patch, internal field and dictionary
148 alphaContactAngleFvPatchScalarField
151 const DimensionedField<scalar, volMesh>&,
155 //- Construct by mapping given alphaContactAngleFvPatchScalarField
157 alphaContactAngleFvPatchScalarField
159 const alphaContactAngleFvPatchScalarField&,
161 const DimensionedField<scalar, volMesh>&,
162 const fvPatchFieldMapper&
165 //- Construct and return a clone
166 virtual tmp<fvPatchScalarField> clone() const
168 return tmp<fvPatchScalarField>
170 new alphaContactAngleFvPatchScalarField(*this)
174 //- Construct as copy setting internal field reference
175 alphaContactAngleFvPatchScalarField
177 const alphaContactAngleFvPatchScalarField&,
178 const DimensionedField<scalar, volMesh>&
181 //- Construct and return a clone setting internal field reference
182 virtual tmp<fvPatchScalarField> clone
184 const DimensionedField<scalar, volMesh>& iF
187 return tmp<fvPatchScalarField>
189 new alphaContactAngleFvPatchScalarField(*this, iF)
196 //- Return the contact angle properties
197 const thetaPropsTable& thetaProps() const
203 virtual void write(Ostream&) const;
207 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 } // End namespace Foam
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 // ************************************************************************* //