Commit 75b2f2c2 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: Updated cloud injection constructor for steady operation

parent 0d96d6e0
......@@ -255,7 +255,10 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition
"Foam::InjectionModel<CloudType>::findCellAtPosition"
"("
"label&, "
"vector&"
"label&, "
"label&, "
"vector&, "
"bool"
")"
) << "Cannot find parcel injection cell. "
<< "Parcel position = " << p0 << nl
......@@ -386,9 +389,9 @@ Foam::InjectionModel<CloudType>::InjectionModel
)
:
SubModelBase<CloudType>(owner, dict, type),
SOI_(readScalar(this->coeffDict().lookup("SOI"))),
SOI_(0.0),
volumeTotal_(0.0),
massTotal_(readScalar(this->coeffDict().lookup("massTotal"))),
massTotal_(0.0),
massInjected_(0.0),
nInjections_(0),
parcelsAddedTotal_(0),
......@@ -403,6 +406,16 @@ Foam::InjectionModel<CloudType>::InjectionModel
Info<< " Constructing " << owner.mesh().nGeometricD() << "-D injection"
<< endl;
if (owner.solution().transient())
{
this->coeffDict().lookup("massTotal") >> massTotal_;
this->coeffDict().lookup("SOI") >> SOI_;
}
else
{
this->coeffDict().lookup("massFlowRate") >> massTotal_;
}
const word parcelBasisType = this->coeffDict().lookup("parcelBasisType");
if (parcelBasisType == "mass")
......
......@@ -102,7 +102,7 @@ protected:
// Global injection properties
//- Start of injection [s]
const scalar SOI_;
scalar SOI_;
//- Total volume of particles introduced by this injector [m^3]
// - scaled to ensure massTotal is achieved
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment