mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated cloud injection constructor for steady operation
This commit is contained in:
@ -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")
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user