mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Check if the Lagragian cloud is active before reading massTotal & SOI in InjectionModel.C
If the cloud was inactive, massTotal and SOI were needed even for steady Lagrangian
This commit is contained in:
@ -318,16 +318,19 @@ Foam::InjectionModel<CloudType>::InjectionModel
|
||||
Info<< " injector ID: " << injectorID_ << endl;
|
||||
}
|
||||
|
||||
if (owner.solution().transient())
|
||||
if (owner.solution().active())
|
||||
{
|
||||
this->coeffDict().lookup("massTotal") >> massTotal_;
|
||||
this->coeffDict().lookup("SOI") >> SOI_;
|
||||
}
|
||||
else
|
||||
{
|
||||
massFlowRate_.reset(this->coeffDict());
|
||||
massTotal_ = massFlowRate_.value(owner.db().time().value());
|
||||
this->coeffDict().readIfPresent("SOI", SOI_);
|
||||
if (owner.solution().transient())
|
||||
{
|
||||
this->coeffDict().lookup("massTotal") >> massTotal_;
|
||||
this->coeffDict().lookup("SOI") >> SOI_;
|
||||
}
|
||||
else
|
||||
{
|
||||
massFlowRate_.reset(this->coeffDict());
|
||||
massTotal_ = massFlowRate_.value(owner.db().time().value());
|
||||
this->coeffDict().readIfPresent("SOI", SOI_);
|
||||
}
|
||||
}
|
||||
|
||||
SOI_ = owner.db().time().userTimeToTime(SOI_);
|
||||
|
||||
Reference in New Issue
Block a user