35 const volVectorField::Boundary& Ubf,
37 surfaceVectorField::Boundary& nHatbf
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 " 60 << boundary[
patchi].name() <<
" for " 61 << (a1pIsCa ? a1.
name() : a2.
name()) <<
" but not for " 67 refCast<const alphaContactAngleFvPatchScalarField>(a1p);
69 refCast<const alphaContactAngleFvPatchScalarField>(a2p);
72 const bool a2caHasProps = a2ca.thetaProps().found(a1.
group());
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
90 != a2ca.thetaProps()[a1.
group()].reversed()
95 << alphaContactAngleFvPatchScalarField::typeName
96 <<
" boundary conditions specified on patch " 98 <<
" for " << a1.
name() <<
" and " << a2.
name()
99 <<
" contain inconsistent properties" 106 : a2ca.thetaProps()[a1.
group()].reversed();
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());
static word group(const word &name)
Return group (extension part of name)
dimensionedScalar tanh(const dimensionedScalar &ds)
dimensionedScalar acos(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.
const word & name() const
Return name.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
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.
Unit conversion functions.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
dimensionedScalar det(const dimensionedSphericalTensor &dt)
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
dimensionedScalar cos(const dimensionedScalar &ds)
const Type & value() const
Return const reference to value.
faceListList boundary(nPatches)
const Mesh & mesh() const
Return mesh.
dimensioned< scalar > mag(const dimensioned< Type > &)