mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add methods for critial gas and gas in oil saturations
Methods that returns the scaled critical gas (SGCR) saturation and the scaled critical gas in oil saturation (SOGCR) is added to BlackoilPropsAdFromDeck and BlackoilPropsAdInterface A test is added in test_boprops_ad and fluid.data is modified to make the test non trivial.
This commit is contained in:
@@ -928,5 +928,44 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
||||
}
|
||||
|
||||
|
||||
/// Obtain the scaled critical oil in gas saturation values.
|
||||
/// \param[in] cells Array of cell indices.
|
||||
/// \return Array of critical oil in gas saturaion values.
|
||||
V BlackoilPropsAdFromDeck::scaledCriticalOilinGasSaturations(const Cells& cells) const {
|
||||
|
||||
|
||||
assert(phaseUsage_.phase_used[BlackoilPhases::Gas]);
|
||||
assert(phaseUsage_.phase_used[BlackoilPhases::Oil]);
|
||||
|
||||
const int n = cells.size();
|
||||
V sogcr = V::Zero(n);
|
||||
const MaterialLawManager& materialLawManager = satprops_->materialLawManager();
|
||||
for (int i = 0; i < n; ++i) {
|
||||
const auto& scaledDrainageInfo =
|
||||
materialLawManager.oilWaterScaledEpsInfoDrainage(cells[i]);
|
||||
sogcr[i] = scaledDrainageInfo.Sogcr;
|
||||
}
|
||||
return sogcr;
|
||||
}
|
||||
|
||||
/// Obtain the scaled critical gas saturation values.
|
||||
/// \param[in] cells Array of cell indices.
|
||||
/// \return Array of scaled critical gas saturaion values.
|
||||
V BlackoilPropsAdFromDeck::scaledCriticalGasSaturations(const Cells& cells) const {
|
||||
|
||||
assert(phaseUsage_.phase_used[BlackoilPhases::Gas]);
|
||||
|
||||
const int n = cells.size();
|
||||
V sgcr = V::Zero(n);
|
||||
const MaterialLawManager& materialLawManager = satprops_->materialLawManager();
|
||||
for (int i = 0; i < n; ++i) {
|
||||
const auto& scaledDrainageInfo =
|
||||
materialLawManager.oilWaterScaledEpsInfoDrainage(cells[i]);
|
||||
sgcr[i] = scaledDrainageInfo.Sgcr;
|
||||
}
|
||||
return sgcr;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
|
@@ -360,6 +360,16 @@ namespace Opm
|
||||
void setSwatInitScaling(const std::vector<double>& saturation,
|
||||
const std::vector<double>& pc);
|
||||
|
||||
/// Obtain the scaled critical oil in gas saturation values.
|
||||
/// \param[in] cells Array of cell indices.
|
||||
/// \return Array of critical oil in gas saturaion values.
|
||||
V scaledCriticalOilinGasSaturations(const Cells& cells) const;
|
||||
|
||||
/// Obtain the scaled critical gas saturation values.
|
||||
/// \param[in] cells Array of cell indices.
|
||||
/// \return Array of scaled critical gas saturaion values.
|
||||
V scaledCriticalGasSaturations(const Cells& cells) const;
|
||||
|
||||
|
||||
private:
|
||||
/// Initializes the properties.
|
||||
|
@@ -253,6 +253,19 @@ namespace Opm
|
||||
/// Update for max oil saturation.
|
||||
virtual
|
||||
void updateSatOilMax(const std::vector<double>& saturation) = 0;
|
||||
|
||||
/// Obtain the scaled critical oil in gas saturation values.
|
||||
/// \param[in] cells Array of cell indices.
|
||||
/// \return Array of critical oil in gas saturaion values.
|
||||
virtual
|
||||
V scaledCriticalOilinGasSaturations(const Cells& cells) const = 0;
|
||||
|
||||
/// Obtain the scaled critical gas saturation values.
|
||||
/// \param[in] cells Array of cell indices.
|
||||
/// \return Array of scaled critical gas saturaion values.
|
||||
virtual
|
||||
V scaledCriticalGasSaturations(const Cells& cells) const = 0;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
@@ -55,13 +55,22 @@ PVDG
|
||||
/
|
||||
|
||||
SWOF
|
||||
0 0 1 0
|
||||
1 1 0 0
|
||||
0.12 0 1 0
|
||||
0.15 0 1 0
|
||||
0.17 0.01 1 0
|
||||
0.2 0.5 0.5 0
|
||||
0.96 0.9 0.1 0
|
||||
0.98 0.95 0 0
|
||||
1 1 0 0
|
||||
/
|
||||
|
||||
SGOF
|
||||
0 0 1 0
|
||||
1 1 0 0
|
||||
0 0 1.0 0
|
||||
0.02 0 1.0 0
|
||||
0.05 0.1 0.9 0
|
||||
0.86 0.9 0.1 0
|
||||
0.87 0.95 0 0
|
||||
0.88 1.0 0 0
|
||||
/
|
||||
|
||||
DENSITY
|
||||
|
@@ -200,3 +200,16 @@ BOOST_FIXTURE_TEST_CASE(ViscosityAD, TestFixture<SetupSimple>)
|
||||
BOOST_CHECK_EQUAL(AmuWat.value()[0], VmuWat[i]);
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(criticalSaturations, TestFixture<SetupSimple>)
|
||||
{
|
||||
const Opm::BlackoilPropsAdFromDeck::Cells cells(10, 0);
|
||||
|
||||
typedef Opm::BlackoilPropsAdFromDeck::V V;
|
||||
|
||||
V sgcr = boprops_ad.scaledCriticalGasSaturations(cells);
|
||||
V sogcr = boprops_ad.scaledCriticalOilinGasSaturations(cells);
|
||||
BOOST_CHECK_EQUAL(sgcr[0], 0.02);
|
||||
BOOST_CHECK_EQUAL(sogcr[0], 0.13);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user