40 namespace regionModels
42 namespace areaSurfaceFilmModels
57 const word& modelType,
66 this->
solution().subDict(
"PIMPLE").
get<bool>(
"momentumPredictor")
70 this->
solution().subDict(
"PIMPLE").
get<label>(
"nOuterCorr")
72 nCorr_(this->
solution().subDict(
"PIMPLE").
get<label>(
"nCorr")),
75 this->
solution().subDict(
"PIMPLE").
get<label>(
"nFilmCorr")
86 pRef_(
dict.
get<scalar>(
"pRef")),
130 "ppf_" + regionName_,
143 "phif_" + regionName_,
156 "phi2s_" + regionName_,
180 g_(meshObjects::gravity::
New(primaryMesh().time())),
232 faOptions_(
Foam::fa::options::
New(primaryMesh()))
272 <<
" Film velocity magnitude: " <<
velMag <<
endl;
294 auto&
Uw = tUw.
ref();
304 for (
const label patchi :
patches)
306 const auto* wpp = isA<movingWallVelocityFvPatchVectorField>
313 patchValues.
set(patchi, wpp->Uwall());
317 if (patchValues.size())
325 Uw.primitiveFieldRef() = UsWall() - nHat*(UsWall() & nHat);
386 for (
const label patchi :
patches)
390 patchValues.
set(patchi, -
Uw.snGrad());
395 vsmPtr_->mapToSurface(patchValues,
Up.primitiveFieldRef());
402 Up.primitiveFieldRef() -= nHat*(
Up.primitiveField() & nHat);
424 auto& pfg = tpg.
ref();
431 pfg.primitiveFieldRef()
469 const scalar massSource,
470 const vector& momentumSource,
471 const scalar pressureSource,
472 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 Type & value() const noexcept
Return const reference to value.
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.
Foam::fa::options & faOptions_
faOptions
uniformDimensionedVectorField g_
Gravity.
const edgeScalarField & phif() const
Access to momentum flux.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const areaScalarField & h() const
Access const reference h.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Foam::fa::options & faOptions()
Return faOptions.
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)
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
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.
dimensionedScalar h0_
Smallest numerical thickness.
areaScalarField h_
Film hight.
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.
edgeScalarField phi2s_
Film height flux.
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 uniformDimensionedVectorField & g() const
Gravity.
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.
const dimensionedScalar & h0() const
Return h0.
defineRunTimeSelectionTable(liquidFilmBase, dictionary)
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
const areaVectorField & Uf() const
Access const reference Uf.
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 edgeScalarField & phi2s() const
Access continuity flux.
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.
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.
const dimensionSet dimEnergy
word UName_
Name of the velocity field.
scalar pRef()
Access to pRef.
const Foam::word liquidFilmName("liquidFilm")
scalar pRef_
Reference absolute pressure.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const areaScalarField & gn() const
Access const reference gn.
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.
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
Reduce inplace (cf. MPI Allreduce) using specified communication schedule.
dimensionedScalar deltaWet_
Delta wet for sub-models.
messageStream Info
Information stream (stdout output on master, null elsewhere)
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 regionFaModel & region() const
Access to this region.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
word UName() const
Name of the U field.
dimensionedScalar deltaT() const
Return time step.
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.