31#include "surfaceInterpolate.H"
39void Foam::threePhaseInterfaceProperties::correctContactAngle
41 surfaceVectorField::Boundary& nHatb
58 if (isA<alphaContactAngleTwoPhaseFvPatchScalarField>(
alpha1[patchi]))
60 const alphaContactAngleTwoPhaseFvPatchScalarField& a2cap =
61 refCast<const alphaContactAngleTwoPhaseFvPatchScalarField>
64 const alphaContactAngleTwoPhaseFvPatchScalarField& a3cap =
65 refCast<const alphaContactAngleTwoPhaseFvPatchScalarField>
73 twoPhaseAlpha2 + twoPhaseAlpha3 + SMALL
76 twoPhaseAlpha2 /= sumTwoPhaseAlpha;
77 twoPhaseAlpha3 /= sumTwoPhaseAlpha;
85 twoPhaseAlpha2*(180 - a2cap.theta(
U[patchi], nHatp))
86 + twoPhaseAlpha3*(180 - a3cap.theta(
U[patchi], nHatp))
102 b2[facei] =
cos(
acos(a12[facei]) - theta[facei]);
110 nHatp = a*nf +
b*nHatp;
112 nHatp /= (
mag(nHatp) + deltaN_.
value());
118void Foam::threePhaseInterfaceProperties::calculateK()
134 correctContactAngle(nHatfv.boundaryFieldRef());
137 nHatf_ = nHatfv & Sf;
154 const incompressibleThreePhaseMixture& mixture
163 ).
get<scalar>(
"cAlpha")
190 "interfaceProperties:K",
216 pos0(mixture_.alpha1() - 0.01)*
pos0(0.99 - mixture_.alpha1()),
217 pos0(mixture_.alpha2() - 0.01)*
pos0(0.99 - mixture_.alpha2())
const volScalarField & alpha1
const volScalarField & alpha2
const Mesh & mesh() const
Return mesh.
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
Type of boundary fields.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const Type & value() const
Return const reference to value.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const surfaceVectorField & Sf() const
Return cell face area vectors.
const volVectorField & U() const
Return the velocity.
const volScalarField & alpha2() const
const volScalarField & alpha3() const
const volScalarField & alpha1() const
Properties to aid interFoam : 1. Correct the alpha boundary condition for dynamic contact angle....
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
tmp< surfaceScalarField > surfaceTensionForce() const
tmp< volScalarField > sigmaK() const
A class for managing temporary objects.
Calculate the divergence of the given field.
Calculate the gradient of the given field.
Calculate the snGrad of the given volField.
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
dimensionedScalar det(const dimensionedSphericalTensor &dt)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionSet dimless
Dimensionless.
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimArea(sqr(dimLength))
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
constexpr scalar degToRad() noexcept
Multiplication factor for degrees to radians conversion.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Field< vector > vectorField
Specialisation of Field<T> for vector.
static constexpr const zero Zero
Global zero (0)
dimensionedScalar cbrt(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
fvsPatchField< vector > fvsPatchVectorField
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar acos(const dimensionedScalar &ds)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
#define forAll(list, i)
Loop across all elements in list.
Unit conversion functions.