mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-28 02:00:59 -06:00
Remove well_perforation_pressure_diffs fr WellStateFullyImplicitBlackoil
- Calculate the well perforatino pressure difference based on bhp and perforation pressures instead of storing it in WellStateFullyImplicitBlackoil
This commit is contained in:
parent
30bd24f2fe
commit
bd81bda57b
@ -385,7 +385,7 @@ namespace Opm {
|
||||
const int aix );
|
||||
|
||||
void computeWellConnectionPressures(const SolutionState& state,
|
||||
WellState& xw);
|
||||
const WellState& xw);
|
||||
|
||||
void
|
||||
assembleMassBalanceEq(const SolutionState& state);
|
||||
|
@ -799,7 +799,7 @@ namespace detail {
|
||||
|
||||
template <class Grid, class Implementation>
|
||||
void BlackoilModelBase<Grid, Implementation>::computeWellConnectionPressures(const SolutionState& state,
|
||||
WellState& xw)
|
||||
const WellState& xw)
|
||||
{
|
||||
if( ! localWellsActive() ) return ;
|
||||
|
||||
@ -892,9 +892,6 @@ namespace detail {
|
||||
// 4. Store the results
|
||||
well_perforation_densities_ = Eigen::Map<const V>(cd.data(), nperf);
|
||||
well_perforation_pressure_diffs_ = Eigen::Map<const V>(cdp.data(), nperf);
|
||||
for (int perf = 0; perf < nperf; ++perf){
|
||||
xw.well_perforation_pressure_diffs()[perf] = well_perforation_pressure_diffs_[perf];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright 2013 SINTEF ICT, Applied Mathematics.
|
||||
Copyright 2014-2015 IRIS AS
|
||||
Copyright 2014-2016 IRIS AS
|
||||
Copyright 2015 Andreas Lauser
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
@ -145,8 +145,8 @@ namespace Opm
|
||||
is_parallel_run_,
|
||||
well_potentials);
|
||||
const Wells* wells = wells_manager.c_wells();
|
||||
WellState well_state;
|
||||
well_state.init(wells, state, prev_well_state);
|
||||
WellState well_state;
|
||||
well_state.init(wells, state, prev_well_state);
|
||||
|
||||
// give the polymer and surfactant simulators the chance to do their stuff
|
||||
asImpl().handleAdditionalWellInflow(timer, wells_manager, well_state, wells);
|
||||
@ -219,7 +219,7 @@ namespace Opm
|
||||
step_report.reportParam(tstep_os);
|
||||
}
|
||||
|
||||
// Increment timer, remember well state.
|
||||
// Increment timer, remember well state.
|
||||
++timer;
|
||||
prev_well_state = well_state;
|
||||
asImpl().computeWellPotentials(timer.currentStepNum(), wells, state, well_state, well_potentials);
|
||||
@ -396,7 +396,6 @@ namespace Opm
|
||||
const int np = wells->number_of_phases;
|
||||
well_potentials.clear();
|
||||
well_potentials.resize(nw*np,0.0);
|
||||
std::map<std::string, int> well_names_to_index;
|
||||
if( ! xw.wellMap().empty() )
|
||||
{
|
||||
for (int w = 0; w < nw; ++w) {
|
||||
@ -414,14 +413,14 @@ namespace Opm
|
||||
}
|
||||
// TODO: do something for thp;
|
||||
}
|
||||
const double drawdown_maximum = well_cell_pressure - (bhp + xw.well_perforation_pressure_diffs()[perf]);
|
||||
// Calculate the pressure difference in the well perforation
|
||||
const double dp = xw.perfPress()[perf] - xw.bhp()[w];
|
||||
const double drawdown_maximum = well_cell_pressure - (bhp + dp);
|
||||
|
||||
for (int phase = 0; phase < np; ++phase) {
|
||||
well_potentials[w*np + phase] += (drawdown_maximum / drawdown_used * xw.perfPhaseRates()[perf*np + phase]);
|
||||
}
|
||||
}
|
||||
//std::cout << wells->name[w] << " " << well_potentials[w*np + 1] << " " <<xw.wellRates()[w*np + 1]<<std::endl;
|
||||
well_names_to_index[wells->name[w]] = w;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
/*
|
||||
Copyright 2014 SINTEF ICT, Applied Mathematics.
|
||||
Copyright 2015 IRIS AS
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
@ -103,8 +102,6 @@ namespace Opm
|
||||
current_controls_[w] = well_controls_get_current(wells->ctrls[w]);
|
||||
}
|
||||
|
||||
well_perforation_pressure_diffs_.resize(nperf);
|
||||
|
||||
// intialize wells that have been there before
|
||||
// order may change so the mapping is based on the well name
|
||||
if( ! prevState.wellMap().empty() )
|
||||
@ -178,6 +175,7 @@ namespace Opm
|
||||
init(wells, state, dummy_state) ;
|
||||
}
|
||||
|
||||
|
||||
/// One rate per phase and well connection.
|
||||
std::vector<double>& perfPhaseRates() { return perfphaserates_; }
|
||||
const std::vector<double>& perfPhaseRates() const { return perfphaserates_; }
|
||||
@ -186,14 +184,9 @@ namespace Opm
|
||||
std::vector<int>& currentControls() { return current_controls_; }
|
||||
const std::vector<int>& currentControls() const { return current_controls_; }
|
||||
|
||||
/// Pressure differance to the bhp for each well perforation.
|
||||
std::vector<double>& well_perforation_pressure_diffs() { return well_perforation_pressure_diffs_; }
|
||||
const std::vector<double>& well_perforation_pressure_diffs() const { return well_perforation_pressure_diffs_; }
|
||||
|
||||
private:
|
||||
std::vector<double> perfphaserates_;
|
||||
std::vector<int> current_controls_;
|
||||
std::vector<double> well_perforation_pressure_diffs_;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
Loading…
Reference in New Issue
Block a user