mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 02:30:18 -06:00
Removing extra overloads of rsSat() and rvSat().
Also a few minor fixes to docs and indentation while in the area.
This commit is contained in:
parent
64769f1062
commit
a347e35304
@ -546,39 +546,6 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
||||
|
||||
// ------ Rs bubble point curve ------
|
||||
|
||||
/// Bubble point curve for Rs as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
V BlackoilPropsAdFromDeck::rsSat(const V& po,
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Oil]) {
|
||||
OPM_THROW(std::runtime_error, "Cannot call rsMax(): oil phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
mapPvtRegions(cells);
|
||||
assert(po.size() == n);
|
||||
V rbub(n);
|
||||
V drbubdp(n);
|
||||
props_[phase_usage_.phase_pos[Oil]]->rsSat(n, pvt_region_.data(), po.data(), rbub.data(), drbubdp.data());
|
||||
return rbub;
|
||||
}
|
||||
|
||||
/// Bubble point curve for Rs as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] so Array of n oil saturation values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
V BlackoilPropsAdFromDeck::rsSat(const V& po,
|
||||
const V& so,
|
||||
const Cells& cells) const
|
||||
{
|
||||
V rs = rsSat(po, cells);
|
||||
applyVap(rs, so, cells, vap2_);
|
||||
return rs;
|
||||
}
|
||||
|
||||
/// Bubble point curve for Rs as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
@ -618,45 +585,12 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
||||
return rs;
|
||||
}
|
||||
|
||||
// ------ Condensation curve ------
|
||||
// ------ Rv condensation curve ------
|
||||
|
||||
/// Condensation curve for Rv as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
V BlackoilPropsAdFromDeck::rvSat(const V& po,
|
||||
const Cells& cells) const
|
||||
{
|
||||
if (!phase_usage_.phase_used[Gas]) {
|
||||
OPM_THROW(std::runtime_error, "Cannot call rvMax(): gas phase not present.");
|
||||
}
|
||||
const int n = cells.size();
|
||||
mapPvtRegions(cells);
|
||||
assert(po.size() == n);
|
||||
V rv(n);
|
||||
V drvdp(n);
|
||||
props_[phase_usage_.phase_pos[Gas]]->rvSat(n, pvt_region_.data(), po.data(), rv.data(), drvdp.data());
|
||||
return rv;
|
||||
}
|
||||
|
||||
/// Condensation curve for Rv as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] so Array of n oil saturation values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
V BlackoilPropsAdFromDeck::rvSat(const V& po,
|
||||
const V& so,
|
||||
const Cells& cells) const
|
||||
{
|
||||
V rv = rvSat(po, cells);
|
||||
applyVap(rv, so, cells, vap1_);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/// Condensation curve for Rv as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
/// \return Array of n condensation point values for Rv.
|
||||
ADB BlackoilPropsAdFromDeck::rvSat(const ADB& po,
|
||||
const Cells& cells) const
|
||||
{
|
||||
@ -682,7 +616,7 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] so Array of n oil saturation values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
/// \return Array of n condensation point values for Rv.
|
||||
ADB BlackoilPropsAdFromDeck::rvSat(const ADB& po,
|
||||
const ADB& so,
|
||||
const Cells& cells) const
|
||||
|
@ -245,23 +245,7 @@ namespace Opm
|
||||
/// Condensation curve for Rv as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
V rvSat(const V& po,
|
||||
const Cells& cells) const;
|
||||
|
||||
/// Condensation curve for Rv as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] so Array of n oil saturation values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
V rvSat(const V& po,
|
||||
const V& so,
|
||||
const Cells& cells) const;
|
||||
|
||||
/// Condensation curve for Rv as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
/// \return Array of n condensation point values for Rv.
|
||||
ADB rvSat(const ADB& po,
|
||||
const Cells& cells) const;
|
||||
|
||||
@ -269,7 +253,7 @@ namespace Opm
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] so Array of n oil saturation values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
/// \return Array of n condensation point values for Rv.
|
||||
ADB rvSat(const ADB& po,
|
||||
const ADB& so,
|
||||
const Cells& cells) const;
|
||||
|
@ -174,24 +174,6 @@ namespace Opm
|
||||
|
||||
// ------ Rs bubble point curve ------
|
||||
|
||||
/// Bubble point curve for Rs as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
virtual
|
||||
V rsSat(const V& po,
|
||||
const Cells& cells) const = 0;
|
||||
|
||||
/// Bubble point curve for Rs as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] so Array of n oil saturation values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
virtual
|
||||
V rsSat(const V& po,
|
||||
const V& so,
|
||||
const Cells& cells) const = 0;
|
||||
|
||||
/// Bubble point curve for Rs as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
@ -210,39 +192,21 @@ namespace Opm
|
||||
const ADB& so,
|
||||
const Cells& cells) const = 0;
|
||||
|
||||
// ------ Rs bubble point curve ------
|
||||
// ------ Rv condensation curve ------
|
||||
|
||||
/// Bubble point curve for Rs as function of oil pressure.
|
||||
/// Condensation curve for Rv as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
virtual
|
||||
V rvSat(const V& po,
|
||||
const Cells& cells) const = 0;
|
||||
|
||||
/// Bubble point curve for Rs as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] so Array of n oil saturation values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
virtual
|
||||
V rvSat(const V& po,
|
||||
const V& so,
|
||||
const Cells& cells) const = 0;
|
||||
|
||||
/// Bubble point curve for Rs as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
/// \return Array of n condensation point values for Rv.
|
||||
virtual
|
||||
ADB rvSat(const ADB& po,
|
||||
const Cells& cells) const = 0;
|
||||
|
||||
/// Bubble point curve for Rs as function of oil pressure.
|
||||
/// Condensation curve for Rv as function of oil pressure.
|
||||
/// \param[in] po Array of n oil pressure values.
|
||||
/// \param[in] so Array of n oil saturation values.
|
||||
/// \param[in] cells Array of n cell indices to be associated with the pressure values.
|
||||
/// \return Array of n bubble point values for Rs.
|
||||
/// \return Array of n condensation point values for Rv.
|
||||
virtual
|
||||
ADB rvSat(const ADB& po,
|
||||
const ADB& so,
|
||||
|
@ -2157,7 +2157,7 @@ namespace detail {
|
||||
const V& satOil,
|
||||
const std::vector<int>& cells) const
|
||||
{
|
||||
return fluid_.rsSat(p, satOil, cells);
|
||||
return fluid_.rsSat(ADB::constant(p), ADB::constant(satOil), cells).value();
|
||||
}
|
||||
|
||||
|
||||
@ -2173,13 +2173,14 @@ namespace detail {
|
||||
return fluid_.rsSat(p, satOil, cells);
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
V
|
||||
FullyImplicitBlackoilSolver<T>::fluidRvSat(const V& p,
|
||||
const V& satOil,
|
||||
const std::vector<int>& cells) const
|
||||
{
|
||||
return fluid_.rvSat(p, satOil, cells);
|
||||
return fluid_.rvSat(ADB::constant(p), ADB::constant(satOil), cells).value();
|
||||
}
|
||||
|
||||
|
||||
|
@ -528,8 +528,9 @@ namespace Opm {
|
||||
// pressure into account. This facility uses the
|
||||
// average *hydrocarbon* pressure rather than
|
||||
// average phase pressure.
|
||||
Rmax_.col(io) = props_.rsSat(p_avg_, T_avg_, repcells_);
|
||||
Rmax_.col(ig) = props_.rvSat(p_avg_, T_avg_, repcells_);
|
||||
typedef BlackoilPropsAdInterface::ADB ADB;
|
||||
Rmax_.col(io) = props_.rsSat(ADB::constant(p_avg_), ADB::constant(T_avg_), repcells_).value();
|
||||
Rmax_.col(ig) = props_.rvSat(ADB::constant(p_avg_), ADB::constant(T_avg_), repcells_).value();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user