31#include "surfaceInterpolate.H"
45void Foam::interfaceProperties::correctContactAngle
47 surfaceVectorField::Boundary& nHatb,
48 const surfaceVectorField::Boundary& gradAlphaf
58 if (isA<alphaContactAngleTwoPhaseFvPatchScalarField>(abf[patchi]))
60 alphaContactAngleTwoPhaseFvPatchScalarField& acap =
61 const_cast<alphaContactAngleTwoPhaseFvPatchScalarField&
>
63 refCast<const alphaContactAngleTwoPhaseFvPatchScalarField>
88 b2[facei] =
cos(
acos(a12[facei]) - theta[facei]);
96 nHatp = a*nf +
b*nHatp;
97 nHatp /= (
mag(nHatp) + deltaN_.
value());
99 acap.gradient() = (nf & nHatp)*
mag(gradAlphaf[patchi]);
106void Foam::interfaceProperties::calculateK()
108 const fvMesh&
mesh = alpha1_.mesh();
128 correctContactAngle(nHatfv.boundaryFieldRef(), gradAlphaf.boundaryField());
131 nHatf_ = nHatfv & Sf;
159 transportPropertiesDict_(
dict),
192 "interfaceProperties:K",
209 return sigmaPtr_->sigma()*K_;
223 return pos0(alpha1_ - 0.01)*
pos0(0.99 - alpha1_);
235 alpha1_.mesh().solverDict(alpha1_.name()).readEntry(
"cAlpha", cAlpha_);
236 sigmaPtr_->readDict(transportPropertiesDict_);
const volScalarField & alpha1
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.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
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.
Contains the interface properties.
tmp< surfaceScalarField > surfaceTensionForce() const
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
tmp< volScalarField > sigmaK() const
bool read()
Read transportProperties dictionary.
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.
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)
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionSet dimless
Dimensionless.
dimensionedScalar pos0(const dimensionedScalar &ds)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
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)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
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)
#define forAll(list, i)
Loop across all elements in list.
Unit conversion functions.