27 #include "alphaContactAngleFvPatchScalarField.H" 29 #include "surfaceInterpolate.H" 42 void Foam::threePhaseInterfaceProperties::correctContactAngle
44 surfaceVectorField::Boundary& nHatb
47 const volScalarField::Boundary& alpha1 =
49 const volScalarField::Boundary& alpha2 =
51 const volScalarField::Boundary& alpha3 =
53 const volVectorField::Boundary& U =
56 const fvMesh& mesh = mixture_.
U().
mesh();
57 const fvBoundaryMesh& boundary = mesh.boundary();
61 if (isA<alphaContactAngleFvPatchScalarField>(alpha1[patchi]))
63 const alphaContactAngleFvPatchScalarField& a2cap =
64 refCast<const alphaContactAngleFvPatchScalarField>
67 const alphaContactAngleFvPatchScalarField& a3cap =
68 refCast<const alphaContactAngleFvPatchScalarField>
76 twoPhaseAlpha2 + twoPhaseAlpha3 + small
79 twoPhaseAlpha2 /= sumTwoPhaseAlpha;
80 twoPhaseAlpha3 /= sumTwoPhaseAlpha;
88 twoPhaseAlpha2*(180 - a2cap.theta(U[patchi], nHatp))
89 + twoPhaseAlpha3*(180 - a3cap.theta(U[patchi], nHatp))
105 b2[facei] =
cos(
acos(a12[facei]) - theta[facei]);
113 nHatp = a*nf +
b*nHatp;
115 nHatp /= (
mag(nHatp) + deltaN_.
value());
121 void Foam::threePhaseInterfaceProperties::calculateK()
125 const fvMesh& mesh = alpha1.
mesh();
137 correctContactAngle(nHatfv.boundaryFieldRef());
140 nHatf_ = nHatfv & Sf;
155 Foam::threePhaseInterfaceProperties::threePhaseInterfaceProperties
157 const incompressibleThreePhaseMixture&
mixture 165 mixture.U().mesh().solverDict
167 mixture_.alpha1().
name()
171 sigma12_(
"sigma12", dimensionSet(1, 0, -2, 0, 0), mixture),
172 sigma13_(
"sigma13", dimensionSet(1, 0, -2, 0, 0), mixture),
186 mixture.alpha1().mesh()
188 mixture.alpha1().mesh(),
196 "interfaceProperties:K",
198 mixture.alpha1().mesh()
200 mixture.alpha1().mesh(),
222 pos0(mixture_.alpha1() - 0.01)*
pos0(0.99 - mixture_.alpha1()),
223 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.
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Calculate the snGrad of the given volField.
dimensionedScalar det(const dimensionedSphericalTensor &dt)
GeometricField< vector, fvPatchField, volMesh > volVectorField
const volScalarField & alpha3() const
tmp< surfaceScalarField > surfaceTensionForce() const
GeometricField< scalar, fvPatchField, volMesh > volScalarField
static const scalar convertToRad
Conversion factor for degrees into radians.
stressControl lookup("compactNormalStress") >> compactNormalStress
dimensionedScalar cos(const dimensionedScalar &ds)
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
const Type & value() const
Return const reference to value.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
Calculate the divergence of the given field.
dimensionedScalar pos0(const dimensionedScalar &ds)
const Mesh & mesh() const
Return mesh.
const volVectorField & U() const
Return the velocity.
Info<< "Reading field p_rgh\"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Creating phaseChangeTwoPhaseMixture\"<< endl;autoPtr< phaseChangeTwoPhaseMixture > mixture
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)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
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)
const dimensionSet dimArea(sqr(dimLength))