49injectionModelList::injectionModelList
66 const wordList activeModels(
dict.lookup(
"injectionModels"));
70 Info<<
" Selecting film injection models" <<
endl;
76 for (
const word& model : models)
121 film().regionMesh().nFaces()
129 for (injectionModel& im : models)
147 const List<labelPair>& patchFaces
150 if (patchFaces.size() != availableMass.
size())
153 <<
"film has " << patchFaces.size()
154 <<
" faces, but availableMass has " << availableMass.
size()
162 for (injectionModel& im : models)
172 massInjected_ +=
gSum(massToInjectTmp);
177 const labelPair& patchAndFace = patchFaces[i];
179 if (patchAndFace.first() >= 0)
182 = massToInjectTmp[i];
185 = diameterToInjectTmp[i];
196 scalar injectedMass = 0;
197 scalar patchInjectedMasses = 0;
199 for (
const injectionModel& im : *
this)
201 injectedMass += im.injectedMassTotal();
202 im.patchInjectedMassTotals(patchInjectedMasses);
208 scalar mass(massInjected_);
211 os <<
indent <<
"injected mass = " << injectedMass <<
nl;
213 if (
mag(patchInjectedMasses) > VSMALL)
217 for (
const label patchi :
film().primaryPatchIDs())
219 os <<
' ' <<
pbm[patchi].name();
221 os <<
" = " << patchInjectedMasses <<
nl;
226 for (
const label patchi :
film().primaryPatchIDs())
228 os <<
' ' <<
pbm[patchi].name();
230 os <<
" " << mass <<
endl;
const polyBoundaryMesh & pbm
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
label size() const noexcept
The number of elements in table.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const T & first() const noexcept
Access the first element.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
const injectionModel * set(const label i) const
void setSize(const label n)
constexpr PtrList() noexcept
void size(const label n)
Older name for setAddressableSize.
bool empty() const noexcept
True if the list is empty (ie, size() is zero).
label size() const noexcept
The number of entries in the list.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const List< labelPair > & whichPatchFaces() const
The polyPatch/local-face for each faceLabels().
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
filmSubModelBase(liquidFilmBase &film)
Construct null.
const liquidFilmBase & film() const
Return const access to the film surface film model.
virtual bool writeTime() const
Flag to indicate when to write a property.
virtual void info(Ostream &os)
Provide some info.
virtual ~injectionModelList()
Destructor.
virtual void correct(scalarField &availableMass, volScalarField &massToInject, volScalarField &diameterToInject)
Correct.
Base class for film injection models, handling mass transfer from the film.
virtual scalar injectedMassTotal() const
Return the total mass injected.
virtual void patchInjectedMassTotals(scalar &patchMasses) const
Accumulate the total mass injected for the patches into the scalarField provided.
static autoPtr< injectionModel > New(liquidFilmBase &film, const dictionary &dict, const word &mdoelType)
Return a reference to the selected injection model.
const faMesh & regionMesh() const
Return the region mesh database.
const fvMesh & primaryMesh() const noexcept
Return the reference to the primary mesh database.
const labelList & primaryPatchIDs() const
List of patch IDs on the primary region coupled to this region.
Type getBaseProperty(const word &entryName, const Type &defaultValue=Type(Zero)) const
Retrieve generic property from the base model.
const dictionary & dict() const
Return const access to the cloud dictionary.
void setBaseProperty(const word &entryName, const Type &value)
Add generic property to the base model.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
Pair< label > labelPair
A pair of labels.
List< word > wordList
List of word.
Type gSum(const FieldField< Field, Type > &f)
HashSet< word, Hash< word > > wordHashSet
A HashSet of words, uses string hasher.
List< label > labelList
A List of labels.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere).
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & indent(Ostream &os)
Indent stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.