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),
174 alpha1_.time().
name(),
185 "interfaceProperties:K",
186 alpha1_.time().
name(),
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 Mesh & 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.
const polyMesh & mesh() const
Return reference to polyMesh.
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)
VolField< vector > volVectorField
dimensionedScalar pos0(const dimensionedScalar &ds)
const dimensionSet dimless
dimensioned< Type > average(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
const dimensionSet dimLength
void det(LagrangianPatchField< scalar > &f, const LagrangianPatchField< tensor > &f1)
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
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.
void pow(LagrangianPatchField< typename powProduct< Type, r >::type > &f, const LagrangianPatchField< Type > &f1)
Field< vector > vectorField
Specialisation of Field<T> for vector.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
const dimensionSet dimArea
SurfaceField< vector > surfaceVectorField
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)