Addressing test failure in MulgisegmentWellTests + slight change to avoid modifying Connection.cpp
This commit is contained in:
@@ -64,7 +64,8 @@ namespace Opm {
|
||||
EclipseGrid(const EclipseGrid& src, const double* zcorn, const std::vector<int>& actnum);
|
||||
|
||||
EclipseGrid(size_t nx, size_t ny, size_t nz,
|
||||
double dx = 1.0, double dy = 1.0, double dz = 1.0);
|
||||
double dx = 1.0, double dy = 1.0, double dz = 1.0,
|
||||
double top = 0.0);
|
||||
explicit EclipseGrid(const GridDims& gd);
|
||||
|
||||
EclipseGrid(const std::array<int, 3>& dims ,
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
#include <numeric>
|
||||
#include <tuple>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
namespace Opm {
|
||||
@@ -155,7 +157,7 @@ EclipseGrid::EclipseGrid(const GridDims& gd)
|
||||
|
||||
|
||||
EclipseGrid::EclipseGrid(size_t nx, size_t ny , size_t nz,
|
||||
double dx, double dy, double dz)
|
||||
double dx, double dy, double dz, double top)
|
||||
: GridDims(nx, ny, nz),
|
||||
m_minpvMode(MinpvMode::Inactive),
|
||||
m_pinchoutMode(PinchMode::TOPBOT),
|
||||
@@ -186,8 +188,8 @@ EclipseGrid::EclipseGrid(size_t nx, size_t ny , size_t nz,
|
||||
// top face of cell
|
||||
int zind = i*2 + j*nx*4 + k*nx*ny*8;
|
||||
|
||||
double zt = k*dz;
|
||||
double zb = (k+1)*dz;
|
||||
double zt = top + k*dz;
|
||||
double zb = top + (k+1)*dz;
|
||||
|
||||
m_zcorn[zind] = zt;
|
||||
m_zcorn[zind + 1] = zt;
|
||||
|
||||
@@ -325,9 +325,11 @@ namespace {
|
||||
const int j = compseg.m_j;
|
||||
const int k = compseg.m_k;
|
||||
if (grid.get_cell(i, j, k).is_active()) {
|
||||
// Negative values to indicate cell depths should be used
|
||||
double cdepth = compseg.center_depth >= 0. ? compseg.center_depth : grid.get_cell(i, j, k).depth;
|
||||
Connection& connection = new_connection_set.getFromIJK(i, j, k);
|
||||
connection.updateSegment(compseg.segment_number,
|
||||
compseg.center_depth,
|
||||
cdepth,
|
||||
compseg.m_seqIndex,
|
||||
{ compseg.m_distance_start, compseg.m_distance_end });
|
||||
}
|
||||
|
||||
@@ -247,11 +247,7 @@ const std::optional<std::pair<double, double>>& Connection::perf_range() const {
|
||||
std::size_t compseg_insert_index,
|
||||
const std::pair<double, double>& perf_range) {
|
||||
this->segment_number = segment_number_arg;
|
||||
// Keep the default (center cell) value unless a positive (hopefully reasonable) value is given
|
||||
if (center_depth_arg > 0)
|
||||
{
|
||||
this->center_depth = center_depth_arg;
|
||||
}
|
||||
this->center_depth = center_depth_arg;
|
||||
this->m_sort_value = compseg_insert_index;
|
||||
this->m_perf_range = perf_range;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE(AICDWellTest) {
|
||||
auto dir = Opm::Connection::Direction::Z;
|
||||
const auto kind = Opm::Connection::CTFKind::DeckValue;
|
||||
Opm::WellConnections connection_set(Opm::Connection::Order::TRACK, 10,10);
|
||||
Opm::EclipseGrid grid(20,20,20);
|
||||
Opm::EclipseGrid grid(20,20,20, 1., 1., 25.0, 2500.0);
|
||||
connection_set.add(Opm::Connection( 19, 0, 0,grid.getGlobalIndex(19,0,0), 1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
connection_set.add(Opm::Connection( 19, 0, 1,grid.getGlobalIndex(19,0,1), 1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
connection_set.add(Opm::Connection( 19, 0, 2,grid.getGlobalIndex(19,0,2), 1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
@@ -220,7 +220,7 @@ BOOST_AUTO_TEST_CASE(MultisegmentWellTest) {
|
||||
auto dir = Opm::Connection::Direction::Z;
|
||||
const auto kind = Opm::Connection::CTFKind::DeckValue;
|
||||
Opm::WellConnections connection_set(Opm::Connection::Order::TRACK, 10,10);
|
||||
Opm::EclipseGrid grid(20,20,20);
|
||||
Opm::EclipseGrid grid(20,20,20, 1., 1., 25.0, 2500.0);
|
||||
connection_set.add(Opm::Connection( 19, 0, 0,grid.getGlobalIndex(19,0,0), 1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
connection_set.add(Opm::Connection( 19, 0, 1,grid.getGlobalIndex(19,0,1), 1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
connection_set.add(Opm::Connection( 19, 0, 2,grid.getGlobalIndex(19,0,2), 1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
@@ -387,7 +387,7 @@ BOOST_AUTO_TEST_CASE(WrongDistanceCOMPSEGS) {
|
||||
auto dir = Opm::Connection::Direction::Z;
|
||||
const auto kind = Opm::Connection::CTFKind::DeckValue;
|
||||
Opm::WellConnections connection_set(Opm::Connection::Order::TRACK, 10,10);
|
||||
Opm::EclipseGrid grid(20,20,20);
|
||||
Opm::EclipseGrid grid(20,20,20, 1., 1., 25., 2500.);
|
||||
connection_set.add(Opm::Connection( 19, 0, 0, grid.getGlobalIndex(19,0,0),1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
connection_set.add(Opm::Connection( 19, 0, 1, grid.getGlobalIndex(19,0,1),1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
connection_set.add(Opm::Connection( 19, 0, 2, grid.getGlobalIndex(19,0,2),1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
@@ -456,7 +456,7 @@ BOOST_AUTO_TEST_CASE(NegativeDepthCOMPSEGS) {
|
||||
auto dir = Opm::Connection::Direction::Z;
|
||||
const auto kind = Opm::Connection::CTFKind::DeckValue;
|
||||
Opm::WellConnections connection_set(Opm::Connection::Order::TRACK, 10,10);
|
||||
Opm::EclipseGrid grid(20,20,20);
|
||||
Opm::EclipseGrid grid(20,20,20, 1., 1., 25., 2500.);
|
||||
connection_set.add(Opm::Connection( 19, 0, 0, grid.getGlobalIndex(19,0,0),1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
connection_set.add(Opm::Connection( 19, 0, 1, grid.getGlobalIndex(19,0,1),1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
connection_set.add(Opm::Connection( 19, 0, 2, grid.getGlobalIndex(19,0,2),1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
@@ -525,7 +525,7 @@ BOOST_AUTO_TEST_CASE(testwsegvalv) {
|
||||
auto dir = Opm::Connection::Direction::Z;
|
||||
const auto kind = Opm::Connection::CTFKind::DeckValue;
|
||||
Opm::WellConnections connection_set(Opm::Connection::Order::TRACK, 10,10);
|
||||
Opm::EclipseGrid grid(20,20,20);
|
||||
Opm::EclipseGrid grid(20,20,20, 1., 1., 25., 2500.);
|
||||
connection_set.add(Opm::Connection( 19, 0, 0, grid.getGlobalIndex(19,0,0), 1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
connection_set.add(Opm::Connection( 19, 0, 1, grid.getGlobalIndex(19,0,1), 1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
connection_set.add(Opm::Connection( 19, 0, 2, grid.getGlobalIndex(19,0,2), 1, 0.0, Opm::Connection::State::OPEN , 200, 17.29, 0.25, 0.0, 0.0, 0.0, 0.0, 0, dir, kind, 0, true) );
|
||||
|
||||
Reference in New Issue
Block a user