mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
WellStateFullyImplicitBlackoil: call init of base class first.
This commit is contained in:
parent
7c175a816a
commit
dd4f362aa4
@ -58,9 +58,10 @@ namespace Opm
|
|||||||
template <class State, class PrevState>
|
template <class State, class PrevState>
|
||||||
void init(const Wells* wells, const State& state, const PrevState& prevState)
|
void init(const Wells* wells, const State& state, const PrevState& prevState)
|
||||||
{
|
{
|
||||||
// clear old name mapping
|
// call init on base class
|
||||||
wellMap().clear();
|
BaseType :: init(wells, state);
|
||||||
|
|
||||||
|
// if there are no well, do nothing in init
|
||||||
if (wells == 0) {
|
if (wells == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -68,10 +69,6 @@ namespace Opm
|
|||||||
const int nw = wells->number_of_wells;
|
const int nw = wells->number_of_wells;
|
||||||
if( nw == 0 ) return ;
|
if( nw == 0 ) return ;
|
||||||
|
|
||||||
// We use the WellState::init() function to do bhp and well rates init.
|
|
||||||
// The alternative would be to copy that function wholesale.
|
|
||||||
BaseType :: init(wells, state);
|
|
||||||
|
|
||||||
// Initialize perfphaserates_, which must be done here.
|
// Initialize perfphaserates_, which must be done here.
|
||||||
const int np = wells->number_of_phases;
|
const int np = wells->number_of_phases;
|
||||||
const int nperf = wells->well_connpos[nw];
|
const int nperf = wells->well_connpos[nw];
|
||||||
@ -85,7 +82,6 @@ namespace Opm
|
|||||||
if (well_controls_well_is_stopped(ctrl)) {
|
if (well_controls_well_is_stopped(ctrl)) {
|
||||||
// Shut well: perfphaserates_ are all zero.
|
// Shut well: perfphaserates_ are all zero.
|
||||||
} else {
|
} else {
|
||||||
// also store the number of perforations in this well
|
|
||||||
const int num_perf_this_well = wells->well_connpos[w + 1] - wells->well_connpos[w];
|
const int num_perf_this_well = wells->well_connpos[w + 1] - wells->well_connpos[w];
|
||||||
// Open well: Initialize perfphaserates_ to well
|
// Open well: Initialize perfphaserates_ to well
|
||||||
// rates divided by the number of perforations.
|
// rates divided by the number of perforations.
|
||||||
|
Loading…
Reference in New Issue
Block a user