38 namespace regionModels
40 namespace areaSurfaceFilmModels
55 const word& modelType,
63 this->
solution().subDict(
"PIMPLE").
get<bool>(
"momentumPredictor")
67 this->
solution().subDict(
"PIMPLE").
get<label>(
"nOuterCorr")
69 nCorr_(this->
solution().subDict(
"PIMPLE").
get<label>(
"nCorr")),
72 this->
solution().subDict(
"PIMPLE").
get<label>(
"nFilmCorr")
78 pRef_(
dict.
get<scalar>(
"pRef")),
85 regionMesh().thisDb(),
97 regionMesh().thisDb(),
109 regionMesh().thisDb(),
120 "ppf_" + regionName_,
122 regionMesh().thisDb(),
133 "phif_" + regionName_,
135 regionMesh().thisDb(),
145 "phi2s_" + regionName_,
147 regionMesh().thisDb(),
159 regionMesh().thisDb(),
166 g_(meshObjects::gravity::
New(primaryMesh().time())),
173 primaryMesh().thisDb()
184 primaryMesh().thisDb()
195 primaryMesh().thisDb()
201 faOptions_(
Foam::fa::options::
New(primaryMesh()))
241 <<
" Film velocity magnitude: " <<
velMag <<
endl;
256 auto&
Uw = tUw.ref();
266 for (
const label patchi :
patches)
268 const auto* wpp = isA<movingWallVelocityFvPatchVectorField>
275 patchValues.
set(patchi, wpp->Uwall());
279 if (patchValues.size())
287 Uw.primitiveFieldRef() = UsWall() - nHat*(UsWall() & nHat);
324 auto&
Up = tUp.
ref();
334 for (
const label patchi :
patches)
338 patchValues.
set(patchi, -
Uw.snGrad());
343 vsmPtr_->mapToSurface(patchValues,
Up.primitiveFieldRef());
350 Up.primitiveFieldRef() -= nHat*(
Up.primitiveField() & nHat);
365 auto& pfg = tpg.ref();
372 pfg.primitiveFieldRef()
389 auto&
alpha = talpha.ref();
401 const scalar massSource,
402 const vector& momentumSource,
403 const scalar pressureSource,
404 const scalar energySource
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
virtual ~liquidFilmBase()
Destructor.
const edgeScalarField & deltaCoeffs() const
Return reference to difference factors array.
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
Calculate the second temporal derivative.
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
scalar deltaTValue() const noexcept
Return time step value.
Foam::fa::options & faOptions_
faOptions
uniformDimensionedVectorField g_
Gravity.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
tmp< areaVectorField > Up() const
Primary region velocity at film hight. Assume the film to be.
areaScalarField gn_
Normal gravity field.
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
edgeScalarField phif_
Film momentum flux.
const Internal & internalField() const noexcept
Return a const-reference to the dimensioned internal field.
areaScalarField h_
Film height.
virtual void postEvolveRegion()
Post-evolve region.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
areaVectorField Uf_
Film velocity.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
A HashTable of pointers to objects of type <T> with a label key.
const labelList & whichPolyPatches() const
The polyPatches related to the areaMesh, in sorted order.
tmp< areaScalarField > pg() const
Map primary static pressure.
const dimensionSet dimless
Dimensionless.
virtual scalar CourantNumber() const
Courant number evaluation.
defineTypeNameAndDebug(kinematicThinFilm, 0)
liquidFilmBase(const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from type name and mesh and dict.
volScalarField pnSource_
Normal pressure by particles.
volScalarField massSource_
Mass.
word pName_
Name of the pressure field.
volVectorField momentumSource_
Momentum.
const dimensionSet dimAcceleration
const dimensionedScalar e
Elementary charge.
defineRunTimeSelectionTable(liquidFilmBase, dictionary)
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
label size() const noexcept
The number of entries in the list.
virtual void postEvolveRegion()
Post-evolve film.
bool set(const Key &key, T *ptr)
Assign a new entry, overwrites existing.
const fvMesh & primaryMesh() const noexcept
Return the reference to the primary mesh database.
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
const faMesh & regionMesh() const
Return the region mesh database.
const dimensionSet dimPressure
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie...
tmp< areaVectorField > Us() const
Film surface film velocity.
static tmp< GeometricField< vector, faPatchField, areaMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=faPatchField< vector >::calculatedType())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
virtual void preEvolveRegion()
Pre-evolve film.
virtual void preEvolveRegion()
Pre-evolve region.
dimensionedScalar pos0(const dimensionedScalar &ds)
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
int debug
Static debugging option.
Base class for area region models.
word UName_
Name of the velocity field.
const Foam::word liquidFilmName("liquidFilm")
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
const polyBoundaryMesh & patches
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
dimensionedScalar deltaWet_
Film thickness beyond which face is assumed to be wet.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef()
const Time & time() const noexcept
Return the reference to the time database.
Selector class for relaxation factors, solver type and solution.
tmp< areaVectorField > Uw() const
Wall velocity.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
A class for managing temporary objects.
tmp< areaScalarField > alpha() const
Wet indicator using h0.
Defines the attributes of an object for which implicit objectRegistry management is supported...
const areaVectorField & faceAreaNormals() const
Return face area normals.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
Do not request registration (bool: false)
void reduce(T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce) using linear/tree communication schedule.
autoPtr< volSurfaceMapping > vsmPtr_
Volume/surface mapping.
static constexpr const zero Zero
Global zero (0)
const dimensionSet dimVelocity
virtual void addSources(const label patchi, const label facei, const scalar massSource, const vector &momentumSource, const scalar pressureSource, const scalar energySource=0)
Add sources.