Had a few questions about cylinders and why I won't make them for anybody..
Max working pressure for Schedule 80 316 seamless stainless steel tube is 6,110 PSI. Way more than we need but hey, I don't like the idea of having a bomb next to my face.
Some of that is going to be lost in machining but we will still need a good chunk of metal around all that air. So machined as below.
The seal (O-Ring)
MUST be at the furthest forward point where the wall thickness remains at 2.72mm. I've seen gun cylinders made where the O-ring has been at the farthest left side (30.5mm) where the wall thickness affected by pressure is 1.00 mm.
EVERYTHING to the Right of the O-Ring is inside a closed loop of pressure so if you fill to 3000 psi all that is holding it is 1.00 mm of metal. In stainless that may well hold, it may not. In Aluminium it's almost certainly going to fail at some point and that's going to be a fast leak or a straight up bang.
ALWAYS calculate the pressure at the thinnest point that holds pressure. One that is often forgotten on manual machines is the thread undercut, on an M30 Thread that undercut is going to be circa 30.5mm diameter, so again, we are back to 1mm of metal keeping our faces intact. (Fortunately for me I have CNC equipment so threads have no undercut)
Another item that needs attention is a burst disc, the little hex plug that has a copper disc in it to prevent a system being over pressurised. If my working pressure is 3,000 psi then my burst disk is going to be 3,250 psi or 3,500 psi, Yes we have gauges etc but I prefer to be safe rather than trusting a simple gauge alone.
Another thing to keep in mind, sharp corners, pressure loves sharp corners, try to ensure that any internal corners such as O-Ring grooves are radiused rather than hard 90 degree angles. If you leave sharp corners you create shear points that cracks and splits will propagate from especially on things that are subjected to big pressure changes (creep), it may be fine to begin with but six months down the road? yep, we will be picking up bone splinters again.
The above shows a very simple 0.5mm corner radius inside the plug groove.
On the cylinder end, when you machine the top relief (30.5mm) the thread (M30) and the sealing surface (27.06mm) make sure you do all three at the same time to ensure concentricity, there is very little clearance between the plug diameter and the sealing surface diameter, if you end up with low concentricity you can have the O-Ring trying to "extrude" itself out through the widest point. That's unlikely to result in explosion but it will lead to leaks.
Use a good O-Ring calculator from the manufacturers and that will give you all the sizes you need to work to.
Surface finishes should all be good (circa 1.6 Ra) to reduce ring damage and ensure a solid seating and best possible seal.
Testing:
For steel cylinders we have Ultrasonic and Hydrostatic testing, both have their place by hydrostatic is destructive, you can damage the cylinder in the test so that's more for batch testing with samples. Ultrasonic is better but difficult for the average builder unless you have a nice boss who is tolerant of your requests

.
If I'm building a new cylinder for my own guns I'll use stainless tube and make 2 more than I need, that way I can abuse those two and try to get them to fail while being fairly certain that the used one's will conform to the same level of safety. If you are working on somebody elses gun, that's a bit different. They aren't going to take kindly to us blowing up their cylinder so we can tell them "Hey yea, it was fine mate until it exploded at 22,000 psi".
Will I work on other peoples cylinders? nope, not a chance.. I have no idea how they have been treated, what they are made of or what quality control the manufacturer had. and what material was used and did that material come with a certificate.
Aluminium cylinders.. no... just no, some gun manufacturer's work close to the yield pressures of cylinders to keep weight and cost down in a material that from the start is less resistant to pressure. We are dealing with pressures that can straight up just kill you let alone blow off limbs or other body parts.
My typical answer to the "Hey, I thought you were a friend yet you won't do this for me?"
It's because I'm a friend that I won't...
Onto more machining before I get too carried away
cheers
Spooky / Dave