Go to the documentation of this file.
31 #include "surfaceInterpolate.H"
39 void Foam::threePhaseInterfaceProperties::correctContactAngle
41 surfaceVectorField::Boundary& nHatb
44 const volScalarField::Boundary&
alpha1 =
46 const volScalarField::Boundary&
alpha2 =
48 const volScalarField::Boundary& alpha3 =
50 const volVectorField::Boundary&
U =
53 const fvMesh&
mesh = mixture_.
U().mesh();
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())
const volScalarField & alpha3() const
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
const volScalarField & alpha2
const volVectorField & U() const
Return the velocity.
Calculate the snGrad of the given volField.
Calculate the divergence of the given field.
Unit conversion functions.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
const Type & value() const
Return const reference to value.
dimensionedScalar pos0(const dimensionedScalar &ds)
const volScalarField & alpha1
#define forAll(list, i)
Loop across all elements in list.
Field< vector > vectorField
Specialisation of Field<T> for vector.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const dimensionSet dimArea(sqr(dimLength))
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
fvsPatchField< vector > fvsPatchVectorField
word name(const complex &c)
Return string representation of complex.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
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.
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
GeometricField< vector, fvPatchField, volMesh > volVectorField
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar acos(const dimensionedScalar &ds)
Calculate the gradient of the given field.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const dimensionedScalar e
Elementary charge.
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
tmp< surfaceScalarField > surfaceTensionForce() const
dimensionedScalar det(const dimensionedSphericalTensor &dt)
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
dimensionedScalar cbrt(const dimensionedScalar &ds)
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
const volScalarField & alpha2() const
const Boundary & boundaryField() const
Return const-reference to the boundary field.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
dimensionedScalar cos(const dimensionedScalar &ds)
const volScalarField & alpha1() const
const surfaceVectorField & Sf() const
Return cell face area vectors.