jonnymaserati / welleng

A collection of Wells/Drilling Engineering tools, focused on well trajectory planning for the time being.
Apache License 2.0
119 stars 33 forks source link

Project ahead feature: Bit position #85

Closed huangkai31 closed 3 years ago

huangkai31 commented 3 years ago

From MWD -> Bit, there's still 18m (or less) , and it will be great to get the current bit position with current survey data . FYI, there's 2 projection type according to compass:

  1. project to target
  2. curve only: user defined projection
jonnymaserati commented 3 years ago

Excellent suggestion, thank you!

I'll have a think about what's the best way to implement this, maybe a new module with a convenience method call from Survey.

To date, welleng has been predominantly intended for planning or review of surveys, so nice to start thinking real-time.

huangkai31 commented 3 years ago

wonderful, add a method in Survey, and use current survey data to predict bit position would be great.

I can develop a simple UI using Dash to do some testing

jonnymaserati commented 3 years ago

Sounds good!

I’d be happy to add to review pull requests if you want to add that to welleng, or if you add it to a repo then I’d be happy to take a look and help develop a front end.

On 2 Sep 2021, at 10:29, Kai Huang @.***> wrote:

 wonderful, add a method in Survey, and use current survey data to predict bit position would be great.

I can develop a simple UI using Dash to do some testing

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or unsubscribe.

jonnymaserati commented 3 years ago

@huangkai31 I've written a function and added a convenience method that returns the project point as a Node... that way it has all the properties calculated.

You have to input the delta_md (the distance from the survey tool to the bit) and it will by default use the last survey station data to project (i.e. the current DLS and toolface), but you can also enter your own parameters to overwrite the default ones. If dls=0 then it's a hold, otherwise is a curve.

I don't want to modify the survey with the projected point, just return the data - sound okay?

I've added a branch feature/project_survey_to_bit

huangkai31 commented 3 years ago

@jonnymaserati Sounds great! That's exactly what I'm looking for !

jonnymaserati commented 3 years ago

Great... I'm just going to add a project_to_target function and then I'll merge it into the dev branch.

jonnymaserati commented 3 years ago

Okay, project_to_target is working, but I need to add it as a method to Survey.

Have a look at the code... node1 is the data at the bit and survey_to_target generates a survey listing for how to get to the target. I'll update this so that a Node is passed instead, but the principle will be the same.

import welleng as we

node0 = we.survey.project_ahead([0, 0, 0], [0, 0, 1], 30, 3, 0)

survey = we.survey.Survey(
    md=[0, 100, 500, 3000],
    inc=[0, 0, 30, 30],
    azi=[0, 0, 90, 90],
    deg=True
).interpolate_survey(step=30)

fig = survey.figure()

node1 = survey.project_to_bit(30)

target = we.node.Node(
    pos=[100, 1500, 3000],
    vec=[0, 0, 1]
)

survey_to_target = we.survey.project_to_target(
    survey, [2000, 2000, 4000], [0, 0, 1]
)

fig.add_trace(survey_to_target.figure().data[0])

fig.show()

print("Done")

The figure below shows the current survey and then a survey of how to get to the target... this survey can be interrogated to see what toolface etc is required to steer there.

newplot (48)

Seem okay?

jonnymaserati commented 3 years ago

@huangkai31 the updates have been merged into the dev branch with #86. I'll close this once I've merged them into the main branch.

jonnymaserati commented 3 years ago

These are now merged into the main branch with #87 and an example is included here.