mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adding updateState() for BlackoilMultiSegmentModel
This commit is contained in:
parent
2e74b7cbaf
commit
f496646182
@ -123,9 +123,9 @@ namespace Opm {
|
||||
/// \param[in] dx updates to apply to primary variables
|
||||
/// \param[in, out] reservoir_state reservoir state variables
|
||||
/// \param[in, out] well_state well state variables
|
||||
/* void updateState(const V& dx,
|
||||
void updateState(const V& dx,
|
||||
ReservoirState& reservoir_state,
|
||||
WellState& well_state) {}; */
|
||||
WellState& well_state);
|
||||
using Base::numPhases;
|
||||
|
||||
protected:
|
||||
@ -148,6 +148,13 @@ namespace Opm {
|
||||
using Base::grid_;
|
||||
using Base::canph_;
|
||||
using Base::residual_;
|
||||
using Base::isSg_;
|
||||
using Base::isRs_;
|
||||
using Base::isRv_;
|
||||
using Base::has_disgas_;
|
||||
using Base::has_vapoil_;
|
||||
using Base::primalVariable_;
|
||||
using Base::cells_;
|
||||
|
||||
|
||||
// Diff to the pressure of the related segment.
|
||||
@ -198,6 +205,12 @@ namespace Opm {
|
||||
using Base::fluidRvSat;
|
||||
using Base::fluidRsSat;
|
||||
using Base::fluidDensity;
|
||||
using Base::updatePhaseCondFromPrimalVariable;
|
||||
using Base::updateWellState;
|
||||
using Base::computeGasPressure;
|
||||
using Base::dpMaxRel;
|
||||
using Base::dsMax;
|
||||
using Base::drMaxRel;
|
||||
|
||||
const std::vector<WellMultiSegmentConstPtr>& wellsMultiSegment() const { return wells_multisegment_; }
|
||||
|
||||
|
@ -1138,16 +1138,16 @@ namespace Opm {
|
||||
|
||||
|
||||
|
||||
/*
|
||||
template <class Grid, class Implementation>
|
||||
void BlackoilModelBase<Grid, Implementation>::updateState(const V& dx,
|
||||
|
||||
template <class Grid>
|
||||
void BlackoilMultiSegmentModel<Grid>::updateState(const V& dx,
|
||||
ReservoirState& reservoir_state,
|
||||
WellState& well_state)
|
||||
{
|
||||
using namespace Opm::AutoDiffGrid;
|
||||
const int np = fluid_.numPhases();
|
||||
const int nc = numCells(grid_);
|
||||
const int nw = localWellsActive() ? wells().number_of_wells : 0;
|
||||
const int nw = wellsMultiSegment().size();
|
||||
const V null;
|
||||
assert(null.size() == 0);
|
||||
const V zero = V::Zero(nc);
|
||||
@ -1162,7 +1162,8 @@ namespace Opm {
|
||||
varstart += dxvar.size();
|
||||
|
||||
// Extract well parts np phase rates + bhp
|
||||
const V dwells = subset(dx, Span((np+1)*nw, 1, varstart));
|
||||
const int nseg_total = well_state.numberOfSegments();
|
||||
const V dwells = subset(dx, Span((np+1)*nseg_total, 1, varstart));
|
||||
varstart += dwells.size();
|
||||
|
||||
assert(varstart == dx.size());
|
||||
@ -1357,7 +1358,7 @@ namespace Opm {
|
||||
// Update phase conditions used for property calculations.
|
||||
updatePhaseCondFromPrimalVariable();
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user