mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Workaround: ensure properties necessary for FIP are computed.
Should only result in an extra call the first time in this function.
This commit is contained in:
parent
c4c760ae8d
commit
fff99360b3
@ -91,6 +91,10 @@ namespace Opm {
|
|||||||
using Base::wellModel;
|
using Base::wellModel;
|
||||||
|
|
||||||
|
|
||||||
|
std::vector<std::vector<double> >
|
||||||
|
computeFluidInPlace(const ReservoirState& x,
|
||||||
|
const std::vector<int>& fipnum);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// --------- Types and enums ---------
|
// --------- Types and enums ---------
|
||||||
@ -229,7 +233,6 @@ namespace Opm {
|
|||||||
const ADB& so,
|
const ADB& so,
|
||||||
const ADB& sg,
|
const ADB& sg,
|
||||||
const ADB& ss) const;
|
const ADB& ss) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1087,6 +1087,26 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
template <class Grid>
|
||||||
|
std::vector<std::vector<double> >
|
||||||
|
BlackoilSolventModel<Grid>::
|
||||||
|
computeFluidInPlace(const ReservoirState& x,
|
||||||
|
const std::vector<int>& fipnum)
|
||||||
|
{
|
||||||
|
if (b_eff_[0].size() == 0) {
|
||||||
|
// A hack to avoid trouble for initial fluid in place, due to usage of b_eff_.
|
||||||
|
WellState xw, xwdummy;
|
||||||
|
xw.init(&wells(), x, xwdummy);
|
||||||
|
SolutionState solstate = variableState(x, xw);
|
||||||
|
computeEffectiveProperties(solstate);
|
||||||
|
}
|
||||||
|
return Base::computeFluidInPlace(x, fipnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user