31 #include "surfaceInterpolate.H" 39 void 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());
118 void Foam::threePhaseInterfaceProperties::calculateK()
134 correctContactAngle(nHatfv.boundaryFieldRef());
137 nHatf_ = nHatfv & Sf;
152 Foam::threePhaseInterfaceProperties::threePhaseInterfaceProperties
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())
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
fvsPatchField< vector > fvsPatchVectorField
const Type & value() const noexcept
Return const reference to value.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensionedScalar acos(const dimensionedScalar &ds)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &f1)
const surfaceVectorField & Sf() const
Return cell face area vectors.
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Unit conversion functions.
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Calculate the snGrad of the given volField.
const volScalarField & alpha2
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
Type of boundary fields.
dimensionedScalar det(const dimensionedSphericalTensor &dt)
const dimensionSet dimless
Dimensionless.
GeometricField< vector, fvPatchField, volMesh > volVectorField
const volScalarField & alpha3() const
tmp< surfaceScalarField > surfaceTensionForce() const
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionedScalar e
Elementary charge.
dimensionedScalar cos(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Calculate the gradient of the given field.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const volScalarField & alpha1() const
dimensionedScalar cbrt(const dimensionedScalar &ds)
Calculate the divergence of the given field.
const Mesh & mesh() const noexcept
Return mesh.
dimensionedScalar pos0(const dimensionedScalar &ds)
const volVectorField & U() const
Return the velocity.
const volScalarField & alpha2() const
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.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Field< vector > vectorField
Specialisation of Field<T> for vector.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
A class for managing temporary objects.
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const dimensionSet dimArea(sqr(dimLength))
static constexpr const zero Zero
Global zero (0)
const volScalarField & alpha1