Perl app for lead bullet shooters

For PC type software that runs under some PC opsys.

Perl app for lead bullet shooters

Postby Doug Coulter » Tue Mar 22, 2011 6:34 pm

I cast some of my own bullets. Lead bullets are "special" if you want to shoot them accurately and at any decent velocity. Describing all that would get me too far off topic, but the baseline idea is that you want just enough peak pressure to upset the bullet very slightly in the bore -- makes it fit better, but too little or too much -- well, you either get lousy performance all around (worse accuracy and worse velocity if too low pressure) or crappy accuracy (too high, bullet warped by pressure applied).

Now, it's not real hard to figure out what pressure you want if you know the BHN of your alloy. But how to convert load data for real high pressures and amounts of powder down to lead bullet levels? Richard Lee found out that within a certain shell, with a certain powder and a certain bullet weight, there will be an exponent used for an exponential decay based on load reduction from a higher pressure.

Richard Lee ("Modern Reloading, second edition) goes over this in some detail, and his methods check here in tests -- you really can skip endless testing and get close right off. But it's a pain to try and find proper reduced loads from the jacketed bullet (high pressure and velocity) to match the pressure desired for a given hardness of your particular cast bullet. This helps with that. I put in some defaults, which you get if you just <CR> through everything, but they are unlikely to be the ones you want (or even correct for this case). So the program asks you for all those numbers. You input the numbers for the max load (given in most load books) and the pressure and velocity exponents (given in his book and some others) to get a plot of pressure and velocity vs grains of powder in the load. It's obviously going to be wrong near zero powder, because there is still a primer...but seems to be good in actual use at real pressures you'd want. So the low end of the plot is almost certainly not just right; below some pressure, the bullet does not emerge at all, for example.

RichardL (and I) believe that unlike what Lyman says, tiny loads of real fast powder don't really work -- they still have too much peak pressure. This checks out here, the Lyman loads really stink. They were motivated by an "urban myth" that small loads of slower burning powder sometimes detonate. Well, it's most probably a myth, and the real reason is that extremely reduced loads can accidentally be double-charged...no one has reliably duplicated the "myth". To be safe, I don't do this with really slow burners, but with mid range powders that leave the case fairly full -- nice even pressure, and less chance of a primer flash completely missing a tiny bit of powder laying on the case bottom. That would leave a bullet halfway down the barrel -- and that WILL break guns -- See Hatcher's notebook for more on that. Moral is, anytime you shoot a gun, and it doesn't sound or feel right -- check before firing again!

This is just a duplication of his work, but instead of an Excel spreadsheet (which he didn't publish) it's a perl/gnuplot program that's a little slicker anyway.

leadloadplot.zip
zip file (linux text format) of perl code.
Windows users get the Activestate per download and gnuplot/GnuplotIF the hard way...
(1.44 KiB) Downloaded 258 times

############# The code in perl ########## too bad no syntax highlighting here, but it's copy-pastable
Code: Select all
#!/usr/bin/perl -w

# Copyright by Doug Coulter, 3/22/2011
# GPL V2 license -- please improve and email improvements to
# info@coultersmithing.com
# gun guys should do GPL better -- we already help each other

# This math is based on some insights by Richard Lee, as expressed in his book
# Modern Reloading, second edition, where he describes how pressure and velocity
# vs powder can be predicted (exponential decay, different exponents).
# As he points out (and I've duplicated) there is a pressure that's best for a given
# hardness bullet -- just enough to upset the bullet metal *a little*.  This helps
# you find that load that will shoot your cast bullets the best.


# it would be nice to have the cursor display at bottom show both or either plot values,
# rather than just where the cursor happens to be

# you need to have gnuplot in your path, and the GnuplotIF perl module to get pretty pictures

use strict;
use Graphics::GnuplotIF qw(GnuplotIF);

################################

# numbers should be close for varget/.223/ 63 gr jacketed bullet
# we still need to learn them for cast bullets

my $velocity = 3199;
my $pressure = 55365;
my $grains = 26.4;
my $pfactor = 0.9206;
my $vfactor = .9626;
my $temp;

#################################

my @x;   # for gnuplot
my @y;
my @y2; # a very adventurous joke

# a way to pause so things don't disapear off the screen
  sub hitret
  {
  my $dummy = shift;
  print ("\n$dummy Hit return to continue ->");
  $dummy = <>;
  }

# main, get data from user

print ("This program can be edited for different defaults.  This is Varget, .223, and 63 gr bullet.\n");

print ("Starting pressure? ($pressure)    >");
chomp ($temp = <STDIN>);
if ($temp =~/^-?(?:\d+(?:\.\d*)?|\.\d+)$/) {$pressure = $temp;}

print ("Starting grains? ($grains)    >");
chomp ($temp = <STDIN>);
if ($temp =~/^-?(?:\d+(?:\.\d*)?|\.\d+)$/) {$grains = $temp;}

print ("pressure reduction pfactor? ($pfactor)    >");
chomp ($temp = <STDIN>);
if ($temp =~/^-?(?:\d+(?:\.\d*)?|\.\d+)$/) {$pfactor = $temp;}

print ("velocity reduction vfactor? ($vfactor)    >");
chomp ($temp = <STDIN>);
if ($temp =~/^-?(?:\d+(?:\.\d*)?|\.\d+)$/) {$vfactor = $temp;}


# compute arrays and print values on the terminal
while ($grains > 0)
{
print ("grains= $grains\tpressure=$pressure\n");
push (@x,$grains);
push (@y,$pressure);
push (@y2,$velocity * 10.0);
$grains -= 1;
$pressure *= $pfactor;
$velocity *= $vfactor;
}


# plot this crap

my  $plot = Graphics::GnuplotIF->new(title => "Pressure vs Grains", style => "lines");
$plot->gnuplot_set_plot_titles("Pressure, psi","Velocity, fps * 10");          # set legend
  $plot->gnuplot_cmd( "set grid" );                   # send a gnuplot command
$plot->gnuplot_plot_many( \@x, \@y, , \@x, \@y2);
hitret ("bye"); # pause so plot can be viewed, wait for <CR> from user




leadhard.gif
Table of BHN vs PSI for lead alloys


The pressure in the rightmost column is the one he's determined is best for a given hardness alloy (and of course, Lee sells a kit to measure that).
He likes about 25k psi for linotype (good rifle alloy), and about 14kpsi for pistol alloys.

leadloadscr.jpg
Screenshot
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA

Re: Perl app for lead bullet shooters

Postby Jerry » Wed Mar 23, 2011 1:26 am

How are you de-leading your barrels?

I used to reload 30-06 for my M1 until I heard the horror stories on reloading for military rifles. Also I could get ball ammo in the garand clips (berdan primed) for 640 rounds for $250 at the time.
Jerry
 
Posts: 573
Joined: Sun Jul 18, 2010 12:07 am
Location: Beaverton, OR

Re: Perl app for lead bullet shooters

Postby Doug Coulter » Wed Mar 23, 2011 9:35 am

I'm not aware of horror stories about reloading, other than some nasty accidents with auto primer feeds (100 primers going off in the shop is no joke), but some military rifles have a bad reputation. The M1 isn't one of them. A few 03-A3 had heat treating issues on the receiver, and the army went all out to get those out of all systems (See Hatcher's Notebook). A few foreign ones had metallurgy issues too, especially those made by armies at the end of a war they were losing. Also, there are some single lug designs out there -- they just didn't "get it" re making the important parts strong.

Those are easy to avoid, of course; most of the reloading books mention which are which. A funny is that "Mitchell's Mausers" which in general are supposed to be "authentic collectors items" are recently made with the very best steel and tooling, usually in Czechoslovakia. Then they fake the armory stamps (sometimes they forget to do that).

So if you wanted a collector item you're getting ripped off. On the other hand, if you wanted a great Mauser action, you can't beat them at the price (or even close) - One I got was atomically accurate where it matters, amazing. I just re-barrel them in some more useful caliber, as those come in 8mm (kind of a 30-06 with a little extra everything) -- and 8mm isn't real fun to shoot in a light military rifle (ouch, my shoulder). So I'll make them into .308 on the big side, or 6.5mm (my favorite). Anything that uses the same case head works out well and is easy. Of course, I replace the horrible military trigger with an inexpensive "Bold" trigger from Midway, and the stock with something nicer I either buy or make. This way, I get a custom rifle for the same net price as a piece of junk off the rack at walmart. Since a rifle's accuracy is all about the machine work, well, they tend to be very good shooters. No point saving 20 bucks on an econo-barrel, might as well get a good one to chew on. The "racket" I do is take these to the gun club, win a match or come real close, then mention it's for sale.
I often get $2-3k for one I've got $500 in. Real "hummers" aren't that common no matter what you pay and the live demo is very convincing/comforting to a buyer.

In any case, the lead bullet thing uses such reduced pressure and velocity that even a pretty lousy gun is safe with appropriate loads. Usually the most you can do without shredding the bullets is around half the original design pressure, and some semi-automatics won't even cycle with the reduced loadings. The other big issue is case capacity and how the powder lays in a case when there's a lot of air space. This is one reason to avoid super slow burning (magnum) rifle powders, as they got that slow via a coating on the grains that makes them difficult to ignite. No problem with a case full, as the primer flash "can't miss" and once some is going, the rest will go. Very different in a near-empty case. Much slower than the IMR 4064 or 4895 I don't go with this technique. No one has really come up with a good "space filler" technique to force a light load back against the primer hole so far.

Lead bullets just can't take what jacketed ones can, and need this special treatment of a certain peak pressure (what that program shows). Higher average pressure is fine (which is why the pistol powder philosophy fails -- bad ratio of peak to average pressure). So we use as slow a powder as seems reasonably safe -- and consistent. Very low loads are not consistent so we are always pushing how slow a powder we can use (because you can use more for the same peak pressure, and get a better case fill that way).

Things like Varget are more or less ideal it seems. It's at a sweet spot in gunpowder chemistry, where no suppressing coatings are required, and speed is controlled by how fully the cellulous is nitrated. Much slower and you get the coatings that make them hard to light consistently in low load densities, and much faster and you have too much peak to average pressure ratio.
And, as a result, Varget burns extremely cleanly, always a plus if you're the guy who has to clean things.

In this case, I'm treading on low traffic turf, as I'm making lead bullet loads for modern semi-automatics (the Carbon-15, AR-15 etc). That makes it a little harder. You have to have enough pressure to cycle the thing, while not deforming the bullets so badly they don't fly straight. People don't usually cast (and it's hard to find molds) for .22 -- that alone is a little harder due to getting the lead alloy to fill the mold decently. .308 are easy to make work with lead bullets.

It's fairly easy to make lead alloys so hard they aren't good anymore -- too brittle, and they break if you drop one on the floor. Those also won't "upset" or "swage" to fit the barrel as perfectly.
So the whole thing is a question of balance between several areas. One of those areas I am working with is different alloys, trying to get hard and tough together -- no small feat, but recent work with added Li seems to be getting me there, as a step up from linotype. Rotometals sells all the "parts" to make any alloy you'd want.

I've also tried barrel plating lead bullets - kind of a jacket applied in-place. It's promising, but a lot of work. I'm not so sure if trading copper fouling for lead is a good bargain, the lead comes out real easily at cleaning time. I don't seem to get any huge advantage in pressure capability that way.

Currently, the old 6.5mm Swede seems the most promising, lead or otherwise. They use a fast twist (1:6.5) barrel and can stabilize some really long bullets of either kind. These have insanely good ballistic coefficients, and therefore are good for really long ranges with less wind deflection than anything else under .375 caliber -- so you get the nice long range with less ouch on the shooter end. I'm building one for competition in egg shoots (chicken eggs at .5 or 1 kilometer) and one for hunting (much lighter weight). I haven't decided whether to use the old Swiss cartridge or the newer Remington 260 (which is just a necked down .308). One trouble with the older cartridges (swede or 30-06) is too much case capacity -- you can't get powder that lousy anymore! And you're always better off with a near-full case ballistically, you get a better and more uniform pressure curve. This is one thing that drives new cartridge designs.

The idea behind this code is it removes some of the less useful search space for you, so you are not testing with too many variables. Lee transformed the art of lead bullet loading to a practical science, my kind of guy.

I niced it up a little overnight, here's the latest. Just better plot labeling and junk like that. The real issue is finding those "factor" exponents to put in there. It load books give two loads and two pressures, you can back-figure them, usually; Lee's book gives many of them outright and makes that easier.

leadloadplotv2.zip
Cleaned up version
(1.52 KiB) Downloaded 257 times


This is an example of the linux "toolbox" philosophy. I don't need to write a plotter - it's done and done well in GnuPlot. I just used a little perl "glue" here.
(check out the gnuplot demos on their site -- stunning 3d stuff, and fast). To make gnuplot "stick" to perl, I used a perl module, GnuplotIF, which made the plotting part an afterthought. I believe there are windows versions of all this, which finally makes writing cross platform code reasonable to do.

llp.gif
screenshot
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA

Re: Perl app for lead bullet shooters

Postby Doug Coulter » Wed Mar 23, 2011 12:31 pm

Just to add, in the fairly likely case you don't care about loading with your own cast bullets -- likely, what this really does is show an easy way to get into pretty-plotting data in a pretty cross-platform way. I've a long way to go to exploit all the "free and easy" you can get with this toolset, this is just a beginner tutorial (as much for my own benefit as anything). A nice simple template on how to get going to plot data that interests you, which we'll be using for the fusor data acquisition database, to show the results of any "data mining" we can think of to do.

Having done this sort of thing in MFC, GTK, Tk, QT, you name it toolset (and gawd, OpenGL), on both windows and linux -- this is by far the easiest way to get a picture on the screen that is useful.
Hopefully the links above to the original GPL code will help others with doing whatever it is they want to do that involves plotting data.

To get really serious, there is also Octave, which can talk to both Gnuplot and to the GW Instek scopes....and does hardcore matrix math (and a lot more) if you want to learn their peculiar language (I don't, but might have to at some point). I'm a C and assembly guy, know a few other languages (perl is C-like enough to be easy to learn based on knowing C), but at some point it's just too much and you have to specialize (or hire specialists).

So what I'm trying to do with things like this and other software postings is to create a kind of on-ramp for those who don't know where to begin, and save them some work playing with things that, if that's all you do, can get the job done, but with a lot (too much) of work. I'd rather point people at the "easy way" where I see one, so we can all get on with results, rather than futzing trying to make a round peg fit in a square hole.

After all, it's getting the data to plot that's where the science is. Just plotting you can do with paper and pencil, but it just takes too long. As I wrote in my book, speed has a quality all its own (yeah, I'm paraphrasing someone I don't admire :evil: ) -- when you can try things fast, you can try more things, or use tools that weren't usable before because they were too slow for some uses.
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA

Re: Perl app for lead bullet shooters

Postby Jerry » Wed Mar 23, 2011 5:28 pm

In general with military rifles they are made to somewhat looser tolerances than consumer rifles. This helps them cope with dirt, crud, inconsistent ammo, etc. One thing is the chambers are slightly larger than spec. This means that the cases shot in them expand more and metal fatigue sets in much sooner and rupturing cases becomes an issue. That and for the M1 it is pretty particular to the bullet weight. It likes its 147 grain ball. Heavier bullets result in higher pressures which can bend the rod.
Jerry
 
Posts: 573
Joined: Sun Jul 18, 2010 12:07 am
Location: Beaverton, OR

Re: Perl app for lead bullet shooters

Postby Doug Coulter » Wed Mar 23, 2011 7:47 pm

Yep, all correct -- military chambers tend to be about a mil bigger (both diameter and length), which actually doesn't affect how much the brass is worked all that much -- since most chambers are already a few mils over what a full length resize die puts the brass back to. With the exception of some special benchrest guns, the neck has a lot of room to expand and let go of the bullet as well. Me, I don't usually full length resize anyway, but just neck size, unless the gun is a picky eater (which is usually fixed some other way, like fixing the clip lip geometry or polishing this or that). Because even in a tight bolt action -- working the brass is the main reason it winds up having to go to the recyclers -- I'm too lazy to re-anneal it, and by the time it needs that, it's getting thin near the case head where it gets the most stretching anyway, where the brass stretches to grab the chamber walls during firing. It's thick right at the case head for safety, but from there up it thins to accomplish that -- saves a lot of stress on the bolt and lugs. Brass really is magic stuff in rifles, and the advent of it is why the guns got so much better, really.

No reason not to make custom loads for them, it really helps them shoot accurately, and you avoid the corrosive mil surplus junk that wrecks them if not cleaned out real scrupulously.

You see this real clearly in .223 civvie vs nato 5.56 -- same thing in a smaller size, but different enough that they make separate chamber reamers for the two. And if anything, a little touchier about gas pressure at the op port. For the newer ones, they even sell a valve to control that if you're too lazy or stupid to adjust the load parameters...

Yes, if you put a heavier bullet in there over the same everything else, pressure at the op-rod is increased (often, but not always). It's an issue in any gas operated semi-auto, actually. That doesn't mean you can't find a heavy-bullet load if you do a little extra work to choose a powder and charge that produces about the same pressure at that point along the barrel. But for fun shooting, little need for that anyway, unless you're going super long-range, in which case for that gun you're into Sierra's 169 grain or 172 grain VLD bullets. You just use a little different powder, and the pressure is back down to "normal" at the gas exit point. I've loaded from 90 gr varmint bullets up to the big boys no problems -- just need to tune everything together.
Witness that the M-14 remains really popular at the high power competitions at Camp Perry where the best go to prove something -- same issue there too, and zero of that ammo is commercial or military, it's all hand loads.

For example, a heavier bullet takes longer to get there -- so the pressure might actually have gone down by then (powder all burned and heat absorbed in the barrel) -- it depends on so many factors you just have to test, practically speaking. Those things are so rugged you're not going to break one unless you try something truly insane, or it was almost already broken. Most of the reloading manuals do have hints for military guns, as they are so common and popular. It's just a price you pay for the convenience of having a semi auto.

I use everything from 35 gr to 77 gr bullets in my gas operated AR's, no problems -- but the powder is different type and so is the amount, for each load. Works from great to fantastic. My AR shoots into 1/4 moa with the best loads. An M1 in decent condition should be tunable to 1/2 moa or better (even at longer ranges), they were pretty decent guns (if the barrel isn't too worn out).
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA


Return to PC

Who is online

Users browsing this forum: No registered users and 2 guests

cron