Go to the documentation of this file.
39 namespace regionModels
41 namespace areaSurfaceFilmModels
72 const scalar rMin = 1
e-6;
73 const scalar definedInvR1 = 1.0/
max(rMin, definedPatchRadii_);
75 if (definedPatchRadii_ > 0)
81 const scalar rMax = 1e6;
84 if ((
mag(invR1[i]) < 1/rMax))
114 const label cellO = own[edgei];
115 const label cellN = nbr[edgei];
117 if (
phi[edgei] > phiMax[cellO])
119 phiMax[cellO] =
phi[edgei];
120 cosAngle[cellO] = -gHat_ & UHat[cellN];
122 if (-
phi[edgei] > phiMax[cellN])
124 phiMax[cellN] = -
phi[edgei];
125 cosAngle[cellN] = -gHat_ & UHat[cellO];
129 cosAngle *=
pos(invR1);
139 film().primaryMesh().time().
timeName(),
140 film().primaryMesh(),
151 return max(
min(cosAngle, scalar(1)), scalar(-1));
157 curvatureSeparation::curvatureSeparation
165 deltaByR1Min_(coeffDict_.getOrDefault<scalar>(
"deltaByR1Min", 0)),
168 coeffDict_.getOrDefault<scalar>(
"definedPatchRadii", 0)
174 coeffDict_.getOrDefault<scalar>(
"fThreshold", 1
e-8)
178 coeffDict_.getOrDefault<scalar>(
"minInvR1", 5)
181 if (magG_ < ROOTVSMALL)
184 <<
"Acceleration due to gravity must be non-zero"
188 gHat_ = film.
g().
value()/magG_;
220 if ((invR1[i] > minInvR1_) && (
delta[i]*invR1[i] > deltaByR1Min_))
222 const scalar R1 = 1.0/(invR1[i] + ROOTVSMALL);
223 const scalar R2 = R1 +
delta[i];
226 const scalar Fi = -
delta[i]*
rho[i]*magSqrU[i]*72.0/60.0*invR1[i];
230 - 0.5*
rho[i]*magG_*invR1[i]*(
sqr(R1) -
sqr(R2))*cosAngle[i];
233 const scalar Fs =
sigma[i]/R2;
235 Fnet[i] = Fi +
Fb + Fs;
237 if (Fnet[i] + fThreshold_ < 0)
245 massToInject = separated*availableMass;
246 diameterToInject = separated*
delta;
247 availableMass -= separated*availableMass;
249 addToInjectedMass(
sum(massToInject));
258 film().primaryMesh().time().
timeName(),
259 film().primaryMesh(),
273 film().primaryMesh().time().
timeName(),
274 film().primaryMesh(),
281 areaSeparated.write();
288 film().primaryMesh().time().
timeName(),
289 film().primaryMesh(),
296 areaMassToInject.write();
303 film().primaryMesh().time().
timeName(),
304 film().primaryMesh(),
int debug
Static debugging option.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
const dimensionSet dimVelocity
autoPtr< surfaceVectorField > Uf
const edgeScalarField & phi2s() const
Access continuity flux.
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
const Type & value() const
Return const reference to value.
const dimensionSet dimForce
addToRunTimeSelectionTable(liquidFilmBase, kinematicThinFilm, dictionary)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAll(list, i)
Loop across all elements in list.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
const areaVectorField & Uf() const
Access const reference Uf.
Base class for film injection models, handling mass transfer from the film.
An indexed form of CGAL::Triangulation_face_base_2<K> used to keep track of the vertices in the trian...
const uniformDimensionedVectorField & g() const
Gravity.
bool writeTime() const noexcept
True if this is a write time.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
const areaVectorField & faceAreaNormals() const
Return face area normals.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const faMesh & regionMesh() const
Return the region mesh database.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
tmp< scalarField > calcCosAngle(const edgeScalarField &phi) const
errorManipArg< error, int > exit(error &err, const int errNo=1)
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
void correctBoundaryConditions()
Correct boundary field.
virtual const areaScalarField & rho() const =0
Access const reference rho.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
defineTypeNameAndDebug(kinematicThinFilm, 0)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
tmp< areaScalarField > calcInvR1(const areaVectorField &U, const scalarField &calcCosAngle) const
Calculate local (inverse) radius of curvature.
const dimensionedScalar e
Elementary charge.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
const areaScalarField & h() const
Access const reference h.
Finite area mesh. Used for 2-D non-Euclidian finite area method.
const Time & time() const
Return the top-level database.
Operations on lists of strings.
label nFaces() const noexcept
Number of mesh faces.
virtual const areaScalarField & sigma() const =0
Access const reference sigma.
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
const dimensionSet dimless
Dimensionless.
dimensionedScalar pos(const dimensionedScalar &ds)