29 #include "surfaceInterpolate.H"
42 void Foam::interfaceProperties::correctContactAngle
44 surfaceVectorField::Boundary& nHatb,
45 const surfaceVectorField::Boundary& gradAlphaf
48 const fvMesh& mesh = alpha1_.
mesh();
52 const fvBoundaryMesh&
boundary = mesh.boundary();
56 if (isA<contactAngleFvPatchScalarField>(a1bf[
patchi]))
58 contactAngleFvPatchScalarField& a1cap =
59 refCast<contactAngleFvPatchScalarField>
83 b2[facei] =
cos(
acos(a12[facei]) -
acos(cosTheta[facei]));
91 nHatp = a*nf +
b*nHatp;
92 nHatp /= (
mag(nHatp) + deltaN_.
value());
94 a1cap.gradient() = (nf & nHatp)*
mag(gradAlphaf[
patchi]);
102 void Foam::interfaceProperties::calculateK()
104 const fvMesh& mesh = alpha1_.mesh();
127 nHatf_ = nHatfv & Sf;
156 phasePropertiesDict_(
dict),
175 alpha1_.time().
name(),
186 "interfaceProperties:K",
187 alpha1_.time().
name(),
211 return sigmaPtr_->sigma()*K_;
225 return pos0(alpha1_ - 0.01)*
pos0(0.99 - alpha1_);
237 sigmaPtr_->readDict(phasePropertiesDict_);
#define forAll(list, i)
Loop across all elements in list.
const Mesh & mesh() const
Return mesh.
Generic GeometricField class.
GeometricBoundaryField< Type, PatchField, GeoMesh > Boundary
Type of the boundary field.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &)
Return a temporary field constructed from name,.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const Type & value() const
Return const reference to value.
tmp< surfaceScalarField > surfaceTensionForce() const
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
void correct()
Correct the curvature.
interfaceProperties(const IOdictionary &dict, volScalarField &alpha1, volScalarField &alpha2, const volVectorField &U)
Construct from dictionary, volume fraction fields and mixture.
tmp< volVectorField > n() const
tmp< volScalarField > sigmaK() const
bool read()
Read phaseProperties dictionary.
Abstract base-class for surface tension models which return the surface tension coefficient field.
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< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< SurfaceField< Type > > snGrad(const VolField< Type > &vf, const word &name)
dimensionedScalar det(const dimensionedSphericalTensor &dt)
VolField< vector > volVectorField
dimensionedScalar pos0(const dimensionedScalar &ds)
const dimensionSet dimless
const dimensionSet dimLength
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void correctContactAngle(const volScalarField &alpha1, const volScalarField &alpha2, const volVectorField::Boundary &Ubf, const dimensionedScalar &deltaN, surfaceVectorField::Boundary &nHatbf)
Correct the contact angle for the two volume fraction fields.
dimensioned< scalar > mag(const dimensioned< Type > &)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Field< vector > vectorField
Specialisation of Field<T> for vector.
const dimensionSet dimArea
SurfaceField< vector > surfaceVectorField
word name(const complex &)
Return a string representation of a complex.
fvsPatchField< vector > fvsPatchVectorField
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar acos(const dimensionedScalar &ds)
faceListList boundary(nPatches)
Unit conversion functions.