Getting started with programming

A few people have asked me about getting started with learning how to program. I think the best place to begin and easiest way way to start is with Python 3 ->

You will need to get the Python Interpreter at Python.Org, which will allow you to get started by picking the correct installer for whatever operating system you are using and installing it on your machine. If your running a Mac, the best way to install is using a package manager called Homebrew,

I would suggest watching videos from Corey Schafer on YouTube…

Coil Drillouts3

Coil Drillouts Cubed.

When you are milling out plugs there is a tendency to stick with the status quo.. running super think gel sweeps and slugs of chemical.  Then after running these super thick slugs, pulling uphole and doing a “wiper” trip, or “short’ trip.  In reality, it is a waste to use viscosifying chemicals other than just enough FR  (Polyacrylamide -CH2CHCONH2)  to keep the circulation pressure low enough to keep moving without putting too much stress on the coil.

When your trying to get the mill/drill cuttings to transport to surface, a new logic applies;  keep the fluid as thin and turbulent as possible.  FR can’t pick up sand on its own; shear and turbulent action pick up the fine sediment and keep it suspended … same with plug debris.  The thicker you make the circulation fluid the worse the problem becomes – it just extrudes over the top of the sand and debris with no turbulent flow.

Thin out your drilling fluid – stop pumping sweeps.  Circulate fluid while moving slowly downhole, until all the surface returns are clean.  Instead of pulling short trips and getting wedged into debris, move downward slowly and let the well clean up just like you were drilling openhole.  When you reach the desired total depth, circulate clean again with about 300 ft/min or more annular velocity.  If you can get more annular velocity go for it.

SPE-187337-MS details the whole procedure needed to overhaul your current drillout program. It’s titled “Stop, Drop and Circulate; An Engineered Approach to Coiled Tubing Drillouts”  {It’s a reference to a popular 1980’s ‘clothing on fire; what to do’ campaign giving advise to ‘Stop, Drop, and Roll’}

(*Note :  The way that the well was stimulated will determine the rate of return you want.  If you flow back too aggressively after a crosslinked gel stimulation the small aperture of the perforations can cause washing out or pitting of the coil downhole.  Huge 100 mesh sand slickwater stimulation’s tend to leave large, tremendously eroded perforations behind that don’t tend to have the harmful velocities seen with small perforations.  If you get to greedy, you can end up causing coil damage.  With slickwater stimulation there is a much larger window… we really haven’t found out what you can get away with, but its a lot…)

The other thing to keep in mind is the size of the flowcross that you are using.  If you have to go cheap and get 2″ valves off the main bore, you run the risk of too much velocity across the coil tubing when the sand laden fluid erodes in transit through the orifice as it enters the 2″ ID of the flowcross.  Always try to get at least 1.5 x the diameter of the coil string for your flowcross when you drill out.  Use valves with a full bore opening when possible.

Drawing Diagrams for Sense of Scale

If you find yourself in a situation where you have to get tools unstuck, or you are fishing a downhole assembly, a 1:1 scale drawing can really help to add perspective to what the situation is.  Using Google SketchUp or other programs. draw a 1:1 scale representation and print it out – you will surely find it helpful.

Here you can see where a 4-5/8″ Bit is inside of 5-1/2″ 20.0# Casing.  Notice that the bit is almost exactly the size of the casing drift.  Additionally seeing the comparison of the size of the motor (3-1/8″) and Tubing (2-3/8″) against the size of the bit is helpful.

It’s also a good idea if you will be using impression blocks,  to cut out the shapes (diameters) of the strings downhole so that you can match them up when you retrieve the impression block, and apply them against the face to see if there is a match.

Collapsed Tubing

Collapsed Tubing Dimensions

When tubing collapses, sometimes you need a ballpark dimension to try and figure out what might be ‘looking up’ at you.

Just take the (ID x Pi /2) + (OD-ID)
2.441 * 3.1416 / 2 + (2.875-2.441)
7.6686 / 2 + (.434)
3.8343 + .434 = 4.2683 Inches

A slightly more complicated way involves using the outside circumference:
(((OD*Pi) – (OD-ID)*Pi  )/2 ) + (OD – ID)
((Circumference of Tubing – Circumference of Total Wall Thickness) / 2) + Wall Thickness
(((2.875 x 3.1416) – (2.875-2.441)*3.1416)/2) + (2.875-2.441)
(9.0321 – (.434*3.1416)) / 2) + .434
((9.0321 – 1.3635) / 2) + .434
(7.6686 / 2) + .434 = 4.2683

So… just over 4-1/2″
[This is if the tubing hypothetically flattens absolutely flat, which is not the case .. It does give a good estimate for selection of washpipe or other overshot / grapple tools needed to fish collapsed tubing.]


Set Down, latch on, pullover ’bout 10K# to make sure you’re latched. Set down three-thousand; Whip it Right, Hold the Torque, pull up 10K# over string weight.  Take off the wrench, and pull 20-25K# – go have a coca-cola – come back down, sink the joint, and come out of the hole.  Make sure you have good ‘back-ups’ so you don’t rotate, and don’t over-run the collars.

Exercise a little patience to let the elements relax after you release them; don’t be in a hurry.  Don’t forget to “sink the joint” meaning go down past the setting depth to make sure you actually have the packer on the end of the tubing, and that you have free movement.