# Gun barrel

A gun barrel is a crucial part of gun-type weapons such as small firearms, artillery pieces, and air guns. It is the straight shooting tube, usually made of rigid high-strength metal, through which a contained rapid expansion of high-pressure gas(es) is used to propel a projectile out of the front end (muzzle) at a high velocity. The hollow interior of the barrel is called the bore, and the diameter of the bore is called its calibre, usually measured in inches or millimetres.
The first firearms were made at a time when metallurgy was not advanced enough to cast tubes capable of withstanding the explosive forces of early cannons, so the pipe (often built from staves of metal) needed to be braced periodically along its length for structural reinforcement, producing an appearance somewhat reminiscent of storage barrels being stacked together, hence the English name.

## History

Gun barrels are usually made of some type of metal or metal alloy. However, during the late Tang dynasty, Chinese inventors discovered gunpowder, and used bamboo, which has a strong, naturally tubular stalk and is cheaper to obtain and process, as the first barrels in gunpowder projectile weapons such as fire lances. The Chinese were also the first to master cast-iron cannon barrels, and used the technology to make the earliest infantry firearms — the hand cannons. Early European guns were made of wrought iron, usually with several strengthening bands of the metal wrapped around circular wrought iron rings and then welded into a hollow cylinder. Bronze and brass were favoured by gunsmiths, largely because of their ease of casting and their resistance to the corrosive effects of the combustion of gunpowder or salt water when used on naval vessels.
Early firearms were muzzleloaders, with the gunpowder and then the shot loaded from the front end (muzzle) of the barrel, and were capable of only a low rate of fire due to the cumbersome loading process. The later-invented breech-loading designs provided a higher rate of fire, but early breechloaders lacked an effective way of sealing the escaping gases that leaked from the back end (breech) of the barrel, reducing the available muzzle velocity. During the 19th century, effective breechblocks were invented that sealed a breechloader against the escape of propellant gases.
Early cannon barrels were very thick for their caliber. This was because manufacturing defects such as air bubbles trapped in the metal were common at that time, and played key factors in many gun explosions; these defects made the barrel too weak to withstand the pressures of firing, causing it to fail and fragment explosively.

## Construction

A gun barrel must be able to hold in the expanding gas produced by the propellants to ensure that optimum muzzle velocity is attained by the projectile as it is being pushed out. If the barrel material cannot cope with the pressure within the bore, the barrel itself might suffer catastrophic failure and explode, which will not only destroy the gun but also present a life-threatening danger to people nearby. Modern small arms barrels are made of carbon steel or stainless steel materials known and tested to withstand the pressures involved. Artillery pieces are made by various techniques providing reliably sufficient strength.

### Fluting

Fluting is the removal of material from a cylindrical surface, usually creating rounded grooves, for the purpose of reducing weight. This is most often done to the exterior surface of a rifle barrel, though it may also be applied to the cylinder of a revolver or the bolt of a bolt-action rifle. Most flutings on rifle barrels and revolver cylinders are straight, though helical flutings can be seen on rifle bolts and occasionally also rifle barrels.
While the main purpose of fluting is just to reduce weight and improve portability, when adequately done it can retain the structural strength and rigidity and increase the overall specific strength. Fluting will also increase the surface-to-volume ratio and make the barrel more efficient to cool after firing, though the reduced material mass also means the barrel will heat up easily during firing.

### Composite barrels

A composite barrel is a firearm barrel that has been shaved down to be thinner and an exterior sleeve slipped over and fused to it that improves rigidity, weight and cooling. Most common form of composite barrel are those with carbon fiber sleeves, but there are proprietary examples such as the Teludyne Tech Straitjacket. They are seldom used outside sports and competition shooting.

## Mounting

A barrel can be fixed to the receiver using action threads or rivets. Depending on construction different gun barrels can be used:
* common fixed barrel for firearms
* interchangeable barrel for firearms
* quick-change barrel for machineguns
* replacement gun barrel (spare barrel) for artilleryguns

## Components
### Chamber

The chamber is the cavity at the back end of a breech-loading gun's barrel where the cartridge is inserted in position ready to be fired. In most firearms (rifles, shotguns, machine guns and pistols), the chamber is an integral part of the barrel, often made by simply reaming the rear bore of a barrel blank, with a single chamber within a single barrel. In revolvers, the chamber is a component of the gun's cylinder and completely separate from the barrel, with a single cylinder having multiple chambers that are rotated in turns into alignment with the barrel in anticipation of being fired.
Structurally, the chamber consists of the body, shoulder and neck, the contour of which closely correspond to the casing shape of the cartridge it is designed to hold. The rear opening of the chamber is the breech of the whole barrel, which is sealed tight from behind by the bolt, making the front direction the path of least resistance during firing. When the cartridge's primer is struck by the firing pin, the propellant is ignited and deflagrates, generating high-pressure gas expansion within the cartridge case. However, the chamber (closed from behind by the bolt) restrains the cartridge case (or shell for shotguns) from moving, allowing the bullet (or shot/slug in shotguns) to separate cleanly from the casing and be propelled forward along the barrel to exit out of the front (muzzle) end as a flying projectile.
Chambering a gun is the process of loading a cartridge into the gun's chamber, either manually as in single loading, or via operating the weapon's own action as in pump action, lever action, bolt action or self-loading actions. In the case of an air gun, a pellet (or slug) itself has no casing to be retained and will be entirely inserted into the chamber (often called "seating" or "loading" the pellet, rather than "chambering" it) before a mechanically pressurized gas is released behind the pellet and propels it forward, meaning that an air gun's chamber is functionally equivalent to the freebore portion of a firearm barrel.
In the context of firearms design, manufacturing and modification, the word "chambering" has a different meaning, and refers to fitting a weapon's chamber specifically to fire a particular caliber or model of cartridge.

### Bore

The bore is the hollow internal lumen of the barrel, and takes up a vast majority portion of the barrel length. It is the part of the barrel where the projectile (bullet, shot, or slug) is located prior to firing and where it gains speed and kinetic energy during the firing process. The projectile's status of motion while travelling down the bore is referred to as its internal ballistics.
Most modern firearms (except muskets, shotguns, most tank guns, and some artillery pieces) and air guns (except some BB guns) have helical grooves called riflings machined into the bore wall. When shooting, a rifled bore imparts spin to the projectile about its longitudinal axis, which gyroscopically stabilizes the projectile's flight attitude and trajectory after its exit from the barrel (i.e. the external ballistics). Any gun without riflings in the bore is called a smoothbore gun.
When a firearm cartridge is chambered, its casing occupies the chamber but its bullet actually protrudes beyond the chamber into the posterior end of the bore. Even in a rifled bore, this short rear section is without rifling, and allows the bullet an initial "run-up" to build up momentum before encountering riflings during shooting. The most posterior part of this unrifled section is called a freebore, and is usually cylindrical. The portion of the unrifled bore immediately front of the freebore, called the leade, starts to taper slightly and guides the bullet towards the area where the riflingless bore transitions into fully rifled bore. Together they form the throat region, where the riflings impactfully "bite" into the moving bullet during shooting. The throat is subjected to the greatest thermomechanical stress and therefore suffers wear the fastest. Throat erosion is often the main determining factor of a gun's barrel life.

### Muzzle

The muzzle is the front end of a barrel from which the projectile will exit. Precise machining of the muzzle is crucial to accuracy, because it is the last point of contact between the barrel and the projectile. If inconsistent gaps exist between the muzzle and the projectile, escaping propellant gases may spread unevenly and deflect the projectile from its intended path (see transitional ballistics). The muzzle can also be threaded on the outside to allow the attachment of different accessory devices.
In rifled barrels, the contour of a muzzle is designed to keep the rifling safe from damage by intruding foreign objects, so the front ends of the rifling grooves are commonly protected behind a recessed crown, which also serves to modulate the even expansion of the propellant gases. The crown itself is often recessed from the outside rim of the muzzle to avoid accidental damage from collision with the surrounding environment.
In smooth bore barrels firing multiple sub-projectiles (such as shotgun shot), the bore at the muzzle end might have a tapered constriction called choke to shape the scatter pattern for better range and accuracy. Chokes are implemented as either interchangeable screw-in chokes for particular applications, or as fixed permanent chokes integral to the barrel.
During firing, a bright flash of light known as a muzzle flash is often seen at the muzzle. This flash is produced by both superheated propellant gases radiating energy during expansion (primary flash), and the incompletely combusted propellant residues reacting vigorously with the fresh supply of ambient air upon escaping the barrel (secondary flash). The size of the flash depends on factors such as barrel length (shorter barrels have less time for complete combustion, hence more unburnt powder), the type (fast- vs. slow-burning) and amount of propellant (higher total amount means likely more unburnt residues) loaded in the cartridge. Flash suppressors or muzzle shrouds can be attached to the muzzle of the weapon to either diminish or conceal the flash.
The rapid expansion of propellant gases at the muzzle during firing also produce a powerful shockwave known as a muzzle blast. The audible component of this blast, also known as a muzzle report, is the loud "bang" sound of gunfire that can easily exceed 140 decibels and cause permanent hearing loss to the shooter and bystanders. The non-audible component of the blast is an infrasonic overpressure wave that can cause damage to nearby fragile objects. Accessory devices such as muzzle brakes and muzzle boosters can be used to redirect muzzle blast in order to counter the recoil-induced muzzle rise or to assist the gas operation of the gun, and suppressors (and even muzzle shrouds) can be used to reduce the blast noise intensity felt by nearby personnel.