49 const bool a1pIsCa = isA<alphaContactAngleFvPatchScalarField>(a1p);
50 const bool a2pIsCa = isA<alphaContactAngleFvPatchScalarField>(a2p);
52 if (a1pIsCa || a2pIsCa)
54 if (a1pIsCa != a2pIsCa)
57 << alphaContactAngleFvPatchScalarField::typeName
58 <<
" boundary condition specified on patch "
60 << (a1pIsCa ? a1.
name() : a2.
name()) <<
" but not for "
66 refCast<const alphaContactAngleFvPatchScalarField>(a1p);
68 refCast<const alphaContactAngleFvPatchScalarField>(a2p);
73 if (!a1caHasProps && !a2caHasProps)
77 << alphaContactAngleFvPatchScalarField::typeName
78 <<
" boundary condition specified on patch "
80 <<
" for " << a1.
name() <<
" and " << a2.
name()
81 <<
" contains properties for the other phase"
87 a1caHasProps && a2caHasProps
94 << alphaContactAngleFvPatchScalarField::typeName
95 <<
" boundary conditions specified on patch "
97 <<
" for " << a1.
name() <<
" and " << a2.
name()
98 <<
" contain inconsistent properties"
122 Uwall -= (np & Uwall)*np;
126 nWall /= (
mag(nWall) + small);
141 b2[facei] =
cos(
acos(a12[facei]) - theta[facei]);
147 nHatp = a*np +
b*nHatp;
148 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)
faceListList boundary(nPatches)