mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-12 08:54:53 -05:00
adding a use_multisegment_well_
to determine whether we will treat mutlisegment wells with MultisegmentWell well model. Currently, it will be faulse by default. It might be changed to be true by default when considering the multisegment well model is well tested.
This commit is contained in:
1 parent
3255626b2e
commit
0dc041d46a
5 files changed
+19
-6
No files matched your search
@@ -56,6 +56,7 @@ namespace Opm
|
||||
solve_welleq_initially_ = param.getDefault("solve_welleq_initially",solve_welleq_initially_);
|
||||
update_equations_scaling_ = param.getDefault("update_equations_scaling", update_equations_scaling_);
|
||||
use_update_stabilization_ = param.getDefault("use_update_stabilization", use_update_stabilization_);
|
||||
use_multisegment_well_ = param.getDefault("use_multisegment_well", use_multisegment_well_);
|
||||
deck_file_name_ = param.template get<std::string>("deck_filename");
|
||||
}
|
||||
|
||||
@@ -79,6 +80,7 @@ namespace Opm
|
||||
solve_welleq_initially_ = true;
|
||||
update_equations_scaling_ = false;
|
||||
use_update_stabilization_ = true;
|
||||
use_multisegment_well_ = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -68,6 +68,13 @@ namespace Opm
|
||||
/// Try to detect oscillation or stagnation.
|
||||
bool use_update_stabilization_;
|
||||
|
||||
/// Whehter to use MultisegmentWell to handle multisegment wells
|
||||
// it is something temporary before the multisegment well model is considered to be
|
||||
// well developed and tested.
|
||||
// if it is false, we will handle multisegment wells as standard wells, which will be
|
||||
// the default behavoir for the moment. Later, we might it to be true by default if necessary
|
||||
bool use_multisegment_well_;
|
||||
|
||||
// The file name of the deck
|
||||
std::string deck_file_name_;
|
||||
|
||||
|
||||
@@ -299,10 +299,12 @@ public:
|
||||
const auto& wells_ecl = eclState().getSchedule().getWells(timer.currentStepNum());
|
||||
extractLegacyCellPvtRegionIndex_();
|
||||
// handling MS well related
|
||||
for (const auto& well : wells_ecl) {
|
||||
if (well->isMultiSegment(timer.currentStepNum())) { // there is one well is MS well
|
||||
well_state.initWellStateMSWell(wells, wells_ecl, timer.currentStepNum(), phaseUsage_, prev_well_state);
|
||||
break;
|
||||
if (model_param_.use_multisegment_well_) { // if we use MultisegmentWell model
|
||||
for (const auto& well : wells_ecl) {
|
||||
if (well->isMultiSegment(timer.currentStepNum()) ) { // there is one well is MS well
|
||||
well_state.initWellStateMSWell(wells, wells_ecl, timer.currentStepNum(), phaseUsage_, prev_well_state);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
WellModel well_model(wells, &(wells_manager.wellCollection()), wells_ecl, model_param_,
|
||||
|
||||
@@ -175,6 +175,7 @@ namespace Opm {
|
||||
// create the well container
|
||||
static std::vector<WellInterfacePtr > createWellContainer(const Wells* wells,
|
||||
const std::vector<const Well*>& wells_ecl,
|
||||
const bool use_multisegment_well,
|
||||
const int time_step);
|
||||
|
||||
// Well collection is used to enforce the group control
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Opm {
|
||||
, wells_ecl_(wells_ecl)
|
||||
, number_of_wells_(wells_arg ? (wells_arg->number_of_wells) : 0)
|
||||
, number_of_phases_(wells_arg ? (wells_arg->number_of_phases) : 0) // TODO: not sure if it is proper for this way
|
||||
, well_container_(createWellContainer(wells_arg, wells_ecl, current_timeIdx) )
|
||||
, well_container_(createWellContainer(wells_arg, wells_ecl, param.use_multisegment_well_, current_timeIdx) )
|
||||
, well_collection_(well_collection)
|
||||
, param_(param)
|
||||
, terminal_output_(terminal_output)
|
||||
@@ -117,6 +117,7 @@ namespace Opm {
|
||||
StandardWellsDense<TypeTag>::
|
||||
createWellContainer(const Wells* wells,
|
||||
const std::vector< const Well* >& wells_ecl,
|
||||
const bool use_multisegment_well,
|
||||
const int time_step)
|
||||
{
|
||||
std::vector<WellInterfacePtr> well_container;
|
||||
@@ -147,7 +148,7 @@ namespace Opm {
|
||||
|
||||
const Well* well_ecl = wells_ecl[index_well];
|
||||
|
||||
if ( !well_ecl->isMultiSegment(time_step) ) {
|
||||
if ( !well_ecl->isMultiSegment(time_step) || !use_multisegment_well) {
|
||||
well_container.emplace_back(new StandardWell<TypeTag>(well_ecl, time_step, wells) );
|
||||
} else {
|
||||
well_container.emplace_back(new MultisegmentWell<TypeTag>(well_ecl, time_step, wells) );
|
||||
|
||||
Reference in new issue
Block a user