28 #include "surfaceInterpolate.H"
41 void Foam::interfaceProperties::correctContactAngle
43 surfaceVectorField::Boundary& nHatb,
44 const surfaceVectorField::Boundary& gradAlphaf
55 if (isA<contactAngleFvPatchScalarField>(a1bf[
patchi]))
57 contactAngleFvPatchScalarField& a1cap =
58 refCast<contactAngleFvPatchScalarField>
82 b2[facei] =
cos(
acos(a12[facei]) -
acos(cosTheta[facei]));
90 nHatp = a*nf +
b*nHatp;
91 nHatp /= (
mag(nHatp) + deltaN_.
value());
93 a1cap.gradient() = (nf & nHatp)*
mag(gradAlphaf[
patchi]);
101 void Foam::interfaceProperties::calculateK()
103 const fvMesh&
mesh = alpha1_.mesh();
126 nHatf_ = nHatfv & Sf;
155 phasePropertiesDict_(
dict),
185 "interfaceProperties:K",
210 return sigmaPtr_->sigma()*K_;
224 return pos0(alpha1_ - 0.01)*
pos0(0.99 - alpha1_);
236 sigmaPtr_->readDict(phasePropertiesDict_);
#define forAll(list, i)
Loop across all elements in list.
const GeoMesh & mesh() const
Return mesh.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
GeometricBoundaryField< Type, GeoMesh, PrimitiveField > Boundary
Type of the boundary field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
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.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const surfaceVectorField & Sf() const
Return cell face area vectors.
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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
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)
const dimensionSet & dimless
VolField< vector > volVectorField
dimensionedScalar pos0(const dimensionedScalar &ds)
const dimensionSet & dimLength
dimensioned< Type > average(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
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.
Field< vector > vectorField
Specialisation of Field<T> for vector.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void det(pointPatchField< scalar > &, const pointPatchField< tensor > &)
tmp< DimensionedField< typename powProduct< Type, r >::type, GeoMesh, Field > > pow(const DimensionedField< Type, GeoMesh, PrimitiveField > &df, typename powProduct< Type, r >::type)
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
SurfaceField< vector > surfaceVectorField
const dimensionSet & dimArea
fvsPatchField< vector > fvsPatchVectorField
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar acos(const dimensionedScalar &ds)
faceListList boundary(nPatches)