Remove well state argument from computeFluidInPlace().

This commit is contained in:
Atgeirr Flø Rasmussen 2016-08-30 13:34:18 +02:00
parent a2001ca2e1
commit b5e986df5f
8 changed files with 13 additions and 14 deletions

View File

@ -262,12 +262,10 @@ namespace Opm {
/// Compute fluid in place.
/// \param[in] ReservoirState
/// \param[in] WellState
/// \param[in] FIPNUM for active cells not global cells.
/// \return fluid in place, number of fip regions, each region contains 5 values which are liquid, vapour, water, free gas and dissolved gas.
std::vector<V>
computeFluidInPlace(const ReservoirState& x,
const WellState& xw,
const std::vector<int>& fipnum);
protected:

View File

@ -2300,7 +2300,6 @@ namespace detail {
std::vector<V>
BlackoilModelBase<Grid, WellModel, Implementation>::
computeFluidInPlace(const ReservoirState& x,
const WellState& xw,
const std::vector<int>& fipnum)
{
using namespace Opm::AutoDiffGrid;

View File

@ -254,10 +254,9 @@ namespace Opm {
/// \return fluid in place, number of fip regions, each region contains 5 values which are liquid, vapour, water, free gas and dissolved gas.
std::vector<V>
computeFluidInPlace(const ReservoirState& x,
const WellState& xw,
const std::vector<int>& fipnum) const
{
return transport_solver_.computeFluidInPlace(x, xw, fipnum);
return transport_solver_.computeFluidInPlace(x, fipnum);
}

View File

@ -127,12 +127,10 @@ namespace Opm {
/// Compute fluid in place.
/// \param[in] ReservoirState
/// \param[in] WellState
/// \param[in] FIPNUM for active cells not global cells.
/// \return fluid in place, number of fip regions, each region contains 5 values which are liquid, vapour, water, free gas and dissolved gas.
std::vector<V>
computeFluidInPlace(const ReservoirState& x,
const WellState& xw,
const std::vector<int>& fipnum) const;
/// Reference to physical model.

View File

@ -102,10 +102,9 @@ namespace Opm
template <class PhysicalModel>
std::vector<V>
NonlinearSolver<PhysicalModel>::computeFluidInPlace(const ReservoirState& x,
const WellState& xw,
const std::vector<int>& fipnum) const
{
return model_->computeFluidInPlace(x, xw, fipnum);
return model_->computeFluidInPlace(x, fipnum);
}

View File

@ -199,7 +199,7 @@ namespace Opm
// Compute orignal FIP;
if (!ooip_computed) {
OOIP = solver->computeFluidInPlace(state, well_state, fipnum);
OOIP = solver->computeFluidInPlace(state, fipnum);
FIPUnitConvert(eclipse_state_->getUnits(), OOIP);
ooip_computed = true;
}
@ -269,7 +269,7 @@ namespace Opm
const double st = solver_timer.secsSinceStart();
// Compute current FIP.
std::vector<V> COIP;
COIP = solver->computeFluidInPlace(state, well_state, fipnum);
COIP = solver->computeFluidInPlace(state, fipnum);
FIPUnitConvert(eclipse_state_->getUnits(), COIP);
V OOIP_totals = FIPTotals(OOIP, state.pressure());
V COIP_totals = FIPTotals(COIP, state.pressure());

View File

@ -534,12 +534,19 @@ namespace {
std::vector<V>
FullyImplicitCompressiblePolymerSolver::computeFluidInPlace(const PolymerBlackoilState& x,
const WellStateFullyImplicitBlackoilPolymer& xw,
const std::vector<int>& fipnum)
{
const SolutionState state = constantState(x, xw);
const int np = x.numPhases();
const int nc = grid_.number_of_cells;
SolutionState state(np);
state.pressure = ADB::constant(Eigen::Map<const V>(& x.pressure()[0], nc, 1));
state.temperature = ADB::constant(Eigen::Map<const V>(& x.temperature()[0], nc, 1));
const DataBlock s = Eigen::Map<const DataBlock>(& x.saturation()[0], nc, np);
for (int phase = 0; phase < np; ++phase) {
state.saturation[phase] = ADB::constant(s.col(phase));
}
const ADB& press = state.pressure;
const ADB& temp = state.temperature;
const std::vector<ADB>& sat = state.saturation;

View File

@ -116,7 +116,6 @@ namespace Opm {
/// \return fluid in place, number of fip regions, each region contains 5 values which are liquid, vapour, water, free gas and dissolved gas.
std::vector<V>
computeFluidInPlace(const PolymerBlackoilState& x,
const WellStateFullyImplicitBlackoilPolymer& xw,
const std::vector<int>& fipnum);
private: