There are different ways of producing neutrons, but the one we will focus on here is spallation. Spallation occurs when a high power proton beam hits a heavy element target which releases neutrons.
The protons are produced in an ion source and accelerated by a linear accelerator which is a complicated machine. The protons are accelerated by radio frequency cavities that use electromagnetic fields to push the proton forwards towards the target.
Spallation is an umbrella term for the processes that happen when a proton with energies greater than 1 giga-electronvolt (GeV) hits the nucleus of atoms in the target. In reality, the protons do not hit the entire nucleus of the tungsten atom since at ESS the protons have an energy of 2 GeV, giving them a wavelength of 6x10-16 m. The size of a tungsten nucleus is larger, about 10-14 m, so the protons actually only hit some of the subatomic particles in the tungsten nucleus (protons and neutrons). When the protons hit particles in the nucleus, some of these particles are expelled from the nucleus. This leaves the tungsten atom excited and it will decay and release even more subatomic particles in the processes. The released protons and neutrons have energies in the range 20 mega-electronvolts (MeV) up to 2 GeV, however most of them will have an energy in the lower end of the range. giga-electronvolts, giving them a wavelength of 10 to 16 times 6 m. The size of a tungsten nucleus is larger, about 10-14 m, so the protons actually only hit some of the subatomic particles in the tungsten nucleus (protons and neutrons). When the protons hit particles in the nucleus, some of these particles are expelled from the nucleus. This leaves the tungsten atom excited and it will decay and release even more subatomic particles in the processes. The released protons and neutrons have energies in the range 20 mega-electronvolts (MeV) up to 2 giga-electronvolts, however most of them will have an energy in the lower end of the range. These expelled subatomic particle will hit even more tungsten atoms creating even more unstable atoms that then again expel particles. In the end, each proton from the beam that hits the target releases 36 neutrons on average from the tungsten, and this high number of neutrons are part of the reason that tungsten was chosen as the target material. This is a very effective process which at the ESS releases 1015 neutron per second which is 30 times more than any existing neutron source. A lot of those neutrons will however be removed in the tuning processes of the beam.