Store Peaceman Denominator and Connection Length in Restart File

This commit writes the value of the denominator expression in
Peaceman's formula to SCON[6] and the connection's interval length
to SCON[31] in the restart file.  Using this information at restart
time is the subject of follow-up work.
This commit is contained in:
Bård Skaflestad 2023-11-13 09:12:05 +01:00
parent 722559e1f5
commit 1129e95a16
3 changed files with 20 additions and 2 deletions

View File

@ -50,6 +50,10 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
EffectiveKH = 3, // Effective Kh product of connection EffectiveKH = 3, // Effective Kh product of connection
SkinFactor = 4, // Skinfactor - item 'SKIN' from COMPDAT SkinFactor = 4, // Skinfactor - item 'SKIN' from COMPDAT
CFDenom = 6, // Denominator in connection transmissibility
// factor expression
item12 = 11, // Connection transmissibility factor item12 = 11, // Connection transmissibility factor
SegDistEnd = 20, // Distance to end of connection in segment SegDistEnd = 20, // Distance to end of connection in segment
@ -57,6 +61,9 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
item30 = 29, // Unknown item30 = 29, // Unknown
item31 = 30, // Unknown item31 = 30, // Unknown
EffectiveLength = 31, // Effective length of connection's perforation interval.
CFInDeck = 40, // = 0 for connection factor not defined, = 1 for connection factor defined CFInDeck = 40, // = 0 for connection factor not defined, = 1 for connection factor defined
}; };
} // SConn } // SConn

View File

@ -191,8 +191,9 @@ namespace {
sConn[Ix::SkinFactor] = conn.skinFactor(); sConn[Ix::SkinFactor] = conn.skinFactor();
sConn[Ix::item12] = sConn[Ix::ConnTrans]; sConn[Ix::CFDenom] = conn.ctfProperties().peaceman_denom;
sConn[Ix::item12] = sConn[Ix::ConnTrans];
if (conn.attachedToSegment()) { if (conn.attachedToSegment()) {
const auto& [start, end] = *conn.perf_range(); const auto& [start, end] = *conn.perf_range();
@ -202,7 +203,11 @@ namespace {
sConn[Ix::item30] = -1.0e+20f; sConn[Ix::item30] = -1.0e+20f;
sConn[Ix::item31] = -1.0e+20f; sConn[Ix::item31] = -1.0e+20f;
sConn[Ix::CFInDeck] = (conn.ctfAssignedFromInput()) ? 1 : 0;
sConn[Ix::EffectiveLength] =
scprop(M::length, conn.connectionLength());
sConn[Ix::CFInDeck] = conn.ctfAssignedFromInput() ? 1.0f : 0.0f;
} }
template <class SConnArray> template <class SConnArray>

View File

@ -687,11 +687,13 @@ BOOST_AUTO_TEST_CASE(Declared_Connection_Data)
BOOST_CHECK_CLOSE(sconn[i0 + Ix::Depth], 7050., 1.0e-5); // PROD - conn 1 : Centre depth BOOST_CHECK_CLOSE(sconn[i0 + Ix::Depth], 7050., 1.0e-5); // PROD - conn 1 : Centre depth
BOOST_CHECK_CLOSE(sconn[i0 + Ix::Diameter], 0.20, 1.0e-5); // PROD - conn 1 : diameter BOOST_CHECK_CLOSE(sconn[i0 + Ix::Diameter], 0.20, 1.0e-5); // PROD - conn 1 : diameter
BOOST_CHECK_CLOSE(sconn[i0 + Ix::EffectiveKH], 1581.13879, 1.0e-5); // PROD - conn 1 : effective kh-product BOOST_CHECK_CLOSE(sconn[i0 + Ix::EffectiveKH], 1581.13879, 1.0e-5); // PROD - conn 1 : effective kh-product
BOOST_CHECK_CLOSE(sconn[i0 + Ix::CFDenom], 4.37696314, 1.0e-5);
BOOST_CHECK_CLOSE(sconn[i0 + Ix::item12], 2.55826545, 1.0e-5); // PROD - conn 1 : Transmissibility factor BOOST_CHECK_CLOSE(sconn[i0 + Ix::item12], 2.55826545, 1.0e-5); // PROD - conn 1 : Transmissibility factor
BOOST_CHECK_CLOSE( BOOST_CHECK_CLOSE(
sconn[i0 + Ix::SegDistEnd], 130., 1.0e-5); // PROD - conn 1 : Distance to end of connection in segment sconn[i0 + Ix::SegDistEnd], 130., 1.0e-5); // PROD - conn 1 : Distance to end of connection in segment
BOOST_CHECK_CLOSE( BOOST_CHECK_CLOSE(
sconn[i0 + Ix::SegDistStart], 30., 1.0e-5); // PROD - conn 1 : Distance to start of connection in segment sconn[i0 + Ix::SegDistStart], 30., 1.0e-5); // PROD - conn 1 : Distance to start of connection in segment
BOOST_CHECK_CLOSE(sconn[i0 + Ix::EffectiveLength], 100.0, 1.0e-5);
// Well no 2 - WINJ well // Well no 2 - WINJ well
connNo = 3; connNo = 3;
@ -700,11 +702,13 @@ BOOST_AUTO_TEST_CASE(Declared_Connection_Data)
BOOST_CHECK_CLOSE(sconn[i0 + Ix::Depth], 7250., 1.0e-5); // WINJ - conn 3 : Centre depth BOOST_CHECK_CLOSE(sconn[i0 + Ix::Depth], 7250., 1.0e-5); // WINJ - conn 3 : Centre depth
BOOST_CHECK_CLOSE(sconn[i0 + Ix::Diameter], 0.20, 1.0e-5); // WINJ - conn 3 : diameter BOOST_CHECK_CLOSE(sconn[i0 + Ix::Diameter], 0.20, 1.0e-5); // WINJ - conn 3 : diameter
BOOST_CHECK_CLOSE(sconn[i0 + Ix::EffectiveKH], 1581.13879, 1.0e-5); // WINJ - conn 3 : effective kh-product BOOST_CHECK_CLOSE(sconn[i0 + Ix::EffectiveKH], 1581.13879, 1.0e-5); // WINJ - conn 3 : effective kh-product
BOOST_CHECK_CLOSE(sconn[i0 + Ix::CFDenom], 4.37696314, 1.0e-5);
BOOST_CHECK_CLOSE(sconn[i0 + Ix::item12], 2.55826545, 1.0e-5); // WINJ - conn 3 : Transmissibility factor BOOST_CHECK_CLOSE(sconn[i0 + Ix::item12], 2.55826545, 1.0e-5); // WINJ - conn 3 : Transmissibility factor
BOOST_CHECK_CLOSE( BOOST_CHECK_CLOSE(
sconn[i0 + Ix::SegDistEnd], 0., 1.0e-5); // WINJ - conn 3 : Distance to end of connection in segment sconn[i0 + Ix::SegDistEnd], 0., 1.0e-5); // WINJ - conn 3 : Distance to end of connection in segment
BOOST_CHECK_CLOSE( BOOST_CHECK_CLOSE(
sconn[i0 + Ix::SegDistStart], 0., 1.0e-5); // WINJ - conn 3 : Distance to start of connection in segment sconn[i0 + Ix::SegDistStart], 0., 1.0e-5); // WINJ - conn 3 : Distance to start of connection in segment
BOOST_CHECK_CLOSE(sconn[i0 + Ix::EffectiveLength], 100.0, 1.0e-5);
connNo = 4; connNo = 4;
i0 = ih.ncwmax * ih.nsconz + (connNo - 1) * ih.nsconz; i0 = ih.ncwmax * ih.nsconz + (connNo - 1) * ih.nsconz;
@ -712,11 +716,13 @@ BOOST_AUTO_TEST_CASE(Declared_Connection_Data)
BOOST_CHECK_CLOSE(sconn[i0 + Ix::Depth], 7250., 1.0e-5); // WINJ - conn 4 : Centre depth BOOST_CHECK_CLOSE(sconn[i0 + Ix::Depth], 7250., 1.0e-5); // WINJ - conn 4 : Centre depth
BOOST_CHECK_CLOSE(sconn[i0 + Ix::Diameter], 0.20, 1.0e-5); // WINJ - conn 4 : diameter BOOST_CHECK_CLOSE(sconn[i0 + Ix::Diameter], 0.20, 1.0e-5); // WINJ - conn 4 : diameter
BOOST_CHECK_CLOSE(sconn[i0 + Ix::EffectiveKH], 1581.13879, 1.0e-5); // WINJ - conn 4 : effective kh-product BOOST_CHECK_CLOSE(sconn[i0 + Ix::EffectiveKH], 1581.13879, 1.0e-5); // WINJ - conn 4 : effective kh-product
BOOST_CHECK_CLOSE(sconn[i0 + Ix::CFDenom], 4.37696314, 1.0e-5);
BOOST_CHECK_CLOSE(sconn[i0 + Ix::item12], 2.55826545, 1.0e-5); // WINJ - conn 4 : Transmissibility factor BOOST_CHECK_CLOSE(sconn[i0 + Ix::item12], 2.55826545, 1.0e-5); // WINJ - conn 4 : Transmissibility factor
BOOST_CHECK_CLOSE( BOOST_CHECK_CLOSE(
sconn[i0 + Ix::SegDistEnd], 0., 1.0e-5); // WINJ - conn 4 : Distance to end of connection in segment sconn[i0 + Ix::SegDistEnd], 0., 1.0e-5); // WINJ - conn 4 : Distance to end of connection in segment
BOOST_CHECK_CLOSE( BOOST_CHECK_CLOSE(
sconn[i0 + Ix::SegDistStart], 0., 1.0e-5); // WINJ - conn 4 : Distance to start of connection in segment sconn[i0 + Ix::SegDistStart], 0., 1.0e-5); // WINJ - conn 4 : Distance to start of connection in segment
BOOST_CHECK_CLOSE(sconn[i0 + Ix::EffectiveLength], 100.0, 1.0e-5);
} }
// XCONN (PROD) + (WINJ) // XCONN (PROD) + (WINJ)