Go to the documentation of this file.
33 namespace regionModels
35 namespace surfaceFilmModels
52 deltaStable_(coeffDict_.lookupOrDefault<scalar>(
"deltaStable", 0.0))
57 if (coeffDict_.found(
"patches"))
62 Info<<
" applying to patches:" <<
nl;
68 patchIDs_[pidi++] =
patchi;
71 patchIDs_.setSize(pidi);
72 patchInjectedMasses_.setSize(pidi, 0);
76 Info<<
" applying to all patches" <<
endl;
83 patchInjectedMasses_.setSize(pbm.
size(), 0);
86 if (!patchIDs_.size())
89 <<
"No patches selected"
111 if (!patchIDs_.size())
return;
126 scalar dMassPatch = 0;
130 label celli = faceCells[fci];
132 scalar ddelta =
max(0.0,
delta[celli] - deltaStable_);
133 scalar dMass = ddelta*
rho[celli]*magSf[celli];
134 massToInject[celli] += dMass;
135 availableMass[celli] -= dMass;
139 patchInjectedMasses_[pidi] += dMassPatch;
140 addToInjectedMass(dMassPatch);
149 getModelProperty<scalarField>
151 "patchInjectedMasses",
156 scalarField patchInjectedMassTotals(patchInjectedMasses_);
158 patchInjectedMasses0 += patchInjectedMassTotals;
160 setModelProperty<scalarField>
162 "patchInjectedMasses",
166 patchInjectedMasses_ = 0;
178 getModelProperty<scalarField>
180 "patchInjectedMasses",
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
scalarField patchInjectedMasses_
Injected mass for each patch at which the film is removed.
#define forAll(list, i)
Loop across all elements in list.
virtual void patchInjectedMassTotals(scalarField &patchMasses) const
Accumulate the total mass injected for the patches into the.
virtual const volScalarField & rho() const =0
Return the film density [kg/m3].
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual const volScalarField & delta() const =0
Return the film thickness [m].
virtual ~patchInjection()
Destructor.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
labelList patchIDs_
List of patch IDs at which the film is removed.
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.
patchInjection(const patchInjection &)
Disallow default bitwise copy construct.
A patch is a list of labels that address the faces in the global face list.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
const word & name() const
Return name.
wordList patchNames(nPatches)
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.
Macros for easy insertion into run-time selection tables.
const labelUList & faceCells() const
Return face-cell addressing.
Remove and inject the mass in the film as it passes over the selected patches.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
defineTypeNameAndDebug(kinematicSingleLayer, 0)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label size() const
Return the number of elements in the PtrList.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
addToRunTimeSelectionTable(surfaceFilmModel, kinematicSingleLayer, mesh)
Base class for surface film models.
void size(const label)
Override size to be inconsistent with allocated storage.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool usePatchGroups=true) const
Return the set of patch IDs corresponding to the given names.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
const fvMesh & regionMesh() const
Return the region mesh database.