A little Gun, Shell & Range calculation Tool

Started by Nobody, February 27, 2010, 02:25:50 PM

Previous topic - Next topic

miketr

Some feed back.

1) Running windows XP with a 1.6 gig  AMD dual core and 1 gig of ram.  No problems with the program.

2) Perhaps a drop down menu for Caliber L35 to L60 in steps of L5?  I am not sure which we should use Bore Length of Rifle Length. 

3) Whenever you get around to penetration table I would have it use just the Krupp Cement type to start with.

Nobody

Quote from: miketr on March 23, 2010, 08:28:50 AM
Some feed back.

1) Running windows XP with a 1.6 gig  AMD dual core and 1 gig of ram.  No problems with the program.
Finally :D Thanks
Not much different from my machine, at least it doesn't seem to need any special libraries (in contrast to SpringSharp which requires .net). I suppose you have neither Lazarus nor FreePascal installed?
Someone with with Win9x, Vista or 7? Anyone with a slower computer (e.g. an Atom?). The range iteration should slow down calculation by a factor of 5 to 10 (much better than I feared btw).

Quote
2) Perhaps a drop down menu for Caliber L35 to L60 in steps of L5?  I am not sure which we should use Bore Length of Rifle Length. 
That would make sense if used as a gun design tool that's supposed to enforce some kind of rules, but when I wrote it I just wanted to have maximum flexibility. Maybe a "default to Lx"?
I'm not sure about bore or rifling length either, as the first is probably too long and the second too short. You might realize that I'm using some kind of intermediate right now. There is also the difference between the two major gun types (German style "quick fire" sliding breech block with brass casing and US/UK "Welin breech block").

Quote
3) Whenever you get around to penetration table I would have it use just the Krupp Cement type to start with.
About that. I finally contacted Steve and got an answer right away. He actually rewrote the complete code to use it. Considering that "FaceHard" alone has ~220 kB of source code this is not happening anytime soon. If I do this it would have to be a much, much simpler formula, at least for the beginning (who wants to choose one?). I might however be doing deck penetration "the right way" by rewriting either M79APCLC, FLATNOSE or TPRFLTNS - any preference?

P3D

IMO no need to implement a gun rule now, you might want to that later - e.g. with my muzzle energy formula that fits all modern (1898-1945) guns pretty well or its metric equivalent (which I am now too lazy to calculate, maybe later).

To choose penetration formula.
Use the last one (F- formula) as it has obliquity in it for starters.
Later, you could borrow from the FACEHARD code for a given shell family (e.g. Greenboy) and just ignore the rest.

The first purpose of a warship is to remain afloat. Anon.
Below 40 degrees, there is no law. Below 50 degrees, there is no God. sailor's maxim on weather in the Southern seas

Nobody

#18
Quote from: P3D on March 23, 2010, 07:39:27 PM
IMO no need to implement a gun rule now, you might want to that later
I'm of the same opinion.

Quotewith my muzzle energy formula that fits all modern (1898-1945) guns pretty well or its metric equivalent (which I am now too lazy to calculate, maybe later).
Well I prefer my own way of calculation, so I see no real need to implement a second one. And you can already compare the result with the table in the rules since the necessary value is displayed in a compatible form.

Quote
To choose penetration formula.
Use the last one (F- formula) as it has obliquity in it for starters.
Later, you could borrow from the FACEHARD code for a given shell family (e.g. Greenboy) and just ignore the rest.

Done. The F-formula that is. Now you all only have to wait for Guinnes to update the file ;D.
I used it for both deck and belt penetration (it's not meant for face-hard armor anyway) with the same constant for now.
For future use I'm thinking about adding separate constants for shell and armor, as well modifications to the formula that would allow represent some more sophisticated material properties (e.g. how much obliquity influences penetration or not).

EDIT:
The file has been updated and is now available for download. Link is the same as above: http://www.navalism.org/resources/Ballistic.zip

TexanCowboy

Works pretty well. I'm having some trouble with a few things, but I'm pretty sure it is user error, with the F-code and such. One thing I could ask is if it was possible to insert a inch-millimeter converter? A inch is 25.4 millimeters, and it would probebly be most useful if it was in half-step inchs or below...could you set that up the same way you did with range? Thanks.

Nobody

Quote from: TexanCowboy on March 25, 2010, 04:19:16 PM
Works pretty well. I'm having some trouble with a few things, but I'm pretty sure it is user error, with the F-code and such.
If you could tell me what kind of error/problem you have then I might be able to help you and maybe prevent the error from happening in future versions.
About the F: It's just a generic number I choose because it gives result that are not completely unreasonable. Suggestions for better values depending on shell are armour type are welcome. (the value represents something like a steel quality factor, smaller value giver higher results and a higher value lower penetration)

QuoteOne thing I could ask is if it was possible to insert a inch-millimeter converter? A inch is 25.4 millimeters, and it would probebly be most useful if it was in half-step inchs or below...could you set that up the same way you did with range? Thanks.
While I think that these useless, confusing and annoying imperial should have been abolished long ago ;D, it's not like I don't know what an inch is ;)(there are after all quite a number of inches already) and I will probably add penetration results in inch as well in the near future.

Quoteinch-millimeter converter
You mean like a pocket-calculator on a separate page or window?

Penetration steps... yea, it's not like I wouldn't understand why you want them (ever played "Seas of War"?) but it not as easy as you think, because those codes are pretty much independent right now and the "range-step" code isn't even working properly.
Besides, wouldn't it be much simpler and faster to use very small (elevation) steps and than pick the right value from the table?

TexanCowboy

F-code. My main error is probebly my own. I don't know wheather the .500 represents armour or shell size, and I don't know, perchance, what .500 is in terms of armour or shell by quality in error. Is that Civil War, World War I, World War II?

For Inches, if you could set it up as you did with meters and yards, I would be most appricative.

Great Job you are doing! :)

Nobody

I think I understand your problem now - I should write a manual :D

It's supposed to work this way:
1. Set the desired gun properties (Caliber, length, shell weight (check the reasonable range by clicking on the "?"-button) and the muzzle velocity (or calculate it by choosing bore and rifling length and average gas pressure(usually between 1200 and 1500 bar)).
2. Choose max and min elevation and set the average air drag coefficient.
3. "Testfire" your new gun. You should see the results in the table.
4. Choose "F", a constant that's supposed to represent both shell and armor quality and hit the button. It should now calculate the penetration for each of the previous calculated ranges (you can easily combine the two tables in excel). With F=0.5 I get ~1.5 calibers penetration at close range - not too much or too less, but far from accurate.

TexanCowboy

I know. But how does the F work. What is standard for the time period? .5, .6, .7?

Nobody

After a long time I have an update for you.
The file was already updated, the link remains the same http://www.navalism.org/resources/Ballistic.zip (thank Guinness).

So what did change?
  • Armor penetration variable "F" separated for belt and Deck
  • got rid of that annoying rounding error (hopefully)
  • output of penetration calculations in INCH (yes indeed, although I would prefer removing all of those inconvenient imperial units from the program altogether^^)
  • cosmetic (too small text boxes)


    Now all we need to do is to fill out the following table*:


    1880 Solid shot   1890 High Explosive   1895 Semi Armour-Piercing   1905 Armour-Piercing   1908 Capped shells
    1880 Cast Iron (belt)   ?   ?   ?   ?   ?
       " (deck)   ?   ?   ?   ?   ?
    1890 Compound (belt)   ?   ?   ?   ?   ?
       " (deck)   ?   ?   ?   ?   ?
    1900 Krupp Cemented (belt)   ?   ?   ?   ?   ?
       " (deck)   ?   ?   ?   ?   ?
    1915 All Imp. KC types (belt)   ?   ?   ?   ?   ?
       " (deck)   ?   ?   ?   ?   ?


    Feedback is appreciated.

    *)powered by BBCode-Table-Creator

Sachmle

Bravo Nobody!! I love it so far. Keep up the good work. As to your 'value' table, I think P3D had some baseline's for that.
"All treaties between great states cease to be binding when they come in conflict with the struggle for existence."
Otto von Bismarck

"Give me a woman who loves beer and I will conquer the world."
Kaiser Wilhelm

"If stupidity were painfull I would be deaf from all the screaming." Sam A. Grim

Carthaginian

It looks like soon we might have an 'official' gun creation tool for N-verse.
Awesome work, Nobody... THANK YOU!
So 'ere's to you, Fuzzy-Wuzzy, at your 'ome in old Baghdad;
You're a pore benighted 'eathen but a first-class fightin' man;
We gives you your certificate, an' if you want it signed
We'll come an' 'ave a romp with you whenever you're inclined.

snip

Ive been playing with it sporadically...and I like it  ;D

I am however a bit confused on a few of the constants that the program asks for...TO THE LIBRARY/GOOGLE! (or if anyone here would like to help out...)
You smug-faced crowds with kindling eye
Who cheer when solider lads march by
Sneak home and pray that you'll never know
The hell where youth and laughter go.
-Siegfried Sassoon

Nobody

Quote from: snip on August 31, 2010, 05:53:12 PM
Ive been playing with it sporadically...and I like it  ;D

I am however a bit confused on a few of the constants that the program asks for...TO THE LIBRARY/GOOGLE! (or if anyone here would like to help out...)
If you could be more specifically...?
But you are right in a sense. Right now it's not supposed to work "stand alone". It's more like "search for a similar gun, input ALL necessary data, fix the pressure and find a good approximation for the cw-value, then sim your own gun". And if you can tell us what you found (pressure, cw and whether or not the shell weight was covered by the program).


P.S.:
Just found a major error in the calculation for very flat impact (were penetration is effectively zero).

Nobody

Okay another major update, and probably the last one for some time. Guinness already replaced the file (http://www.navalism.org/resources/Ballistic.zip).

It is now possible to use speed depended air drag. However the interpolation between datapoints is far from perfect, since the quadratic approximation(any better ideas how to do this?) I wrote creates ripple. Even worse, sometimes it seems to be buggy and creates a non-continuous graph (see function "x", which I added for debugging purposes) which should be impossible and I can't find the error because the debugger refuses to work inside that particular unit.
For further details look in the version history (e.g. by pressing F1).


Quote from: Carthaginian on August 31, 2010, 05:35:44 PM
It looks like soon we might have an 'official' gun creation tool for N-verse.
Awesome work, Nobody... THANK YOU!
But only if you don't want to use it for penetration calculations directly. After adjusting the parameters (for the trajectory this is precise by a few percent!) and penetration for a certain distance(e.g. 1000 m) I found that for other distances the penetration was off by a factor of 2 to 3! (in this case belt penetration was only ~3" @30000 m but should have been 8"!) So problem lies within the "F-formula" and I can only advise to forward the ballistic data to a program like FaceHard.