From c659d99368aa1b592fe06bd585c588e24023b826 Mon Sep 17 00:00:00 2001 From: sergio Date: Thu, 17 Nov 2016 11:48:13 -0800 Subject: [PATCH] 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 --- .../InjectionModel/InjectionModel.C | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index ac31a793f5..38e324f3ec 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -318,16 +318,19 @@ Foam::InjectionModel::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_);