pro-well-plan / torque_drag

Torque and drag calculations
GNU Lesser General Public License v3.0
9 stars 9 forks source link

List indexing #3

Closed jonnymaserati closed 3 years ago

jonnymaserati commented 3 years ago

If you're running through the list in reverse... https://github.com/pro-well-plan/torque_drag/blob/6fcf3587aa0df3d84a4f3a37f64ef3f8547a7a38/torque_drag/main.py#L49 Should this be

for x in reversed(range(0, well.zstep - 1)):

And in the subsequent calculations where x - 1 is referenced, shouldn't it be x + 1?

You're working back from a fixed value at the bit. So if the bit is x = 25, then the first calculation should be for x = 24 and the previous value was for x = 25, i.e. x + 1?

I don't suppose any test data was provided with the SPE paper?

jcamiloangarita commented 3 years ago

That's a good point. Remember that force and torque are calculated for every section of pipe, and inputs provide values for specific points of the well (e.g. inc and azi), not a section. In this loop we need to look at the values of both ends; the first value (0 if WOB=0) is assigned at the bit as a "point", however it is necessary to include this point in the loop since is required for the deepest section of pipe (just above the bit, the first section to be calculated)

jonnymaserati commented 3 years ago

The order you take the points will affect the sign... they'll make the delta angles either positive or negative.

I think you need to work away from the bit, but the way it's set up you're facing the wrong direction?

jcamiloangarita commented 3 years ago

Sorry for late reply. This issue was tackled over the new release 0.0.9. Delta calcs were a little ambiguous so now taking values directly from wellpath obj (well_profile)