41namespace surfaceFilmModels
50void contactAngleForce::initialise()
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)
105 Ccf_(coeffDict_.get<scalar>(
"Ccf")),
110 typeName +
":contactForceMask",
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;
Macros for easy insertion into run-time selection tables.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
bool writeTime() const noexcept
True if this is a write time.
static word timeName(const scalar t, const int precision=precision_)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
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 Time & time() const
Return the top-level database.
const labelUList & owner() const
Internal face owner. Note bypassing virtual mechanism so.
const labelUList & neighbour() const
Internal face neighbour.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
const fvPatch & patch() const
Return patch.
const scalarField & deltaCoeffs() const
virtual const labelUList & faceCells() const
Return faceCells.
Fast topological mesh-wave method for calculating the distance to nearest patch for all cells and bou...
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const Time & time() const
Return the reference to the time database.
bool isCoupledPatch(const label regionPatchi) const
Return true if patchi on the local region is a coupled.
const fvMesh & regionMesh() const
Return the region mesh database.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
surfaceFilmRegionModel & filmModel_
Reference to the film surface film model.
Base class for film (stress-based) force models.
Base class for surface film models.
virtual const volScalarField & sigma() const =0
Return the film surface tension [N/m].
virtual const volScalarField & alpha() const =0
Return the film coverage, 1 = covered, 0 = uncovered / [].
const dictionary coeffDict_
Coefficients dictionary.
virtual const surfaceScalarField & deltaCoeffs() const
Return reference to cell-centre difference coefficients.
A class for managing temporary objects.
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Calculate the gradient of the given field.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimless
Dimensionless.
dimensionedScalar pos0(const dimensionedScalar &ds)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const dimensionSet dimArea(sqr(dimLength))
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr scalar degToRad() noexcept
Multiplication factor for degrees to radians conversion.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fvMatrix< vector > fvVectorMatrix
const dimensionSet dimForce
static constexpr const zero Zero
Global zero (0)
const dimensionSet dimVolume(pow3(dimLength))
dimensionedScalar cos(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.
Unit conversion functions.