32#include "surfaceInterpolate.H"
47void Foam::interfaceProperties::correctContactAngle
49 surfaceVectorField::Boundary& nHatb,
50 const surfaceVectorField::Boundary& gradAlphaf
53 const fvMesh&
mesh = alpha1_.mesh();
62 alphaContactAngleTwoPhaseFvPatchScalarField& acap =
63 const_cast<alphaContactAngleTwoPhaseFvPatchScalarField&
>
74 degToRad() * acap.theta(U_.boundaryField()[patchi], nHatp)
90 b2[facei] =
cos(
acos(a12[facei]) - theta[facei]);
98 nHatp = a*nf +
b*nHatp;
99 nHatp /= (
mag(nHatp) + deltaN_.value());
101 acap.gradient() = (nf & nHatp)*
mag(gradAlphaf[patchi]);
108void Foam::interfaceProperties::calculateK()
115 if (nAlphaSmoothCurvature_ < 1)
123 auto& alpha1L = talpha1L.ref();
125 for (
int i = 0; i < nAlphaSmoothCurvature_; ++i)
130 tgradAlpha =
fvc::grad(talpha1L,
"nHat");
147 correctContactAngle(nHatfv.boundaryFieldRef(), gradAlphaf.boundaryField());
150 nHatf_ = nHatfv & Sf;
171Foam::interfaceProperties::interfaceProperties
178 transportPropertiesDict_(
dict),
179 nAlphaSmoothCurvature_
182 getOrDefault<int>(
"nAlphaSmoothCurvature", 0)
216 "interfaceProperties:K",
233 return sigmaPtr_->sigma()*K_;
247 return pos0(alpha1_ - 0.01)*
pos0(0.99 - alpha1_);
259 alpha1_.mesh().solverDict(alpha1_.name()).readEntry(
"cAlpha", cAlpha_);
260 sigmaPtr_->readDict(transportPropertiesDict_);
const volScalarField & alpha1
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
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,...
Mesh data needed to do the Finite Volume discretisation.
const surfaceVectorField & Sf() const
Return cell face area vectors.
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.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
Area-weighted average a surfaceField creating a volField.
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< Type, fvPatchField, volMesh > > average(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Area-weighted average a surfaceField creating a volField.
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)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionSet dimless
Dimensionless.
dimensionedScalar pos0(const dimensionedScalar &ds)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimArea(sqr(dimLength))
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
constexpr scalar degToRad() noexcept
Multiplication factor for degrees to radians conversion.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
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).
dimensionedScalar cbrt(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &f1, const label comm)
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.