37 namespace regionModels
39 namespace surfaceFilmModels
49 void contactAngleForce::initialise()
53 if (zeroForcePatches.size())
58 Info<<
" Assigning zero contact force within " << dLim
59 <<
" of patches:" <<
endl;
65 label patchI = iter.key();
66 Info<<
" " << pbm[patchI].name() <<
endl;
94 contactAngleForce::contactAngleForce
100 force(typeName, owner, dict),
102 rndGen_(
label(0), -1),
115 typeName +
":contactForceMask",
145 typeName +
":contactForce",
170 const label cellO = own[faceI];
171 const label cellN = nbr[faceI];
174 if ((alpha[cellO] > 0.5) && (alpha[cellN] < 0.5))
178 else if ((alpha[cellO] < 0.5) && (alpha[cellN] > 0.5))
183 if (cellI != -1 && mask_[cellI] > 0.5)
187 gradAlpha[cellI]/(
mag(gradAlpha[cellI]) + ROOTVSMALL);
188 scalar theta =
cos(
degToRad(distribution_->sample()));
189 force[cellI] += Ccf_*n*sigma[cellI]*(1.0 - theta)/invDx;
204 if (maskf[faceI] > 0.5)
206 label cellO = faceCells[faceI];
208 if ((alpha[cellO] > 0.5) && (alphaf[faceI] < 0.5))
212 /(
mag(gradAlpha[cellO]) + ROOTVSMALL);
213 scalar theta =
cos(
degToRad(distribution_->sample()));
215 Ccf_*n*sigma[cellO]*(1.0 - theta)/invDx[faceI];
surfaceFilmModel & owner_
Reference to the owner surface film model.
const dimensionSet dimForce
dimensioned< scalar > mag(const dimensioned< Type > &)
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
defineTypeNameAndDebug(kinematicSingleLayer, 0)
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
List< wordRe > wordReList
A List of wordRe (word or regular expression)
const dimensionSet dimArea(sqr(dimLength))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const dictionary coeffDict_
Coefficients dictionary.
addToRunTimeSelectionTable(surfaceFilmModel, kinematicSingleLayer, mesh)
const labelUList & owner() const
Internal face owner.
const fvMesh & regionMesh() const
Return the region mesh database.
const surfaceScalarField & deltaCoeffs() const
Return reference to cell-centre difference coefficients.
const Time & time() const
Return the reference to the time database.
Base class for film (stress-based) force models.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
fvMatrix< vector > fvVectorMatrix
virtual tmp< fvVectorMatrix > correct(volVectorField &U)
Correct.
Calculate the gradient of the given field.
const Time & time() const
Return the top-level database.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const surfaceFilmModel & owner() const
Return const access to the owner surface film model.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
virtual const volScalarField & alpha() const =0
Return the film coverage, 1 = covered, 0 = uncovered / [].
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
dimensionedScalar cos(const dimensionedScalar &ds)
Macros for easy insertion into run-time selection tables.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Unit conversion functions.
static autoPtr< distributionModel > New(const dictionary &dict, cachedRandom &rndGen)
Selector.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual const volScalarField & sigma() const =0
Return the film surface tension [N/m].
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dimensionSet dimVolume(pow3(dimLength))
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool outputTime() const
Return true if this is an output time (primary or secondary)
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
virtual ~contactAngleForce()
Destructor.
Base class for surface film models.
bool isCoupledPatch(const label regionPatchI) const
Return true if patchI on the local region is a coupled.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensionedScalar pos(const dimensionedScalar &ds)
const labelUList & neighbour() const
Internal face neighbour.
const fvPatch & patch() const
Return patch.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A class for managing temporary objects.