mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Remove well state argument from computeFluidInPlace().
This commit is contained in:
@@ -262,12 +262,10 @@ namespace Opm {
|
|||||||
|
|
||||||
/// Compute fluid in place.
|
/// Compute fluid in place.
|
||||||
/// \param[in] ReservoirState
|
/// \param[in] ReservoirState
|
||||||
/// \param[in] WellState
|
|
||||||
/// \param[in] FIPNUM for active cells not global cells.
|
/// \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.
|
/// \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>
|
std::vector<V>
|
||||||
computeFluidInPlace(const ReservoirState& x,
|
computeFluidInPlace(const ReservoirState& x,
|
||||||
const WellState& xw,
|
|
||||||
const std::vector<int>& fipnum);
|
const std::vector<int>& fipnum);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -2300,7 +2300,6 @@ namespace detail {
|
|||||||
std::vector<V>
|
std::vector<V>
|
||||||
BlackoilModelBase<Grid, WellModel, Implementation>::
|
BlackoilModelBase<Grid, WellModel, Implementation>::
|
||||||
computeFluidInPlace(const ReservoirState& x,
|
computeFluidInPlace(const ReservoirState& x,
|
||||||
const WellState& xw,
|
|
||||||
const std::vector<int>& fipnum)
|
const std::vector<int>& fipnum)
|
||||||
{
|
{
|
||||||
using namespace Opm::AutoDiffGrid;
|
using namespace Opm::AutoDiffGrid;
|
||||||
|
|||||||
@@ -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.
|
/// \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>
|
std::vector<V>
|
||||||
computeFluidInPlace(const ReservoirState& x,
|
computeFluidInPlace(const ReservoirState& x,
|
||||||
const WellState& xw,
|
|
||||||
const std::vector<int>& fipnum) const
|
const std::vector<int>& fipnum) const
|
||||||
{
|
{
|
||||||
return transport_solver_.computeFluidInPlace(x, xw, fipnum);
|
return transport_solver_.computeFluidInPlace(x, fipnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -127,12 +127,10 @@ namespace Opm {
|
|||||||
|
|
||||||
/// Compute fluid in place.
|
/// Compute fluid in place.
|
||||||
/// \param[in] ReservoirState
|
/// \param[in] ReservoirState
|
||||||
/// \param[in] WellState
|
|
||||||
/// \param[in] FIPNUM for active cells not global cells.
|
/// \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.
|
/// \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>
|
std::vector<V>
|
||||||
computeFluidInPlace(const ReservoirState& x,
|
computeFluidInPlace(const ReservoirState& x,
|
||||||
const WellState& xw,
|
|
||||||
const std::vector<int>& fipnum) const;
|
const std::vector<int>& fipnum) const;
|
||||||
|
|
||||||
/// Reference to physical model.
|
/// Reference to physical model.
|
||||||
|
|||||||
@@ -102,10 +102,9 @@ namespace Opm
|
|||||||
template <class PhysicalModel>
|
template <class PhysicalModel>
|
||||||
std::vector<V>
|
std::vector<V>
|
||||||
NonlinearSolver<PhysicalModel>::computeFluidInPlace(const ReservoirState& x,
|
NonlinearSolver<PhysicalModel>::computeFluidInPlace(const ReservoirState& x,
|
||||||
const WellState& xw,
|
|
||||||
const std::vector<int>& fipnum) const
|
const std::vector<int>& fipnum) const
|
||||||
{
|
{
|
||||||
return model_->computeFluidInPlace(x, xw, fipnum);
|
return model_->computeFluidInPlace(x, fipnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ namespace Opm
|
|||||||
|
|
||||||
// Compute orignal FIP;
|
// Compute orignal FIP;
|
||||||
if (!ooip_computed) {
|
if (!ooip_computed) {
|
||||||
OOIP = solver->computeFluidInPlace(state, well_state, fipnum);
|
OOIP = solver->computeFluidInPlace(state, fipnum);
|
||||||
FIPUnitConvert(eclipse_state_->getUnits(), OOIP);
|
FIPUnitConvert(eclipse_state_->getUnits(), OOIP);
|
||||||
ooip_computed = true;
|
ooip_computed = true;
|
||||||
}
|
}
|
||||||
@@ -269,7 +269,7 @@ namespace Opm
|
|||||||
const double st = solver_timer.secsSinceStart();
|
const double st = solver_timer.secsSinceStart();
|
||||||
// Compute current FIP.
|
// Compute current FIP.
|
||||||
std::vector<V> COIP;
|
std::vector<V> COIP;
|
||||||
COIP = solver->computeFluidInPlace(state, well_state, fipnum);
|
COIP = solver->computeFluidInPlace(state, fipnum);
|
||||||
FIPUnitConvert(eclipse_state_->getUnits(), COIP);
|
FIPUnitConvert(eclipse_state_->getUnits(), COIP);
|
||||||
V OOIP_totals = FIPTotals(OOIP, state.pressure());
|
V OOIP_totals = FIPTotals(OOIP, state.pressure());
|
||||||
V COIP_totals = FIPTotals(COIP, state.pressure());
|
V COIP_totals = FIPTotals(COIP, state.pressure());
|
||||||
|
|||||||
@@ -534,12 +534,19 @@ namespace {
|
|||||||
|
|
||||||
std::vector<V>
|
std::vector<V>
|
||||||
FullyImplicitCompressiblePolymerSolver::computeFluidInPlace(const PolymerBlackoilState& x,
|
FullyImplicitCompressiblePolymerSolver::computeFluidInPlace(const PolymerBlackoilState& x,
|
||||||
const WellStateFullyImplicitBlackoilPolymer& xw,
|
|
||||||
const std::vector<int>& fipnum)
|
const std::vector<int>& fipnum)
|
||||||
{
|
{
|
||||||
const SolutionState state = constantState(x, xw);
|
const int np = x.numPhases();
|
||||||
const int nc = grid_.number_of_cells;
|
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& press = state.pressure;
|
||||||
const ADB& temp = state.temperature;
|
const ADB& temp = state.temperature;
|
||||||
const std::vector<ADB>& sat = state.saturation;
|
const std::vector<ADB>& sat = state.saturation;
|
||||||
|
|||||||
@@ -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.
|
/// \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>
|
std::vector<V>
|
||||||
computeFluidInPlace(const PolymerBlackoilState& x,
|
computeFluidInPlace(const PolymerBlackoilState& x,
|
||||||
const WellStateFullyImplicitBlackoilPolymer& xw,
|
|
||||||
const std::vector<int>& fipnum);
|
const std::vector<int>& fipnum);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user