27 #include "alphaContactAngleFvPatchScalarField.H" 29 #include "surfaceInterpolate.H" 36 void Foam::threePhaseInterfaceProperties::correctContactAngle
38 surfaceVectorField::Boundary& nHatb
50 const fvMesh& mesh = mixture_.
U().
mesh();
51 const fvBoundaryMesh& boundary = mesh.boundary();
55 if (isA<alphaContactAngleFvPatchScalarField>(alpha1[patchi]))
57 const alphaContactAngleFvPatchScalarField& a2cap =
58 refCast<const alphaContactAngleFvPatchScalarField>
61 const alphaContactAngleFvPatchScalarField& a3cap =
62 refCast<const alphaContactAngleFvPatchScalarField>
70 twoPhaseAlpha2 + twoPhaseAlpha3 + small
73 twoPhaseAlpha2 /= sumTwoPhaseAlpha;
74 twoPhaseAlpha3 /= sumTwoPhaseAlpha;
82 twoPhaseAlpha2*(180 - a2cap.theta(U[patchi], nHatp))
83 + twoPhaseAlpha3*(180 - a3cap.theta(U[patchi], nHatp))
99 b2[facei] =
cos(
acos(a12[facei]) - theta[facei]);
107 nHatp = a*nf +
b*nHatp;
109 nHatp /= (
mag(nHatp) + deltaN_.
value());
115 void Foam::threePhaseInterfaceProperties::calculateK()
119 const fvMesh& mesh = alpha1.
mesh();
131 correctContactAngle(nHatfv.boundaryFieldRef());
134 nHatf_ = nHatfv & Sf;
151 const incompressibleThreePhaseMixture& mixture
157 mixture.U().mesh().solution().solverDict
159 mixture_.alpha1().
name()
160 ).
lookup<scalar>(
"cAlpha")
162 sigma12_(
"sigma12", dimensionSet(1, 0, -2, 0, 0), mixture),
163 sigma13_(
"sigma13", dimensionSet(1, 0, -2, 0, 0), mixture),
177 mixture.alpha1().mesh()
179 mixture.alpha1().mesh(),
187 "interfaceProperties:K",
189 mixture.alpha1().mesh()
191 mixture.alpha1().mesh(),
213 pos0(mixture_.alpha1() - 0.01)*
pos0(0.99 - mixture_.alpha1()),
214 pos0(mixture_.alpha2() - 0.01)*
pos0(0.99 - mixture_.alpha2())
fvsPatchField< vector > fvsPatchVectorField
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensionedScalar acos(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
const dimensionSet dimArea
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Unit conversion functions.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
Calculate the snGrad of the given volField.
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
Type of the boundary field.
const dimensionSet dimless
dimensionedScalar det(const dimensionedSphericalTensor &dt)
GeometricField< vector, fvPatchField, volMesh > volVectorField
const volScalarField & alpha3() const
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
const dimensionSet dimLength
tmp< surfaceScalarField > surfaceTensionForce() const
GeometricField< scalar, fvPatchField, volMesh > volScalarField
stressControl lookup("compactNormalStress") >> compactNormalStress
dimensionedScalar cos(const dimensionedScalar &ds)
Calculate the gradient of the given field.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const volScalarField & alpha1() const
const Type & value() const
Return const reference to value.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
Calculate the divergence of the given field.
dimensionedScalar pos0(const dimensionedScalar &ds)
threePhaseInterfaceProperties(const incompressibleThreePhaseMixture &mixture)
Construct from volume fraction field alpha and IOdictionary.
const Mesh & mesh() const
Return mesh.
const volVectorField & U() const
Return the velocity.
const volScalarField & alpha2() const
word name(const complex &)
Return a string representation of a complex.
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.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensioned< scalar > mag(const dimensioned< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
const doubleScalar e
Elementary charge.
A class for managing temporary objects.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)