# Gas blending for scuba diving

Gas blending for scuba diving (or gas mixing) is the filling of diving cylinders with non-air breathing gases such as nitrox, trimix and heliox. Use of these gases is generally intended to improve overall safety of the planned dive, by reducing the risk of decompression sickness and/or nitrogen narcosis, and may improve ease of breathing.
Filling cylinders with a mixture of gases has dangers for both the filler and the diver. During filling there is a risk of fire due to use of oxygen and a risk of explosion due to the use of high-pressure gases. The composition of the mix must be safe for the depth and duration of the planned dive. If the concentration of oxygen is too lean the diver may lose consciousness due to hypoxia and if it is too rich the diver may suffer oxygen toxicity. The concentration of inert gases, such as nitrogen and helium, are planned and checked to avoid nitrogen narcosis and decompression sickness.
Methods used include batch mixing by partial pressure or by mass fraction, and continuous blending processes. Completed blends are analysed for composition for the safety of the user. Gas blenders may be required by legislation to prove competence if filling for other persons.

## Application

For some diving, gas mixtures other than normal atmospheric air (21% oxygen, 78% nitrogen, 1% trace gases) can be used to advantage, so long as the diver is competent in their use. The most commonly used mixture is nitrox, also referred to as Enriched Air Nitrox (EAN), which is air with extra oxygen, often with 32% or 36% oxygen, and thus less nitrogen, reducing the risk of decompression sickness or allowing longer exposure to the same pressure for equal risk. The reduced nitrogen may also allow for no stops or shorter decompression stop times or a shorter surface interval between dives. A common misconception is that nitrox can reduce narcosis, but research has shown that oxygen is also narcotic.
The increased partial pressure of oxygen due to the higher oxygen content of nitrox increases the risk of oxygen toxicity, which becomes unacceptable below the maximum operating depth of the mixture. To displace nitrogen without the increased oxygen concentration, other diluent gases can be used, usually helium, when the resultant three gas mixture is called trimix, and when the nitrogen is fully substituted by helium, heliox.
For dives requiring long decompression stops, divers may carry cylinders containing different gas mixtures for the various phases of the dive, typically designated as Travel, Bottom, and Decompression gases. These different gas mixtures may be used to extend bottom time, reduce inert gas narcotic effects, and reduce decompression times.

## Hazards

There are several hazards associated with gas mixing:
* cylinders are filled with high pressure gas. If there is any damage or corrosion in the pressure vessel or valves of the cylinder, this is the occasion when they are most likely to fail structurally.
* oxygen supports combustion; if it comes into contact with fuel and heat the three ingredients for a fire exist. Fires in the presence of high concentrations of oxygen burn more vigorously than those in air. A fire in the presence of high-pressure gas may cause cylinders to fail.
* other high-pressure equipment such as whips, compressors, gas banks and valves are used, which can cause injury if the pressure is released or there is a mechanical failure while under pressure
* there are dangers of fire from the fuel and electric power supplies of the compressor
* there are dangers of injury from the moving parts of the compressor
* there is the possibility of asphyxiation due to the presence, in a confined space, of large concentrations of gases that contain no oxygen, such as helium
It is possible for gas blenders to create toxic and dangerous gas mixes for divers. Too much or too little oxygen in the mix can be fatal for the diver. Oxygen analysers are used to measure the oxygen content of the mix after blending. Inadequate mixing may cause inaccurate analysis. To ensure that the composition of the gas is known by the end user, the contents are analysed in the presence of the diver who acknowledges the contents by signing a log.
It is possible that toxic contaminants, such as carbon monoxide or hydrocarbon lubricants, will enter the cylinders from the diving air compressor. This is generally a problem with the compressor maintenance or location of the air input to the compressor though it can be from other sources.
Toxic contaminants can also get into the breathing mix if any material inside the blending valves or pipes burns, for instance when adiabatic heating occurs when decanting or boosting oxygen.

## Oxygen precautions

In the presence of large volumes of high-pressure oxygen, one corner of the fire triangle exists in good measure. It is vital the other two corners are not allowed to exist.
Internally, the blending equipment and diving cylinders must be oxygen clean; all fuels and particles which could be sources of ignition must be removed. The materials chosen for use in the valves, joints and compressors must be oxygen compatible: they must not burn or degrade readily in high oxygen environments.
In gas blending, high temperatures are easily produced, by adiabatic heating, simply by decanting high-pressure gas into lower pressure pipes or cylinders. The pressure falls as the gas leaves the opened valve but then increases when the gas encounters obstructions such as a cylinder or a bend, constriction or particle in the pipe-work.
One simple way to reduce the heat of decanting is to open valves slowly. With sensitive valves, such as needle valves, the gas can slowly be allowed through the valve so that the pressure increase is slow on the low-pressure side. The pipe-work, joints and valves in the blending system should be designed to minimize sharp bends and sudden constrictions. Sometimes 360-degree loops are present in the pipe-work to reduce vibration.
Spaces where gas is blended or oxygen is stored should be well ventilated to avoid high concentrations of oxygen and the risk of fire.

## Blending nitrox

With nitrox there are several methods of gas mixing:
* Mixing by partial pressure: a measured pressure of oxygen is decanted into the cylinder and cylinder is "topped up" with air from the diving air compressor. For mixtures with oxygen fraction of 40% or more, the delivered air quality must be suited for oxygen service. This is usually achieved by using a suitable grade of oil and an extra in-line filter (hyperfilter) to reduce the residual oil contamination in the compressed air to the more stringent requirements for blending with high oxygen partial pressure gases. Cylinders used for partial pressure blending and for mixtures with oxygen fraction greater than 40% are required by law in some countries to be cleaned for oxygen service. In South Africa, a cylinder to be used for mixes with a high partial pressure of oxygen must be cleaned before being put into that service.
* Pre-mix decanting: the gas supplier provides large cylinders with popular mixes such as 32% and 36%.
* Mixing by continuous blending: regulateed flow of oxygen is fed into a static mixer with air, analysed, and fed to the compressor inlet. The compressor and particularly the compressor oil, must be suitable for this service. If the oxygen fraction is less than 40%, some countries do not require the cylinder and valve to be cleaned for oxygen service.
* Mixing by mass fraction: oxygen is added to a partially full cylinder that is accurately weighed until the required mix is achieved.
* Mixing by gas separation: a nitrogen permeable membrane is used to remove some of the smaller nitrogen molecules from low-pressure air until the required mix is achieved. The resulting low-pressure nitrox is then pumped into cylinders by a compressor.

## Blending helium mixes

Helium mixes may be made by partial pressure blending, mass fraction blending or compressing a premix blended at atmospheric pressure (continuous blending).

### Partial pressure blending

Gas is mixed by decanting or compressing the component gases into a high-pressure cylinder, measured by partial pressure, added in sequence, and corrected for temperature.
With trimix, measured pressures of oxygen and helium are decanted into a cylinder, which is "topped up" with air from the diving gas compressor, resulting in a three gas mix of oxygen, helium and nitrogen. An alternative is to first decant helium into a cylinder and then top it up to the working pressure with a known nitrox mix. Both NAUI and TDI offer courses using a trimix that they call "helitrox", blended by the latter method, which limit the fraction of helium to about 17–20%. Mixtures made by blending helium with nitrox containing around one-third oxygen such as EAN32 (a common premixed nitrox) have the desirable property that at their maximum operating depth for a partial pressure of oxygen of 1.4 bar, their equivalent narcotic depth is always approximately 32 metres (105 ft), a safe limit.
With heliox, measured pressures of oxygen and helium are decanted or pumped into a cylinder, resulting in a two gas mix of oxygen and helium.
With heliair, a measured pressure of helium is decanted into a cylinder, which is "topped up" with air from the diving gas compressor, resulting in a three gas mix of oxygen, helium and nitrogen, with the nitrogen:oxygen ratio fixed at 4:1.

### Mass fraction blending

Mass fraction blending requires an accurate scale which should preferably be capable of being set to zero with the empty cylinder connected to the filling whip standing on the scale.
The masses of the gases to be mixed must be calculated based on the final partial pressure ratio and total pressure, and the cylinder is filled to the appropriate weight corresponding to the added weight of each component. The advantage of this system is that temperature does not affect the accuracy, as pressure is not measured during the process. The disadvantage is that helium has a much lower density than the other components, and a small error in measured mass of helium will result in a relatively large error in composition.

### Continuous blending and compression
#### Principle

Continuous blending is the process of adding the component gases of the mixture together as a continuous process and then compressing the mixture into a storage cylinder. The intention is to supply the component gases to the intake of the compressor in a continuous flow at a pressure suited to the compressor design, already mixed to the correct specification. This generally requires equipment to monitor and control the flow of the input gases, which are usually supplied from high-pressure storage cylinders, excepting for air which is normally taken from the ambient surroundings.

#### Mixing the gases

Most high-pressure breathing gas compressors are designed to accept intake gas at normal atmospheric pressure. and one of the usual components for breathing gas mixtures for diving is atmospheric air, so it is convenient to blend the gases at atmospheric pressure in an accessory to the compressor called a mixing tube or blending stick. The mixing tube is a type of static mixer, and may be constructed in a variety of ways, providing that it does not unduly restrict flow, and adequately mixes the gases before analysis and before intake into the compressor. A large range of commercially produced and home made blending tubes have been successfully used.
One popular configuration for the mixing tube is a large bore tube with a series of internal baffles which create turbulence in the mixture after the injection point, which causes fairly rapid mixing to a homogeneous mixture, which may then be continuously analysed by a monitoring instrument before further processing, or may be directly processed and analysed later from the storage cylinder. Continuous analysis allows adjustment of flow rate of the added gases to correct the mixture if it deviates from the specification. Post-analysis makes correction more difficult. Addition of components may be done in sequence or together. Adding them together means that mixing is done once, and this reduces the pressure loss in the intake system. It is important that the gases are thoroughly mixed before analysis as the analysis will then be more reliable. It is also highly desirable to ensure that the intake gases do not vary significantly in oxygen content over time for safety reasons, as the compressor will probably only be safe for a limited oxygen fraction.
Continuous blending by adding oxygen and helium in series allows change in oxygen partial pressure to be used as a proxy for helium content measurement. The oxygen is added first, and PO$_2$ measured after mixing, then helium is added in a second mixing tube and PO$_2$ measured at the outlet after mixing. The difference in PO$_2$ can be used to calculate PHe, or conversely, a desired trimix product partial pressures can be used to calculate the PO$_2$ for the nitrox and trimix stages of the blend.
    Example:
       Desired product 50% helium, 16% oxygen, remainder nitrogen (34%). The PO$_2$ after the helium addition must be 0.16 bar if there is negligible pressure loss.
       The ratio of oxygen to nitrogen must be 16:34, which gives 16/(16+34) = 32% oxygen, or a 0.32 bar PO$_2$ for the nitrox.
       These values will be affected by pressure losses in the mixing tubes, so some empirical calibration may be required.
Gas flow rates are usually controlled by an industrial gas regulator on the cylinder, and may be measured by an industrial flow meter. Measurement of flow rate can be a substitute for analysis of the mixed gas, but is generally less accurate in predicting the delivered mixture due to variations in temperature and gas delivery efficiency of the compressor, which may vary as the delivery pressure changes.
The blended gases at the intake to the compressor will be at a pressure slightly below ambient, due to losses in the blending tube. This may make it impracticable to use some types of analysis instruments, which rely on a flow of gas through the instrument driven by the pressure of the measured gas. Oxygen cells are also sensitive to a pressure drop, as they directly measure partial pressure, and this may lead to a mix richer than intended, as the oxygen flow may be set to the partial pressure appropriate for atmospheric pressure, while the measured mixture is at a lower pressure. This can be compensated by using a small sampling pump drawing gas from the blending tube and delivering it to the instruments, or by allowing for the reduced inlet pressure for oxygen analysis with an in-line sensor cell. This would require a vacuum gauge measuring the pressure drop or absolute pressure at the sensor. Partial pressure of oxygen must be correct as a fraction of absolute pressure at the point of measurement.

#### Compression

Many high-pressure compressors used for breathing gases are suitable for compressing breathing gas mixtures containing moderate fractions of oxygen and helium, but the manufacturer should be consulted regarding limits on both gases. Compression of mixtures with a high fraction of oxygen are an increased fire hazard, and the compressor lubricant must be compatible to minimise this risk. Helium poses a very different problem, as it is totally inert, and creates no fire hazard directly, but its temperature rises more than oxygen and nitrogen when compressed, which can cause a compressor designed for air to overheat. This can eventually lead to problems with the compressor lubricant and bearings, and if the oxygen fraction is also high, this will increase the fire hazard. Fortunately most Trimix blends have an oxygen fraction inversely related to the helium fraction, which reduces the probability of this problem.

#### Analysis of the mix

The mixed gas must be analysed before use, as an inaccurate assumption of composition can lead to problems of hypoxia or oxygen toxicity in the case of the oxygen analysis, and decompression sickness if the inert gas components differ from the planned composition. Analysis of oxygen fraction is usually done using an electro-galvanic oxygen sensor, whereas helium fraction is usually done by a heat transfer comparison between the analysed gas and a standard sample.

## Air top-up

An air top-up, or air top, is filling a cylinder containing a gas blend with compressed air, either to the cylinder's working pressure, or to any arbitrary or calculated lower pressure. This is exactly the same thing in principle as the final stage of a partial pressure blend, and the composition of the resulting blend can be calculated beforehand using a similar method, or just analysed after the top-up, depending on whether the exact analysis is important to the dive plan or not.

## Quantities and accuracy

To avoid oxygen toxicity and narcosis, the diver needs to plan the required mix to be blended and to check the proportions of oxygen and inert gases in the blended mix before diving. Generally the tolerance of each final component gas fraction should be within +/-1% of the required fraction. Analysis instruments commonly used by recreational/technical diving gas blenders are typically capable of a resolution of 0.1% for both oxygen and helium.

### Calculating composition

When blending mixes with pressures up to about 230 bar (3,300 psi), the Ideal gas law provides a reasonable approximation and simple equations can be used to calculate the pressures of each component gas needed to create the mix. At this pressure and normal temperatures, air departs from linearity by about 5%, e.g. a 10-litre cylinder filled to 230 bar with air only contains about 95% of the expected 2300 litres of free air. Above this pressure, the composition of the final mix is difficult to predict using simple equations but needs the more complex Van der Waals equation.

#### Ideal gas calculations

Partial pressure blending using ideal gas calculations is fairly straightforward. The required mixture is chosen, either as a best mix which optimises the decompression advantages for acceptable oxygen exposure based on the planned dive profile, or selected from a range of standardised mixes suitable for a range of depths and times, or optimised to suit available gas stocks or other constraints. The mixture is specified in terms of gas fractions of the component gases, and the convention is to specify the type, (nitrox, trimix or heliox) and composition as percentage by volume of oxygen, helium if present, and nitrogen. The remainder of nitrogen is not always specifically stated, and is assumed to be the balance.
    Examples:
   * "Tx 20/40" (or Tx 20/40/40) would be a trimix blend with 20% oxygen, 40% helium and the remaining 40% nitrogen. This would be suitable for depths up to 60 metres (200 ft) if the partial pressure of oxygen is to be limited to 1.4 bar. This is a normoxic blend and is safe to use at the surface.
   * "He/O$_2$ 12/88" would be a heliox blend with 12% oxygen and 88% helium. This gas would be used in commercial diving to depths up to about 100 metres (330 ft), depending on duration, but can not be used shallower than about 7 metres (23 ft) without risk of hypoxia.
   * "Nitrox 32", or EAN 32, would be a nitrox blend with 32% oxygen and 68% nitrogen. This is a popular recreational blend for dives to depths up to 33 metres (108 ft).
The nitrogen in the mixture is almost always provided by topping up the cylinder with air to the filling pressure. All helium, and some of the oxygen is provided by decanting or boosting from bulk cylinders.
The amount of helium that must be decanted is very simple to calculate: Multiply the desired gas fraction of helium (F$_{He}$) by the total filling pressure (P$_{tot}$) to get partial pressure of helium (P$_{He}$). In the case of the Tx 20/40, in a 230 bar cylinder, this would be 230 bar x 40% = 92 bar (or for a 3,000 psi fill, it would require 3,000 x 40% = 1,200 psi of helium).
The amount of oxygen is more difficult to calculate, as it is derived from two sources, the added oxygen and the air top-up. However, all of the nitrogen is provided by the air top-up, so the partial pressure of the nitrogen is calculated in a similar way as for helium, which allows the pressure of the air to be calculated, assuming nitrogen to be 79% of the air. In the Tx 20/40 example, the fraction of nitrogen is 100% - (20% + 40%) = 40%. The required partial pressure of nitrogen is therefore 230 bar x 40% = 92 bar, so the air top-up pressure is 92 bar/79% = 116 bar (for a 3,000 psi fill this would be 3,000 x 40% / 79% = 1,500 psi of air). The remaining pressure of 230 bar - 92 bar - 116 bar = 22 bar is the added oxygen pressure required for the mix (for a 3,000 psi fill this would be 3,000 - 1,200 - 1,500 = 300 psi of oxygen).

### Real gas effects

At pressures above about 200 bar the compression of gases begins to deviate from the ideal gas laws, and consequently partial pressure blending must take into account that the gases added at higher pressure will provide lower volumetric proportion than gases added at lower pressure, and these deviations from linearity will vary according to the gas. Calculations for high pressure partial pressure blends may require use of the Van der Waals equation. This does not affect premixed gases, which will retain their mix ratio at any pressure, so continuous blending is not affected by this problem.
Both nitrogen and oxygen compress relatively linearly and will approximate the ideal gas to much higher pressures than helium, which deviates significantly even below 200 bar. Air and nitrox mixtures can be approximated as ideal without significant error up to about 230 bar at normal temperatures.

### Effects of adiabatic heating

Increases in temperature when filling make it difficult to accurately decant or pump a measured quantity of gas based on pressure measurement. When cylinders are filled with gas quickly, typically in 10 to 60 minutes at a dive filling station, the gas inside gets hot, which increases the pressure of the gas relative to its mass. When the cylinder cools, the gas pressure falls resulting in a reduced volume of breathable gas available to the diver.
There are several solutions to this problem:
* fill the cylinder to the required pressure, let the cylinder cool and measure the gas pressure and then repeat the process until the correct pressure is achieved. The cooling interval needed depends on the ambient temperature. This step must be followed for each component of the mixture.
* fill the cylinders in a water bath. The higher thermal conductivity of water compared to air means that heat in the cylinder is more quickly removed from the cylinder as it fills. For this to produce accurate results, the filling must be slow enough to avoid a significant temperature rise. This is very slow.
* fill the cylinders with 5 to 20% more gas (as pressure readings) than required. If the overfill (in pressure while hot) is well judged, when the cylinder cools the final pressure will be within the tolerance of the required pressure. This is relatively quick, but requires good judgement based on experience, or measurement of the temperature of the gases in the cylinder after each stage of the mixing, and corrections must be made to allow for the influence of the temperature.

### Gas analysis

Before a gas mix leaves the blending station and before the diver breathes from it, the fraction of oxygen in the mix should be checked. Usually electro-galvanic oxygen sensors are used to measure the oxygen fraction. Helium analyzers also exist, although they are expensive at present, which allow the Trimix diver to find out the proportion of helium in the mix.
It is important that the gas mixture in a cylinder is thoroughly mixed before analysing or the results will be inaccurate. When partial pressure or mass blending is done at low flow rates the gases entering the cylinder are not moving fast enough to ensure good mixing, and particularly when blends contain Helium, they may tend to remain in layers due to density differences. This is termed stratification, and if left long enough, diffusion will ensure complete mixing. However, if the gas is to be analysed soon after blending, mechanical agitation is recommended. This may be by lying a single cylinder on a flat surface and rolling it for a short period, but twins are more usually inverted a few times. Stratification is more pronounced with blends containing helium, but can also lead to inaccurate analysis of Nitrox blends. According to Mark Gresham of PSI/PCI, banging on the cylinder with a hammer will cause sonic energy induced mixing which is more effective than rolling. No experimental data was put forward regarding the quantitative effects, but when there is no further change in analysis, mixing is likely to be complete.
Reliable specifications for the amount of agitation required for complete mixing are not available, but if the analysis remains the same before and after agitation the gas is probably fully mixed. Once mixed, gas will not stratify with time.

## Identification of cylinder contents

A label identifying the cylinder contents by gas type and constituent fraction may be required by law, and is useful to the user as a record of what mixture was last analysed in the cylinder. Details of the format of the label and colour coding of the cylinder vary with jurisdiction.

## Gas supplies

In the United Kingdom and South Africa, oxygen and helium are bought from commercial industrial and medical gas suppliers and typically delivered in 50 litre "J" cylinders at a maximum of 200 bar. In addition to the cost of the gas, charges may be made for cylinder rental and delivery.
The "cascade system" is used to decant economically from banks of storage cylinders so that the maximum possible gas is removed from the bank. This involves filling a diving cylinder by decanting from the bank cylinder with the lowest pressure that is higher than the diving cylinder's pressure and then from the next higher pressure bank cylinder in succession until the diving cylinder is full. The system maximises the use of low-pressure bank gas and minimises the use of high-pressure bank gas.
Booster pumps, such as the Haskel pump, can be used to scavenge the remnants of expensive gases in nearly empty cylinders allowing low-pressure gases to be pumped safely into cylinders already containing gas at higher pressure.

## Gas blender training and competence

Training and certification for scuba gas blending is provided by some diver training agencies, and may be required in terms of national legislation or standards. ISO 13293 provides minimum training standards for gas blenders for recreational diving services at two levels. Level 1 gas blender is competent to blend nitrox and handle oxygen, air and nitrox, i.e. nitrox gas blender, and a level 2 gas blender is also competent to mix gases containing helium and argon, i.e, a trimix gas blender.
A gas blender in terms of ISO 13293 level 1 must be competent to blend Nitrox breathing gas,and in terms of level 2, competent to blend any gases covered by the standard, which mainly includes trimix breathing gas. They must be competent to mix, measure the composition, mark the cylinder, and record specific mixtures to the specification of composition and pressure in a compatible high pressure cylinder. Oxygen cleaning and servicing of equipment, advising a diver on the use of the gas and establishing operational parameters for the gas are out of the scope of this specific competence.