Commit c659d993 authored by sergio's avatar sergio
Browse files

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
parent 2d36cc97
......@@ -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_);
......
Markdown is supported
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