Calculating Lag Depth


mkgrier5

Recommended Posts

Hey there SteveMyers!

Calc'ing lagd pretty much -

The next foot is cut

There is a known "bottoms up" in strokes

Count negative strokes until "zero"

That foot is now "up"

i.e. - 1900' is cut...There is 600 bottoms up strokes...Count those strokes "up"...1900 is up! (bottoms up!)...1901' is cut...There is 610 bottoms up strokes...ect...ect...

Hope this helps and hope I am not leading you incorrectly!

Link to comment
Share on other sites

Yeah, that's pretty much what I was thinking, I was just spitballing a convenient way to track all the distinct samples in the pipeline (pun intended). IOW, if my current depth is 1900', then I know strokes (or cf) of lag, so I enter a row in my array of {1900, 600}. It's just one entry in a 2D array, with one row per differentiable sample point, representing all the slugs en route. Then, each time I get a stroke signal, I subtract 1 from all the column 2 values. If one changes from one to zero, that is the slug currently coming out and being analyzed, and you delete that row from the array. I might do the lag in actual volume, rather than strokes, but same result either way.

Link to comment
Share on other sites

Hello again SteveMeyers!

It wouldn't be accurate if you didn't track the samples!

After counting up or while counting up your full bottoms-up strokes (after a full circulate out or after a trip, ect...), there will be footage made...

Count the strokes in-between each foot and add it to your bottoms up! (StksPerFt)

You must add from the previous "bottoms-up" in your array, but your depth/bottupstk array will continue to populate with each new "bottoms-up" number...

And as your counter continues to count and as each bottoms up is passed, there is your LagD...


CurrBottUp = LagArray[0][1]

StksPerSec = Counts[0] + Counts2[0]

if(Strokes1[0]+Strokes2[0] > CurrBottUp[0])
LaggedDepthChn = LagArray[0][0]

LagArray.RemoveAt(0)

CurrBottUp.ClearHistory()
endif

[/CODE]

[CODE]
lagindex = NumRows(LagArray) - 1

LagStrokes[0][1] = LagArray[lagindex][1] + StkPerFoot[0]
LagStrokes[0][0] = Depth[0]
LagArray.Append(LagStrokes)

LagStrokes.ClearHistory()
[/CODE]

I have the above in a loop that only happens if the "LagArray" is populated with data...

If "LagArray" is empty, that means everything has stroked "up" and is time to start from a full bottoms up count...

There is a few things I need to work on in ours, like starting in the middle of a "count"...My stroked Lagd is best started from a blank volume of drilling mud...

I need to find a different way to reset my counts...As of now I have to reset my LabJack counter....

Oh, I would also suggest use of your own stroke counter...I'm pretty sure you could use the WITS SPM/60, but it is always nice to rely on yourself!

Plus I like to see the variable StksPerSec[0]... :D

HTH and have a good weekend...

Link to comment
Share on other sites

  • 2 weeks later...

Then, each time I get a stroke signal, I subtract 1 from all the column 2 values.

Hey there again SteveMeyers!

In the above quote, you talk of subracting 1 from the entire column of "stroke values" in your 2d array...How is this math done??

Any advice would be great! Looking to make a graphical lag display of all the cuts coming up! Using that option would work great! (Doing math on the entire column of the array instead of just doing math on the last value)...

Link to comment
Share on other sites

Assuming strokes remaining are in the second column (column 1), the syntax is:

MySlugArray[][1] --[/CODE]

The empty brackets tell DAQ Factory you're talking about column 1, all rows.

You could also do

[CODE]MySlugArray[][1] -= 1[/CODE]

or

[CODE]MySlugArray[][1] -= fill(1, NumRows(MySlugArray))[/CODE]

but I think the first one is the cleanest. The '--' notation only works for a decrement of one, though, so if I end up tracking CF rather than strokes, I'll use the second method.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.