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:
sergio
2016-11-17 11:48:13 -08:00
parent 2d36cc97a7
commit c659d99368

View File

@ -318,6 +318,8 @@ Foam::InjectionModel<CloudType>::InjectionModel
Info<< " injector ID: " << injectorID_ << endl;
}
if (owner.solution().active())
{
if (owner.solution().transient())
{
this->coeffDict().lookup("massTotal") >> massTotal_;
@ -329,6 +331,7 @@ Foam::InjectionModel<CloudType>::InjectionModel
massTotal_ = massFlowRate_.value(owner.db().time().value());
this->coeffDict().readIfPresent("SOI", SOI_);
}
}
SOI_ = owner.db().time().userTimeToTime(SOI_);