mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
MSW: Now using a stable offset for the small branches start point.
Pulling the split point towards the first cell corner. p4#: 22238
This commit is contained in:
@@ -1092,6 +1092,7 @@ void RifReaderEclipseOutput::readWellCells(const ecl_grid_type* mainEclGrid)
|
|||||||
// Data for segment position calculation
|
// Data for segment position calculation
|
||||||
int lastConnectionSegmentId = -1;
|
int lastConnectionSegmentId = -1;
|
||||||
cvf::Vec3d lastConnectionPos = cvf::Vec3d::UNDEFINED;
|
cvf::Vec3d lastConnectionPos = cvf::Vec3d::UNDEFINED;
|
||||||
|
cvf::Vec3d lastConnectionCellCorner= cvf::Vec3d::UNDEFINED;
|
||||||
double lastConnectionCellSize = 0;
|
double lastConnectionCellSize = 0;
|
||||||
double accLengthFromLastConnection = 0;
|
double accLengthFromLastConnection = 0;
|
||||||
int segmentIdBelow = -1;
|
int segmentIdBelow = -1;
|
||||||
@@ -1132,7 +1133,10 @@ void RifReaderEclipseOutput::readWellCells(const ecl_grid_type* mainEclGrid)
|
|||||||
lastConnectionPos = grids[gridNr]->cell(point.m_gridCellIndex).center();
|
lastConnectionPos = grids[gridNr]->cell(point.m_gridCellIndex).center();
|
||||||
cvf::Vec3d cellVxes[8];
|
cvf::Vec3d cellVxes[8];
|
||||||
grids[gridNr]->cellCornerVertices(point.m_gridCellIndex, cellVxes);
|
grids[gridNr]->cellCornerVertices(point.m_gridCellIndex, cellVxes);
|
||||||
|
lastConnectionCellCorner = cellVxes[0];
|
||||||
lastConnectionCellSize = (lastConnectionPos - cellVxes[0]).length();
|
lastConnectionCellSize = (lastConnectionPos - cellVxes[0]).length();
|
||||||
|
|
||||||
|
|
||||||
lastConnectionSegmentId = well_segment_get_id(segment);
|
lastConnectionSegmentId = well_segment_get_id(segment);
|
||||||
accLengthFromLastConnection = well_segment_get_length(segment)/(connectionCount+1);
|
accLengthFromLastConnection = well_segment_get_length(segment)/(connectionCount+1);
|
||||||
if ( ! segmentBelowHasConnections) upperSegmentIdsOfUnpositionedSegementGroup.push_back(segmentIdBelow);
|
if ( ! segmentBelowHasConnections) upperSegmentIdsOfUnpositionedSegementGroup.push_back(segmentIdBelow);
|
||||||
@@ -1218,7 +1222,7 @@ void RifReaderEclipseOutput::readWellCells(const ecl_grid_type* mainEclGrid)
|
|||||||
bool isAnInsolationContribution = accLengthFromLastConnection < lastConnectionCellSize;
|
bool isAnInsolationContribution = accLengthFromLastConnection < lastConnectionCellSize;
|
||||||
|
|
||||||
cvf::Vec3d lastConnectionPosWOffset = lastConnectionPos;
|
cvf::Vec3d lastConnectionPosWOffset = lastConnectionPos;
|
||||||
if (isAnInsolationContribution) lastConnectionPosWOffset += 0.5*lastConnectionCellSize*cvf::Vec3d::X_AXIS;
|
if (isAnInsolationContribution) lastConnectionPosWOffset += 0.4*(lastConnectionCellCorner-lastConnectionPos);
|
||||||
|
|
||||||
segmentIdToPositionContrib[well_segment_get_id(outletSegment)].push_back(
|
segmentIdToPositionContrib[well_segment_get_id(outletSegment)].push_back(
|
||||||
SegmentPositionContribution(lastConnectionSegmentId, lastConnectionPosWOffset, accLengthFromLastConnection, isAnInsolationContribution, segmentIdBelow, -1, false));
|
SegmentPositionContribution(lastConnectionSegmentId, lastConnectionPosWOffset, accLengthFromLastConnection, isAnInsolationContribution, segmentIdBelow, -1, false));
|
||||||
|
|||||||
Reference in New Issue
Block a user