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