mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-26 03:00:17 -06:00
Merge pull request #777 from qilicun/fix_polymer_rates_bug
Fix polymer rates bug
This commit is contained in:
commit
68771e6ef5
@ -19,6 +19,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
#include <opm/polymer/PolymerInflow.hpp>
|
||||
#include <opm/core/wells.h>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
@ -55,7 +56,7 @@ namespace Opm
|
||||
if (step_start + eps >= stime_ && step_end - eps <= etime_) {
|
||||
std::fill(poly_inflow_c.begin(), poly_inflow_c.end(), amount_);
|
||||
} else if (step_start + eps <= etime_ && step_end - eps >= stime_) {
|
||||
OPM_MESSAGE("Warning: polymer injection set to change inside timestep. Using value at start of step.");
|
||||
OpmLog::warning("polymer injection set to change inside timestep. Using value at start of step.");
|
||||
std::fill(poly_inflow_c.begin(), poly_inflow_c.end(), amount_);
|
||||
} else {
|
||||
std::fill(poly_inflow_c.begin(), poly_inflow_c.end(), 0.0);
|
||||
@ -103,7 +104,7 @@ namespace Opm
|
||||
// names.
|
||||
int wix = 0;
|
||||
for (; wix < wells.number_of_wells; ++wix) {
|
||||
if (wellPolymerRate_.count(wells.name[wix]) > 0) {
|
||||
if (map_it->first == wells.name[wix]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user