Go to the documentation of this file.
39 namespace regionModels
41 namespace surfaceFilmModels
50 void contactAngleForce::initialise()
52 const wordRes zeroForcePatches
57 if (zeroForcePatches.size())
60 const scalar dLim =
coeffDict_.
get<scalar>(
"zeroForceDistance");
62 Info<<
" Assigning zero contact force within " << dLim
63 <<
" of patches:" <<
endl;
67 for (
const label patchi : patchIDs)
69 Info<<
" " << pbm[patchi].name() <<
endl;
97 contactAngleForce::contactAngleForce
105 Ccf_(coeffDict_.get<scalar>(
"Ccf")),
110 typeName +
":contactForceMask",
111 filmModel_.time().timeName(),
112 filmModel_.regionMesh(),
116 filmModel_.regionMesh(),
140 typeName +
":contactForce",
168 const label cellO = own[facei];
169 const label cellN = nbr[facei];
172 if ((
alpha[cellO] > 0.5) && (
alpha[cellN] < 0.5))
176 else if ((
alpha[cellO] < 0.5) && (
alpha[cellN] > 0.5))
181 if (celli != -1 && mask_[celli] > 0.5)
185 gradAlpha[celli]/(
mag(gradAlpha[celli]) + ROOTVSMALL);
187 force[celli] += Ccf_*
n*
sigma[celli]*(1 - cosTheta)/invDx;
204 if (maskPf[facei] > 0.5)
208 if ((
alpha[cellO] > 0.5) && (alphaPf[facei] < 0.5))
212 /(
mag(gradAlpha[cellO]) + ROOTVSMALL);
213 const scalar cosTheta =
cos(
degToRad(thetaPf[facei]));
215 Ccf_*
n*sigmaPf[facei]*(1 - cosTheta)/invDx[facei];
234 tfvm.
ref() += tForce;
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
A class for handling words, derived from Foam::string.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
bool writeTime() const
Return true if this is a write time.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
static word timeName(const scalar t, const int precision=precision_)
const dictionary coeffDict_
Coefficients dictionary.
const Time & time() const
Return the reference to the time database.
Unit conversion functions.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar pos0(const dimensionedScalar &ds)
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
const dimensionSet dimForce
const surfaceScalarField & deltaCoeffs() const
Return reference to cell-centre difference coefficients.
#define forAll(list, i)
Loop across all elements in list.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
virtual const volScalarField & sigma() const =0
Return the film surface tension [N/m].
fvMatrix< vector > fvVectorMatrix
const dimensionSet dimArea(sqr(dimLength))
bool isCoupledPatch(const label regionPatchi) const
Return true if patchi on the local region is a coupled.
Base class for surface film models.
messageStream Info
Information stream (uses stdout - output is on the master only)
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
const fvMesh & regionMesh() const
Return the region mesh database.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual const volScalarField & alpha() const =0
Return the film coverage, 1 = covered, 0 = uncovered / [].
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const labelUList & neighbour() const
Internal face neighbour.
Macros for easy insertion into run-time selection tables.
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
const labelUList & owner() const
Internal face owner. Note bypassing virtual mechanism so.
defineTypeNameAndDebug(kinematicSingleLayer, 0)
Base class for film (stress-based) force models.
Calculate the gradient of the given field.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const scalarField & deltaCoeffs() const
virtual const labelUList & faceCells() const
Return faceCells.
const Time & time() const
Return the top-level database.
const fvPatch & patch() const
Return patch.
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys and label hasher.
surfaceFilmRegionModel & filmModel_
Reference to the film surface film model.
const dimensionSet dimVolume(pow3(dimLength))
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Smooth ATC in cells next to a set of patches supplied by type.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
dimensionedScalar cos(const dimensionedScalar &ds)