For commercial pools it is the preferred method of sanitization. When the gas is injected, it mixes with the water to form a solution that is then pumped into the circulation system for delivery to the pool or spa. By regulating the time of operation and volume of gas delivered, the sanitizing of the water can be managed. The incoming water supply might be fill water for the pool or part of the circulation water diverted for this purpose. Some installations make their own chlorine, considering how expensive it is to sanitize a large pool or spa and how relatively inexpensive salt, electricity, and water are.
Chlorine generators produce chlorine gas by electrolysis.
The generator consists of a plastic tank with two compartments separated by a filter-type membrane. The membrane allows electricity to pass through but restricts the chemicals produced to one side. Chlorine gas is generated in the salt solution compartment when the electricity separates the chlorine from the sodium. Hydrogen gas formed in the process is vented out of the generator. Salt is added periodically to recharge the system.