mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #833 from ANerd/output_present_phases
Output well rates for present phases
This commit is contained in:
commit
c84abe63a5
@ -379,7 +379,7 @@ namespace Opm
|
|||||||
substep,
|
substep,
|
||||||
timer.simulationTimeElapsed(),
|
timer.simulationTimeElapsed(),
|
||||||
simToSolution( state, phaseUsage_ ),
|
simToSolution( state, phaseUsage_ ),
|
||||||
wellState.report(),
|
wellState.report(phaseUsage_),
|
||||||
simProps);
|
simProps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <opm/core/wells.h>
|
#include <opm/core/wells.h>
|
||||||
#include <opm/core/well_controls.h>
|
#include <opm/core/well_controls.h>
|
||||||
#include <opm/core/simulator/WellState.hpp>
|
#include <opm/core/simulator/WellState.hpp>
|
||||||
|
#include <opm/core/props/BlackoilPhases.hpp>
|
||||||
#include <opm/common/ErrorMacros.hpp>
|
#include <opm/common/ErrorMacros.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -191,8 +192,8 @@ namespace Opm
|
|||||||
std::vector<double>& wellPotentials() { return well_potentials_; }
|
std::vector<double>& wellPotentials() { return well_potentials_; }
|
||||||
const std::vector<double>& wellPotentials() const { return well_potentials_; }
|
const std::vector<double>& wellPotentials() const { return well_potentials_; }
|
||||||
|
|
||||||
data::Wells report() const override {
|
data::Wells report(const PhaseUsage &pu) const override {
|
||||||
data::Wells res = WellState::report();
|
data::Wells res = WellState::report(pu);
|
||||||
|
|
||||||
const int nw = this->numWells();
|
const int nw = this->numWells();
|
||||||
// If there are now wells numPhases throws a floating point
|
// If there are now wells numPhases throws a floating point
|
||||||
@ -230,11 +231,16 @@ namespace Opm
|
|||||||
const auto& wv = this->wellRates();
|
const auto& wv = this->wellRates();
|
||||||
|
|
||||||
data::Rates wellrates;
|
data::Rates wellrates;
|
||||||
if( np == 3 ) {
|
if( pu.phase_used[BlackoilPhases::Aqua] ) {
|
||||||
/* only write if 3-phase solution */
|
wellrates.set( rt::wat, wv[ wellrate_index + pu.phase_pos[BlackoilPhases::Aqua] ] );
|
||||||
wellrates.set( rt::wat, wv[ wellrate_index + 0 ] );
|
}
|
||||||
wellrates.set( rt::oil, wv[ wellrate_index + 1 ] );
|
|
||||||
wellrates.set( rt::gas, wv[ wellrate_index + 2 ] );
|
if( pu.phase_used[BlackoilPhases::Liquid] ) {
|
||||||
|
wellrates.set( rt::oil, wv[ wellrate_index + pu.phase_pos[BlackoilPhases::Liquid] ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( pu.phase_used[BlackoilPhases::Vapour] ) {
|
||||||
|
wellrates.set( rt::wat, wv[ wellrate_index + pu.phase_pos[BlackoilPhases::Vapour] ] );
|
||||||
}
|
}
|
||||||
|
|
||||||
const double bhp = this->bhp()[ w ];
|
const double bhp = this->bhp()[ w ];
|
||||||
|
Loading…
Reference in New Issue
Block a user