28 #include "surfaceInterpolate.H"
41 void Foam::interfaceProperties::correctContactAngle
43 surfaceVectorField::Boundary& nHatb,
44 const surfaceVectorField::Boundary& gradAlphaf
47 const fvMesh& mesh = alpha1_.
mesh();
51 const fvBoundaryMesh&
boundary = mesh.boundary();
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.
GeometricBoundaryField< Type, PatchField, GeoMesh > Boundary
Type of the boundary field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &, 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.
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)
word name(const bool)
Return a word representation of a bool.
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
fvsPatchField< vector > fvsPatchVectorField
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar acos(const dimensionedScalar &ds)
faceListList boundary(nPatches)