mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 14:03:18 -06:00
#8240 Use correct measured depth for the generated path point at sea level
This commit is contained in:
parent
b2433bf185
commit
0c25794518
@ -315,16 +315,19 @@ void RimFileWellPath::ensureWellPathStartAtSeaLevel( RigWellPath* wellPath )
|
|||||||
newPoints.insert( newPoints.end(), wellPathPoints.begin(), wellPathPoints.end() );
|
newPoints.insert( newPoints.end(), wellPathPoints.begin(), wellPathPoints.end() );
|
||||||
wellPath->setWellPathPoints( newPoints );
|
wellPath->setWellPathPoints( newPoints );
|
||||||
|
|
||||||
// Give the new point zero measured depth.
|
// Use rkbDiff as MD for the point at sea level
|
||||||
std::vector<double> newMeasuredDepths = { 0.0 };
|
double mdAtSeaLevel = 0.0;
|
||||||
|
if ( wellPath->datumElevation() > 0.0 )
|
||||||
// And adjust measured depths of the read data
|
|
||||||
// with the diff between the old and new first point.
|
|
||||||
double diffMd = std::abs( newPoints[1].z() - newPoints[0].z() );
|
|
||||||
for ( double originalMd : measuredDepths )
|
|
||||||
{
|
{
|
||||||
newMeasuredDepths.push_back( originalMd + diffMd );
|
mdAtSeaLevel = wellPath->datumElevation();
|
||||||
}
|
}
|
||||||
|
else if ( this->airGap() != std::numeric_limits<double>::infinity() && this->airGap() > 0.0 )
|
||||||
|
{
|
||||||
|
mdAtSeaLevel = this->airGap();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<double> newMeasuredDepths = { mdAtSeaLevel };
|
||||||
|
newMeasuredDepths.insert( newMeasuredDepths.end(), measuredDepths.begin(), measuredDepths.end() );
|
||||||
|
|
||||||
wellPath->setMeasuredDepths( newMeasuredDepths );
|
wellPath->setMeasuredDepths( newMeasuredDepths );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user