1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::multiphaseAlphaContactAngleFvPatchScalarField
28 Contact-angle boundary condition for multi-phase interface-capturing
29 simulations. Used in conjuction with multiphaseMixture.
32 multiphaseAlphaContactAngleFvPatchScalarField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef multiphaseAlphaContactAngleFvPatchScalarField_H
37 #define multiphaseAlphaContactAngleFvPatchScalarField_H
39 #include "zeroGradientFvPatchFields.H"
40 #include "multiphaseMixture.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class multiphaseAlphaContactAngleFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 class multiphaseAlphaContactAngleFvPatchScalarField
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("multiphaseAlphaContactAngle");
140 //- Construct from patch and internal field
141 multiphaseAlphaContactAngleFvPatchScalarField
144 const DimensionedField<scalar, volMesh>&
147 //- Construct from patch, internal field and dictionary
148 multiphaseAlphaContactAngleFvPatchScalarField
151 const DimensionedField<scalar, volMesh>&,
155 //- Construct by mapping given
156 // multiphaseAlphaContactAngleFvPatchScalarField
158 multiphaseAlphaContactAngleFvPatchScalarField
160 const multiphaseAlphaContactAngleFvPatchScalarField&,
162 const DimensionedField<scalar, volMesh>&,
163 const fvPatchFieldMapper&
166 //- Construct and return a clone
167 virtual tmp<fvPatchScalarField> clone() const
169 return tmp<fvPatchScalarField>
171 new multiphaseAlphaContactAngleFvPatchScalarField(*this)
175 //- Construct as copy setting internal field reference
176 multiphaseAlphaContactAngleFvPatchScalarField
178 const multiphaseAlphaContactAngleFvPatchScalarField&,
179 const DimensionedField<scalar, volMesh>&
182 //- Construct and return a clone setting internal field reference
183 virtual tmp<fvPatchScalarField> clone
185 const DimensionedField<scalar, volMesh>& iF
188 return tmp<fvPatchScalarField>
190 new multiphaseAlphaContactAngleFvPatchScalarField(*this, iF)
197 //- Return the contact angle properties
198 const thetaPropsTable& thetaProps() const
204 virtual void write(Ostream&) const;
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 } // End namespace Foam
212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216 // ************************************************************************* //