ENH: Updated cloud injection constructor for steady operation

This commit is contained in:
andy
2010-10-27 13:05:57 +01:00
parent 0d96d6e0d9
commit 75b2f2c2fa
2 changed files with 17 additions and 4 deletions

View File

@ -255,7 +255,10 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition
"Foam::InjectionModel<CloudType>::findCellAtPosition" "Foam::InjectionModel<CloudType>::findCellAtPosition"
"(" "("
"label&, " "label&, "
"vector&" "label&, "
"label&, "
"vector&, "
"bool"
")" ")"
) << "Cannot find parcel injection cell. " ) << "Cannot find parcel injection cell. "
<< "Parcel position = " << p0 << nl << "Parcel position = " << p0 << nl
@ -386,9 +389,9 @@ Foam::InjectionModel<CloudType>::InjectionModel
) )
: :
SubModelBase<CloudType>(owner, dict, type), SubModelBase<CloudType>(owner, dict, type),
SOI_(readScalar(this->coeffDict().lookup("SOI"))), SOI_(0.0),
volumeTotal_(0.0), volumeTotal_(0.0),
massTotal_(readScalar(this->coeffDict().lookup("massTotal"))), massTotal_(0.0),
massInjected_(0.0), massInjected_(0.0),
nInjections_(0), nInjections_(0),
parcelsAddedTotal_(0), parcelsAddedTotal_(0),
@ -403,6 +406,16 @@ Foam::InjectionModel<CloudType>::InjectionModel
Info<< " Constructing " << owner.mesh().nGeometricD() << "-D injection" Info<< " Constructing " << owner.mesh().nGeometricD() << "-D injection"
<< endl; << 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"); const word parcelBasisType = this->coeffDict().lookup("parcelBasisType");
if (parcelBasisType == "mass") if (parcelBasisType == "mass")

View File

@ -102,7 +102,7 @@ protected:
// Global injection properties // Global injection properties
//- Start of injection [s] //- Start of injection [s]
const scalar SOI_; scalar SOI_;
//- Total volume of particles introduced by this injector [m^3] //- Total volume of particles introduced by this injector [m^3]
// - scaled to ensure massTotal is achieved // - scaled to ensure massTotal is achieved