# Calculating Lag Depth

## Recommended Posts

I'm thinking that using Calculus is the way to go with Depth, ROP, and Lag Depth,

This is how it would work:

As the kelly comes down, the Depth, ROP, and LagVolume channels are divided up into 31 parts. Calculus

of course, would divide everything up infintesimally, and then add them all back together.

Anyway, the kelly can get divided into smaller increments, or larger if you like.

The problem with Lag Depth is not really so different than calculating Depth and ROP, except at first,

it looks very complicated.

A little reverse algebra can get it done. You start with a Hi and Low analog calibration for the Kelly height,

So, it looks like this, Br[0] is the channel reading for kelly height.

If Br[0]<BrHi //BrHi is the kelly voltage at 31 feet

IfBr[0]>KV30 //KV30 is the voltage when the kelly is at 30'

LagVol=[(LagDepth)-(RefLagDepth)]*(AnnVolperfoot)

end if

And so on for every increment of the kelly that has a depth and ROP also-but those are different formulas.

Then ,

LagDepth=Ref Lag Depth+((LagVol-RefVol)/annvolperfoot),

Then, get a variable display on a page for Lag Depth.

Then sequence needs to match Lag Volume to a Barrel Count, or stroke count, converted to barrels.

I'm not sure how to write it, but if barrel count =lag volume then,

LagDepth=Ref Lag Depth+((BarrelCount[10]-RefVol)/annvolperfoot)

But then, it would stop working once everything is lagged up, and they are just circulating.

and lag depth would get deeper than total depth! Can't let that happen.