33 namespace regionModels
35 namespace surfaceFilmModels
45 patchInjection::patchInjection
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" 126 scalar dMassPatch = 0;
130 label celli = faceCells[fci];
133 scalar dMass = ddelta*rho[celli]*magSf[celli];
134 massToInject[celli] += dMass;
135 availableMass[celli] -= dMass;
149 getModelProperty<scalarField>
151 "patchInjectedMasses",
160 setModelProperty<scalarField>
162 "patchInjectedMasses",
178 getModelProperty<scalarField>
180 "patchInjectedMasses",
192 patchInjectedMasses[pidi] + patchInjectedMassTotals[pidi];
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
scalarField patchInjectedMasses_
Injected mass for each patch at which the film is removed.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual ~patchInjection()
Destructor.
virtual void patchInjectedMassTotals(scalarField &patchMasses) const
Accumulate the total mass injected for the patches into the.
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Macros for easy insertion into run-time selection tables.
const fvMesh & regionMesh() const
Return the region mesh database.
labelList patchIDs_
List of patch IDs at which the film is removed.
addToRunTimeSelectionTable(surfaceFilmModel, kinematicSingleLayer, mesh)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
wordList patchNames(nPatches)
scalar deltaStable_
Stable film thickness - mass only removed if thickness execeeds.
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.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
virtual const volScalarField & delta() const =0
Return the film thickness [m].
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
void addToInjectedMass(const scalar dMass)
Add to injected mass.
Base class for film injection models, handling mass transfer from the film.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
const labelUList & faceCells() const
Return face-cell addressing.
const surfaceFilmModel & owner() const
Return const access to the owner surface film model.
Base class for surface film models.
virtual bool writeTime() const
Flag to indicate when to write a property.
A patch is a list of labels that address the faces in the global face list.
defineTypeNameAndDebug(kinematicSingleLayer, 0)
const word & name() const
Return name.
label size() const
Return the number of elements in the UPtrList.
virtual const volScalarField & rho() const =0
Return the film density [kg/m3].