Remove Equil + EquilWrapper, replace with upstream

Upstream (opm-parser) now provides a better Equil + EquilRecord, and
simultaneously deprecated EquilWrapper. This patch fixes the resulting
breakage.

One important note: The new Equil does not expose integers for live
oil/wet gas initialization procedure methods, but rather booleans
through constRs/constRv methods. This is how the variable behaves
according to the Eclipse reference manual (EQUIL keyword section).

Code has been updated to reflect this.
This commit is contained in:
Jørgen Kvalsvik 2016-02-29 15:41:08 +01:00 committed by Andreas Lauser
parent 04a368cfc6
commit 32c5b5e862
4 changed files with 158 additions and 213 deletions

View File

@ -26,6 +26,8 @@
#include <opm/core/utility/RegionMapping.hpp>
#include <opm/core/utility/RootFinders.hpp>
#include <opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp>
#include <memory>
@ -34,7 +36,7 @@
namespace Opm
{
namespace Equil {
namespace EQUIL {
template <class Props>
class DensityCalculator;
@ -49,8 +51,6 @@ namespace Opm
class RsSatAtContact;
}
struct EquilRecord;
template <class DensCalc>
class EquilReg;
@ -84,7 +84,7 @@ namespace Opm
* This namespace is intentionally nested to avoid name clashes
* with other parts of OPM.
*/
namespace Equil {
namespace EQUIL {
template <class Props>
@ -546,52 +546,6 @@ namespace Opm
} // namespace Miscibility
/**
* Equilibration record.
*
* Layout and contents inspired by first six items of
* ECLIPSE's 'EQUIL' records. This is the minimum amount of
* input data needed to define phase pressures in an
* equilibration region.
*
* Data consists of three pairs of depth and pressure values:
* 1. main
* - @c depth Main datum depth.
* - @c press Pressure at datum depth.
*
* 2. woc
* - @c depth Depth of water-oil contact
* - @c press water-oil capillary pressure at water-oil contact.
* Capillary pressure defined as "P_oil - P_water".
*
* 3. goc
* - @c depth Depth of gas-oil contact
* - @c press Gas-oil capillary pressure at gas-oil contact.
* Capillary pressure defined as "P_gas - P_oil".
*
* For the time being, items 7-9 of ECLIPSE's 'EQUIL' records are also
* stored here, but might (should?) eventually be moved elsewhere.
*
* - @c live_oil_table_index Indicates type of initialisation for live oil.
* Positive value points to corresponding Rs vs. depth table.
* - @c wet_gas_table_index Indicates type of initialisation for wet gas.
* Positive value points to corresponding Rv vs. depth table.
* - @c N Defines accuracy of initialisation computations. Currently
* only @c N=0 is supported.
*
*/
struct EquilRecord {
struct {
double depth;
double press;
} main, woc, goc;
int live_oil_table_index;
int wet_gas_table_index;
int N;
};
/**
* Aggregate information base of an equilibration region.
*
@ -654,36 +608,36 @@ namespace Opm
/**
* Datum depth in current region
*/
double datum() const { return this->rec_.main.depth; }
double datum() const { return this->rec_.datumDepth(); }
/**
* Pressure at datum depth in current region.
*/
double pressure() const { return this->rec_.main.press; }
double pressure() const { return this->rec_.datumDepthPressure(); }
/**
* Depth of water-oil contact.
*/
double zwoc() const { return this->rec_.woc .depth; }
double zwoc() const { return this->rec_.waterOilContactDepth(); }
/**
* water-oil capillary pressure at water-oil contact.
*
* \return P_o - P_w at WOC.
*/
double pcow_woc() const { return this->rec_.woc .press; }
double pcow_woc() const { return this->rec_.waterOilContactCapillaryPressure(); }
/**
* Depth of gas-oil contact.
*/
double zgoc() const { return this->rec_.goc .depth; }
double zgoc() const { return this->rec_.gasOilContactDepth(); }
/**
* Gas-oil capillary pressure at gas-oil contact.
*
* \return P_g - P_o at GOC.
*/
double pcgo_goc() const { return this->rec_.goc .press; }
double pcgo_goc() const { return this->rec_.gasOilContactCapillaryPressure(); }
/**
* Retrieve phase density calculator of current region.

View File

@ -29,9 +29,10 @@
#include <opm/core/props/BlackoilPhases.hpp>
#include <opm/core/utility/RegionMapping.hpp>
#include <opm/core/utility/Units.hpp>
#include <opm/parser/eclipse/Utility/EquilWrapper.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp>
#include <opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp>
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableContainer.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/RsvdTable.hpp>
@ -83,7 +84,7 @@ namespace Opm
* This namespace is intentionally nested to avoid name clashes
* with other parts of OPM.
*/
namespace Equil {
namespace EQUIL {
/**
* Compute initial phase pressures by means of equilibration.
@ -196,48 +197,16 @@ namespace Opm
namespace DeckDependent {
inline
std::vector<EquilRecord>
getEquil(const Opm::DeckConstPtr deck)
getEquil(const Opm::EclipseState& state)
{
if (deck->hasKeyword("EQUIL")) {
Opm::EquilWrapper eql(deck->getKeyword("EQUIL"));
const auto& init = *state.getInitConfig();
const int nrec = eql.numRegions();
std::vector<EquilRecord> ret;
ret.reserve(nrec);
for (int r = 0; r < nrec; ++r) {
EquilRecord record =
{
{ eql.datumDepth(r) ,
eql.datumDepthPressure(r) }
,
{ eql.waterOilContactDepth(r) ,
eql.waterOilContactCapillaryPressure(r) }
,
{ eql.gasOilContactDepth(r) ,
eql.gasOilContactCapillaryPressure(r) }
,
eql.liveOilInitProceedure(r)
,
eql.wetGasInitProceedure(r)
,
eql.initializationTargetAccuracy(r)
};
if (record.N != 0) {
OPM_THROW(std::domain_error,
"kw EQUIL, item 9: Only N=0 supported.");
}
ret.push_back(record);
}
return ret;
}
else {
OPM_THROW(std::domain_error,
"Deck does not provide equilibration data.");
if( !init.hasEquil() ) {
OPM_THROW(std::domain_error, "Deck does not provide equilibration data.");
}
const auto& equil = init.getEquil();
return { equil.begin(), equil.end() };
}
template<class Grid>
@ -285,7 +254,7 @@ namespace Opm
rv_(UgGridHelpers::numCells(G))
{
// Get the equilibration records.
const std::vector<EquilRecord> rec = getEquil(deck);
const std::vector<EquilRecord> rec = getEquil(*eclipseState);
std::shared_ptr<const TableManager> tables = eclipseState->getTableManager();
// Create (inverse) region mapping.
const RegionMapping<> eqlmap(equilnum(deck, eclipseState, G));
@ -296,25 +265,24 @@ namespace Opm
const TableContainer& rsvdTables = tables->getRsvdTables();
for (size_t i = 0; i < rec.size(); ++i) {
const int cell = *(eqlmap.cells(i).begin());
if (rec[i].live_oil_table_index > 0) {
if (rsvdTables.size() > 0 && size_t(rec[i].live_oil_table_index) <= rsvdTables.size()) {
const RsvdTable& rsvdTable = rsvdTables.getTable<RsvdTable>(i);
std::vector<double> depthColumn = rsvdTable.getColumn("DEPTH").vectorCopy();
std::vector<double> rsColumn = rsvdTable.getColumn("RS").vectorCopy();
rs_func_.push_back(std::make_shared<Miscibility::RsVD>(props,
cell,
depthColumn , rsColumn));
} else {
OPM_THROW(std::runtime_error, "Cannot initialise: RSVD table " << (rec[i].live_oil_table_index) << " not available.");
if (!rec[i].liveOilInitConstantRs()) {
if (rsvdTables.size() <= 0 ) {
OPM_THROW(std::runtime_error, "Cannot initialise: RSVD table not available.");
}
const RsvdTable& rsvdTable = rsvdTables.getTable<RsvdTable>(i);
std::vector<double> depthColumn = rsvdTable.getColumn("DEPTH").vectorCopy();
std::vector<double> rsColumn = rsvdTable.getColumn("RS").vectorCopy();
rs_func_.push_back(std::make_shared<Miscibility::RsVD>(props,
cell,
depthColumn , rsColumn));
} else {
if (rec[i].goc.depth != rec[i].main.depth) {
if (rec[i].gasOilContactDepth() != rec[i].datumDepth()) {
OPM_THROW(std::runtime_error,
"Cannot initialise: when no explicit RSVD table is given, \n"
"datum depth must be at the gas-oil-contact. "
"In EQUIL region " << (i + 1) << " (counting from 1), this does not hold.");
}
const double p_contact = rec[i].main.press;
const double p_contact = rec[i].datumDepthPressure();
const double T_contact = 273.15 + 20; // standard temperature for now
rs_func_.push_back(std::make_shared<Miscibility::RsSatAtContact>(props, cell, p_contact, T_contact));
}
@ -330,27 +298,27 @@ namespace Opm
const TableContainer& rvvdTables = tables->getRvvdTables();
for (size_t i = 0; i < rec.size(); ++i) {
const int cell = *(eqlmap.cells(i).begin());
if (rec[i].wet_gas_table_index > 0) {
if (rvvdTables.size() > 0 && size_t(rec[i].wet_gas_table_index) <= rvvdTables.size()) {
const RvvdTable& rvvdTable = rvvdTables.getTable<RvvdTable>(i);
std::vector<double> depthColumn = rvvdTable.getColumn("DEPTH").vectorCopy();
std::vector<double> rvColumn = rvvdTable.getColumn("RV").vectorCopy();
rv_func_.push_back(std::make_shared<Miscibility::RvVD>(props,
cell,
depthColumn , rvColumn));
} else {
OPM_THROW(std::runtime_error, "Cannot initialise: RVVD table " << (rec[i].wet_gas_table_index) << " not available.");
if (!rec[i].wetGasInitConstantRv()) {
if (rvvdTables.size() <= 0) {
OPM_THROW(std::runtime_error, "Cannot initialise: RVVD table not available.");
}
const RvvdTable& rvvdTable = rvvdTables.getTable<RvvdTable>(i);
std::vector<double> depthColumn = rvvdTable.getColumn("DEPTH").vectorCopy();
std::vector<double> rvColumn = rvvdTable.getColumn("RV").vectorCopy();
rv_func_.push_back(std::make_shared<Miscibility::RvVD>(props,
cell,
depthColumn , rvColumn));
} else {
if (rec[i].goc.depth != rec[i].main.depth) {
if (rec[i].gasOilContactDepth() != rec[i].datumDepth()) {
OPM_THROW(std::runtime_error,
"Cannot initialise: when no explicit RVVD table is given, \n"
"datum depth must be at the gas-oil-contact. "
"In EQUIL region " << (i + 1) << " (counting from 1), this does not hold.");
}
const double p_contact = rec[i].main.press + rec[i].goc.press;
const double p_contact = rec[i].datumDepthPressure() + rec[i].gasOilContactCapillaryPressure();
const double T_contact = 273.15 + 20; // standard temperature for now
rv_func_.push_back(std::make_shared<Miscibility::RvSatAtContact>(props, cell, p_contact, T_contact));
}
@ -456,7 +424,7 @@ namespace Opm
};
} // namespace DeckDependent
} // namespace Equil
} // namespace EQUIL
} // namespace Opm
#include <opm/core/simulator/initStateEquil_impl.hpp>

View File

@ -583,7 +583,7 @@ namespace Opm
} // namespace Details
namespace Equil {
namespace EQUIL {
template <class Grid,
@ -885,7 +885,7 @@ namespace Opm
const double gravity,
BlackoilState& state)
{
typedef Equil::DeckDependent::InitialStateComputer ISC;
typedef EQUIL::DeckDependent::InitialStateComputer ISC;
ISC isc(props, deck, eclipseState, grid, gravity);
const auto pu = props.phaseUsage();
const int ref_phase = pu.phase_used[BlackoilPhases::Liquid]

View File

@ -30,6 +30,10 @@
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
#include <opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp>
#include <opm/parser/eclipse/Units/Dimension.hpp>
#include <opm/core/pressure/msmfem/partition.h>
@ -55,6 +59,62 @@
BOOST_AUTO_TEST_SUITE ()
static Opm::EquilRecord mkEquilRecord( double datd, double datp,
double zwoc, double pcow_woc,
double zgoc, double pcgo_goc ) {
using namespace Opm;
auto dd = DeckItem::make< double >( "datdep" );
dd.push_back( datd );
auto dd_dim = std::make_shared< Opm::Dimension >( "dddim", 1 );
dd.push_backDimension( dd_dim, dd_dim );
auto dp = DeckItem::make< double >( "datps" );
dp.push_back( datp );
auto dp_dim = std::make_shared< Opm::Dimension >( "dpdim", 1 );
dp.push_backDimension( dp_dim, dp_dim );
auto zw = DeckItem::make< double >( "zwoc" );
zw.push_back( zwoc );
auto zw_dim = std::make_shared< Opm::Dimension >( "zwdim", 1 );
zw.push_backDimension( zw_dim, zw_dim );
auto pcow = DeckItem::make< double >( "pcow" );
pcow.push_back( pcow_woc );
auto pcow_dim = std::make_shared< Opm::Dimension >( "pcowdim", 1 );
pcow.push_backDimension( pcow_dim, pcow_dim );
auto zg = DeckItem::make< double >( "zgoc" );
zg.push_back( zgoc );
auto zg_dim = std::make_shared< Opm::Dimension >( "zgdim", 1 );
zg.push_backDimension( zg_dim, zg_dim );
auto pcgo = DeckItem::make< double >( "pcgo" );
pcgo.push_back( pcgo_goc );
auto pcgo_dim = std::make_shared< Opm::Dimension >( "pcgodim", 1 );
pcgo.push_backDimension( pcgo_dim, pcgo_dim );
auto i1 = DeckItem::make< int >( "i1" );
auto i2 = DeckItem::make< int >( "i2" );
auto i3 = DeckItem::make< int >( "i3" );
i1.push_back( 0 );
i2.push_back( 0 );
i3.push_back( 0 );
DeckRecord rec;
rec.addItem( std::move( dd ) );
rec.addItem( std::move( dp ) );
rec.addItem( std::move( zw ) );
rec.addItem( std::move( pcow ) );
rec.addItem( std::move( zg ) );
rec.addItem( std::move( pcgo ) );
rec.addItem( std::move( i1 ) );
rec.addItem( std::move( i2 ) );
rec.addItem( std::move( i3 ) );
return EquilRecord( rec );
}
BOOST_AUTO_TEST_CASE (PhasePressure)
{
typedef std::vector<double> PVal;
@ -76,28 +136,22 @@ BOOST_AUTO_TEST_CASE (PhasePressure)
typedef Opm::BlackoilPropertiesBasic Props;
Props props(param, G->dimensions, G->number_of_cells);
typedef Opm::Equil::DensityCalculator<Opm::BlackoilPropertiesInterface> RhoCalc;
typedef Opm::EQUIL::DensityCalculator<Opm::BlackoilPropertiesInterface> RhoCalc;
RhoCalc calc(props, 0);
Opm::Equil::EquilRecord record =
{
{ 0 , 1e5 } , // Datum depth, pressure
{ 5 , 0 } , // Zwoc , Pcow_woc
{ 0 , 0 } , // Zgoc , Pcgo_goc
0, 0, 0
};
auto record = mkEquilRecord( 0, 1e5, 5, 0, 0, 0 );
Opm::Equil::EquilReg<RhoCalc>
Opm::EQUIL::EquilReg<RhoCalc>
region(record, calc,
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
props.phaseUsage());
std::vector<int> cells(G->number_of_cells);
std::iota(cells.begin(), cells.end(), 0);
const double grav = 10;
const PPress ppress = Opm::Equil::phasePressures(*G, region, cells, grav);
const PPress ppress = Opm::EQUIL::phasePressures(*G, region, cells, grav);
const int first = 0, last = G->number_of_cells - 1;
const double reltol = 1.0e-8;
@ -107,9 +161,6 @@ BOOST_AUTO_TEST_CASE (PhasePressure)
BOOST_CHECK_CLOSE(ppress[1][last ] , 166.5e3 , reltol);
}
BOOST_AUTO_TEST_CASE (CellSubset)
{
typedef std::vector<double> PVal;
@ -131,46 +182,32 @@ BOOST_AUTO_TEST_CASE (CellSubset)
typedef Opm::BlackoilPropertiesBasic Props;
Props props(param, G->dimensions, G->number_of_cells);
typedef Opm::Equil::DensityCalculator<Opm::BlackoilPropertiesInterface> RhoCalc;
typedef Opm::EQUIL::DensityCalculator<Opm::BlackoilPropertiesInterface> RhoCalc;
RhoCalc calc(props, 0);
Opm::Equil::EquilRecord record[] =
{
{
{ 0 , 1e5 } , // Datum depth, pressure
{ 2.5 , -0.075e5 } , // Zwoc , Pcow_woc
{ 0 , 0 } , // Zgoc , Pcgo_goc
0, 0, 0
}
,
{
{ 5 , 1.35e5 } , // Datum depth, pressure
{ 7.5 , -0.225e5 } , // Zwoc , Pcow_woc
{ 5 , 0 } , // Zgoc , Pcgo_goc
0, 0, 0
}
};
Opm::EquilRecord record[] = { mkEquilRecord( 0, 1e5, 2.5, -0.075e5, 0, 0 ),
mkEquilRecord( 5, 1.35e5, 7.5, -0.225e5, 5, 0 ) };
Opm::Equil::EquilReg<RhoCalc> region[] =
Opm::EQUIL::EquilReg<RhoCalc> region[] =
{
Opm::Equil::EquilReg<RhoCalc>(record[0], calc,
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
Opm::EQUIL::EquilReg<RhoCalc>(record[0], calc,
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
props.phaseUsage())
,
Opm::Equil::EquilReg<RhoCalc>(record[0], calc,
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
Opm::EQUIL::EquilReg<RhoCalc>(record[0], calc,
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
props.phaseUsage())
,
Opm::Equil::EquilReg<RhoCalc>(record[1], calc,
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
Opm::EQUIL::EquilReg<RhoCalc>(record[1], calc,
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
props.phaseUsage())
,
Opm::Equil::EquilReg<RhoCalc>(record[1], calc,
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
Opm::EQUIL::EquilReg<RhoCalc>(record[1], calc,
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
props.phaseUsage())
};
@ -202,7 +239,7 @@ BOOST_AUTO_TEST_CASE (CellSubset)
const int rno = int(r - cells.begin());
const double grav = 10;
const PPress p =
Opm::Equil::phasePressures(*G, region[rno], *r, grav);
Opm::EQUIL::phasePressures(*G, region[rno], *r, grav);
PVal::size_type i = 0;
for (std::vector<int>::const_iterator
@ -248,46 +285,32 @@ BOOST_AUTO_TEST_CASE (RegMapping)
typedef Opm::BlackoilPropertiesBasic Props;
Props props(param, G->dimensions, G->number_of_cells);
typedef Opm::Equil::DensityCalculator<Opm::BlackoilPropertiesInterface> RhoCalc;
typedef Opm::EQUIL::DensityCalculator<Opm::BlackoilPropertiesInterface> RhoCalc;
RhoCalc calc(props, 0);
Opm::Equil::EquilRecord record[] =
{
{
{ 0 , 1e5 } , // Datum depth, pressure
{ 2.5 , -0.075e5 } , // Zwoc , Pcow_woc
{ 0 , 0 } , // Zgoc , Pcgo_goc
0, 0, 0
}
,
{
{ 5 , 1.35e5 } , // Datum depth, pressure
{ 7.5 , -0.225e5 } , // Zwoc , Pcow_woc
{ 5 , 0 } , // Zgoc , Pcgo_goc
0, 0, 0
}
};
Opm::EquilRecord record[] = { mkEquilRecord( 0, 1e5, 2.5, -0.075e5, 0, 0 ),
mkEquilRecord( 5, 1.35e5, 7.5, -0.225e5, 5, 0 ) };
Opm::Equil::EquilReg<RhoCalc> region[] =
Opm::EQUIL::EquilReg<RhoCalc> region[] =
{
Opm::Equil::EquilReg<RhoCalc>(record[0], calc,
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
Opm::EQUIL::EquilReg<RhoCalc>(record[0], calc,
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
props.phaseUsage())
,
Opm::Equil::EquilReg<RhoCalc>(record[0], calc,
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
Opm::EQUIL::EquilReg<RhoCalc>(record[0], calc,
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
props.phaseUsage())
,
Opm::Equil::EquilReg<RhoCalc>(record[1], calc,
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
Opm::EQUIL::EquilReg<RhoCalc>(record[1], calc,
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
props.phaseUsage())
,
Opm::Equil::EquilReg<RhoCalc>(record[1], calc,
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
Opm::EQUIL::EquilReg<RhoCalc>(record[1], calc,
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
std::make_shared<Opm::EQUIL::Miscibility::NoMixing>(),
props.phaseUsage())
};
@ -313,7 +336,7 @@ BOOST_AUTO_TEST_CASE (RegMapping)
const int rno = r;
const double grav = 10;
const PPress p =
Opm::Equil::phasePressures(*G, region[rno], rng, grav);
Opm::EQUIL::phasePressures(*G, region[rno], rng, grav);
PVal::size_type i = 0;
for (const auto& c : rng) {
@ -345,7 +368,7 @@ BOOST_AUTO_TEST_CASE (DeckAllDead)
Opm::DeckConstPtr deck = parser->parseFile("deadfluids.DATA" , parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseMode));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, *grid, false);
Opm::Equil::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, *grid, 10.0);
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, *grid, 10.0);
const auto& pressures = comp.press();
BOOST_REQUIRE(pressures.size() == 3);
BOOST_REQUIRE(int(pressures[0].size()) == grid->number_of_cells);
@ -384,7 +407,7 @@ BOOST_AUTO_TEST_CASE (CapillaryInversion)
const std::vector<double> s = { 0.2, 0.2, 0.2, 0.466666666666, 0.733333333333, 1.0, 1.0, 1.0, 1.0 };
BOOST_REQUIRE(pc.size() == s.size());
for (size_t i = 0; i < pc.size(); ++i) {
const double s_computed = Opm::Equil::satFromPc(props, phase, cell, pc[i], increasing);
const double s_computed = Opm::EQUIL::satFromPc(props, phase, cell, pc[i], increasing);
BOOST_CHECK_CLOSE(s_computed, s[i], reltol);
}
}
@ -397,7 +420,7 @@ BOOST_AUTO_TEST_CASE (CapillaryInversion)
const std::vector<double> s = { 0.8, 0.8, 0.8, 0.533333333333, 0.266666666666, 0.0, 0.0, 0.0, 0.0 };
BOOST_REQUIRE(pc.size() == s.size());
for (size_t i = 0; i < pc.size(); ++i) {
const double s_computed = Opm::Equil::satFromPc(props, phase, cell, pc[i], increasing);
const double s_computed = Opm::EQUIL::satFromPc(props, phase, cell, pc[i], increasing);
BOOST_CHECK_CLOSE(s_computed, s[i], reltol);
}
}
@ -410,7 +433,7 @@ BOOST_AUTO_TEST_CASE (CapillaryInversion)
const std::vector<double> s = { 0.2, 0.333333333333, 0.6, 0.866666666666, 1.0 };
BOOST_REQUIRE(pc.size() == s.size());
for (size_t i = 0; i < pc.size(); ++i) {
const double s_computed = Opm::Equil::satFromSumOfPcs(props, water, gas, cell, pc[i]);
const double s_computed = Opm::EQUIL::satFromSumOfPcs(props, water, gas, cell, pc[i]);
BOOST_CHECK_CLOSE(s_computed, s[i], reltol);
}
}
@ -428,7 +451,7 @@ BOOST_AUTO_TEST_CASE (DeckWithCapillary)
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
Opm::Equil::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 10.0);
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 10.0);
const auto& pressures = comp.press();
BOOST_REQUIRE(pressures.size() == 3);
BOOST_REQUIRE(int(pressures[0].size()) == grid.number_of_cells);
@ -469,7 +492,7 @@ BOOST_AUTO_TEST_CASE (DeckWithCapillaryOverlap)
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
Opm::Equil::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
const auto& pressures = comp.press();
BOOST_REQUIRE(pressures.size() == 3);
BOOST_REQUIRE(int(pressures[0].size()) == grid.number_of_cells);
@ -532,7 +555,7 @@ BOOST_AUTO_TEST_CASE (DeckWithLiveOil)
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
Opm::Equil::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
const auto& pressures = comp.press();
BOOST_REQUIRE(pressures.size() == 3);
BOOST_REQUIRE(int(pressures[0].size()) == grid.number_of_cells);
@ -612,7 +635,7 @@ BOOST_AUTO_TEST_CASE (DeckWithLiveGas)
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
Opm::Equil::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
const auto& pressures = comp.press();
BOOST_REQUIRE(pressures.size() == 3);
BOOST_REQUIRE(int(pressures[0].size()) == grid.number_of_cells);
@ -695,7 +718,7 @@ BOOST_AUTO_TEST_CASE (DeckWithRSVDAndRVVD)
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
Opm::Equil::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
const auto& pressures = comp.press();
BOOST_REQUIRE(pressures.size() == 3);
BOOST_REQUIRE(int(pressures[0].size()) == grid.number_of_cells);