50 const bool a1pIsCa = isA<alphaContactAngleFvPatchScalarField>(a1p);
51 const bool a2pIsCa = isA<alphaContactAngleFvPatchScalarField>(a2p);
53 if (a1pIsCa || a2pIsCa)
55 if (a1pIsCa != a2pIsCa)
58 << alphaContactAngleFvPatchScalarField::typeName
59 <<
" boundary condition specified on patch "
61 << (a1pIsCa ? a1.
name() : a2.
name()) <<
" but not for "
67 refCast<const alphaContactAngleFvPatchScalarField>(a1p);
69 refCast<const alphaContactAngleFvPatchScalarField>(a2p);
74 if (!a1caHasProps && !a2caHasProps)
78 << alphaContactAngleFvPatchScalarField::typeName
79 <<
" boundary condition specified on patch "
81 <<
" for " << a1.
name() <<
" and " << a2.
name()
82 <<
" contains properties for the other phase"
88 a1caHasProps && a2caHasProps
95 << alphaContactAngleFvPatchScalarField::typeName
96 <<
" boundary conditions specified on patch "
98 <<
" for " << a1.
name() <<
" and " << a2.
name()
99 <<
" contain inconsistent properties"
118 const scalar uTheta = tp.
uTheta();
127 Uwall -= (np & Uwall)*np;
131 nWall /= (
mag(nWall) + small);
137 theta += (thetaA - thetaR)*
tanh(uwall/uTheta);
146 b2[facei] =
cos(
acos(a12[facei]) - theta[facei]);
152 nHatp = a*np +
b*nHatp;
153 nHatp /= (
mag(nHatp) + deltaN.
value());
#define forAll(list, i)
Loop across all elements in list.
const Mesh & mesh() const
Return mesh.
Generic GeometricBoundaryField class.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
static word group(const word &name)
Return group (extension part of name)
const word & name() const
Return name.
void size(const label)
Override size to be inconsistent with allocated storage.
const Type & value() const
Return const reference to value.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedScalar det(const dimensionedSphericalTensor &dt)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensionedScalar tanh(const dimensionedScalar &ds)
void correctContactAngle(const volScalarField &alpha1, const volScalarField &alpha2, const volVectorField::Boundary &Ubf, const dimensionedScalar &deltaN, surfaceVectorField::Boundary &nHatbf)
Correct the contact angle for the two volume fraction fields.
dimensioned< scalar > mag(const dimensioned< Type > &)
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar acos(const dimensionedScalar &ds)
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
faceListList boundary(nPatches)
Unit conversion functions.