Go to the documentation of this file.
42 namespace regionModels
44 namespace surfaceFilmModels
84 const scalar rMin = 1
e-6;
87 forAll(definedPatchRadii_, i)
89 label patchI = definedPatchRadii_[i].first();
90 scalar definedInvR1 = 1.0/
max(rMin, definedPatchRadii_[i].second());
95 const scalar rMax = 1e6;
98 if (
mag(invR1[i]) < 1/rMax)
104 if (debug &&
mesh.time().outputTime())
127 label cellO = own[faceI];
128 label cellN = nbr[faceI];
130 if (
phi[faceI] > phiMax[cellO])
132 phiMax[cellO] =
phi[faceI];
133 cosAngle[cellO] = -gHat_ & nf[faceI];
135 if (-
phi[faceI] > phiMax[cellN])
137 phiMax[cellN] = -
phi[faceI];
138 cosAngle[cellN] = -gHat_ & -nf[faceI];
150 label cellI = faceCells[i];
151 if (phip[i] > phiMax[cellI])
153 phiMax[cellI] = phip[i];
154 cosAngle[cellI] = -gHat_ & nf[i];
195 if (debug &&
mesh.time().outputTime())
202 mesh.time().timeName(),
208 zeroGradientFvPatchScalarField::typeName
215 return max(
min(cosAngle, scalar(1.0)), scalar(-1.0));
229 deltaByR1Min_(coeffDict_.lookupOrDefault<scalar>(
"deltaByR1Min", 0.0)),
230 definedPatchRadii_(),
234 if (magG_ < ROOTVSMALL)
237 <<
"Acceleration due to gravity must be non-zero"
241 gHat_ = owner.
g().
value()/magG_;
255 const label patchI = patchIDs[j];
257 if (!uniquePatchIDs.
found(patchI))
259 const scalar radius = prIn[i].second();
262 uniquePatchIDs.
insert(patchI);
267 definedPatchRadii_.transfer(prData);
287 refCast<const kinematicSingleLayer>(this->owner());
301 const scalar Fthreshold = 1
e-10;
306 if ((invR1[i] > 0) && (
delta[i]*invR1[i] > deltaByR1Min_))
308 scalar R1 = 1.0/(invR1[i] + ROOTVSMALL);
309 scalar R2 = R1 +
delta[i];
312 scalar Fi = -
delta[i]*
rho[i]*magSqrU[i]*72.0/60.0*invR1[i];
316 - 0.5*
rho[i]*magG_*invR1[i]*(
sqr(R1) -
sqr(R2))*cosAngle[i];
319 scalar Fs =
sigma[i]/R2;
321 Fnet[i] = Fi +
Fb + Fs;
323 if (Fnet[i] + Fthreshold < 0)
331 massToInject = separated*availableMass;
332 diameterToInject = separated*
delta;
333 availableMass -= separated*availableMass;
335 addToInjectedMass(
sum(separated*availableMass));
337 if (debug &&
mesh.time().outputTime())
344 mesh.time().timeName(),
350 zeroGradientFvPatchScalarField::typeName
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
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)
virtual ~curvatureSeparation()
Destructor.
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
const dimensionSet dimVelocity
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
virtual const volVectorField & U() const
Return the film velocity [m/s].
tmp< volScalarField > calcInvR1(const volVectorField &U) const
Calculate local (inverse) radius of curvature.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Calculate the divergence of the given field.
curvatureSeparation(const curvatureSeparation &)
Disallow default bitwise copy construct.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const Type & value() const
Return const reference to value.
dimensioned< scalar > mag(const dimensioned< Type > &)
const dimensionSet dimForce
wordList names() const
Return a list of patch names.
Curvature film separation model.
const dimensionedVector & g() const
Return the accleration due to gravity.
An indexed form of CGAL::Triangulation_face_base_2<K> used to keep track of the vertices in the trian...
tmp< vectorField > nf() const
Return face normals.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
InternalField & internalField()
Return internal field.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual const surfaceScalarField & phi() const
Return the film flux [kg.m/s].
A list of keyword definitions, which are a keyword followed by any number of values (e....
Base class for film injection models, handling mass transfer from the film.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Generic dimensioned Type class.
bool found(const Key &) const
Return true if hashedEntry is found in table.
Mesh data needed to do the Finite Volume discretisation.
const double e
Elementary charge.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void correctBoundaryConditions()
Correct boundary field.
const volScalarField & sigma() const
Return const access to the surface tension / [m/s2].
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
defineTypeNameAndDebug(kinematicSingleLayer, 0)
bool findStrings(const wordReListMatcher &matcher, const std::string &str)
Return true if string matches one of the regular expressions.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const fvPatch & patch() const
Return patch.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Calculate the gradient of the given field.
virtual const volVectorField & nHat() const
Return the patch normal vectors.
const volScalarField & delta() const
Return const access to the film thickness / [m].
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool insert(const Key &key)
Insert a new entry.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
addToRunTimeSelectionTable(surfaceFilmModel, kinematicSingleLayer, mesh)
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
virtual const labelUList & faceCells() const
Return faceCells.
A List with indirect addressing.
Operations on lists of strings.
Base class for surface film models.
void size(const label)
Override size to be inconsistent with allocated storage.
A 2-tuple for storing two objects of different types.
virtual const volScalarField & rho() const
Return the film density [kg/m3].
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Generic GeometricField class.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
tmp< scalarField > calcCosAngle(const surfaceScalarField &phi) const
Calculate the cosine of the angle between gravity vector and.
const fvMesh & regionMesh() const
Return the region mesh database.