gp.ijs 457 B

123456789101112131415161718
  1. require 'plot numeric trig stats tables/csv'
  2. 0 : 0
  3. to calculate-dxc equation will be: log10(R/60N)/log10(12W/106D) where : R=ROP (ft/hr) N=RPM (rev/min) W=WOB (lbs) D=bit size (inch)"
  4. )
  5. r =: >:?1000#12
  6. n =: >:?1000#60
  7. w =: >:?1000#20
  8. d =: 1000#12.25
  9. mw =: 1000#1.12
  10. dxc =: ((10^. (r % (60 * n))) % (10^. ((w * 12) % (d * 1000)))) * (mw % 8.4)
  11. lreg =: 4 : 'y %. 1 ,. x'
  12. treg =: 3 : '((1{((i.#y) lreg y))*(i.#y))+(0{((i.#y) lreg y))'
  13. plot dxc,: treg dxc