What happens when a lithium-ion battery catches fire, and why the gases matter

When a lithium-ion battery burns, it does not straightforward release heat. The fire produces a mixture of toxic gases — carbon monoxide, hydrogen fluoride, phosphoryl fluoride, and others — that spread faster than the flames themselves and pose serious risks to people nearby. Understanding how these gases form and move is critical for designing safer battery storage, setting building codes, and planning emergency response.

Advanced modeling uses computer simulations to predict which gases will be produced, in what quantities, at what temperatures, and how they will disperse through a space. These models combine chemistry (what reactions happen inside the battery), physics (how heat and pressure move), and fluid dynamics (how gases flow through air). The result is a detailed map of the hazard that firefighters, building designers, and battery manufacturers can use to make decisions.

The challenge is that battery fires are chaotic. The exact gases produced depend on the battery chemistry, the state of charge, the surrounding temperature, whether water is present, and how fast the fire spreads. No two fires are identical. Models must account for this variation while remaining practical enough to run on real computers in reasonable time.

Key Takeaways

  • Lithium-ion battery fires produce hydrogen fluoride and other toxic gases that spread independently of visible flames, making gas modeling essential for safety planning.
  • Advanced models simulate the chemical reactions inside the battery, the heat transfer to surrounding materials, and the movement of gases through air or enclosed spaces.
  • Modeling outputs inform building ventilation requirements, emergency response procedures, and decisions about where batteries can be safely stored.
  • Real battery fires vary widely based on chemistry, state of charge, and environmental conditions, so models must be validated against actual fire tests to be reliable.
  • Regulatory agencies and battery manufacturers increasingly use modeling data to set safety standards and design safer battery management systems.

The chemistry inside a burning battery cell

A lithium-ion battery contains a liquid electrolyte — typically a lithium salt dissolved in organic solvents like dimethyl carbonate or ethylene carbonate. When the battery is damaged, overcharged, or exposed to high heat, the electrolyte can ignite. The resulting combustion does not follow a straightforward equation; instead, multiple reactions occur simultaneously at different temperatures.

At temperatures below 200°C, the electrolyte begins to decompose, releasing flammable gases. As temperature rises past 300°C, the cathode material (often lithium cobalt oxide or lithium iron phosphate) begins to break down and release oxygen, which accelerates the burning. The anode, typically made of graphite, also reacts. The separator between anode and cathode melts, allowing the reactants to mix more freely.

The gases produced depend heavily on which cathode chemistry the battery uses. A lithium cobalt oxide battery produces different gases than a lithium iron phosphate battery. Fluorine-containing electrolytes release hydrogen fluoride and phosphoryl fluoride — both highly toxic and corrosive. Carbon monoxide forms from incomplete combustion of the organic solvents. Hydrogen gas can accumulate in enclosed spaces and create explosion hazards.

Advanced models track these reactions by dividing the battery into small zones and calculating the temperature, pressure, and chemical composition in each zone at each time step. The model must account for heat transfer between zones, the rate at which solid materials decompose, and the rate at which gases are produced. This requires solving coupled equations for energy balance, mass balance, and chemical kinetics — a computationally intensive task.

How models predict gas flow and dispersion

Once gases are produced inside the battery, they must escape into the surrounding environment. The path they take depends on the battery's physical design, the enclosure it sits in, and the ventilation available. A battery in an open warehouse disperses gases very differently than a battery in a sealed cabinet or a shipping container.

Computational fluid dynamics (CFD) models simulate the movement of gases through three-dimensional space. The model divides the space into millions of small cells and calculates the velocity, temperature, and composition of gas in each cell at each time step. The model accounts for buoyancy (hot gases rise), turbulence (chaotic mixing), and the presence of obstacles like walls, shelves, or equipment.

The input to a CFD model is the rate at which each gas is produced by the burning battery — data that comes from the chemical reaction model described above. The output is a time-varying map showing where each toxic gas is located, at what concentration, and when it reaches dangerous levels. This map can show, for example, that hydrogen fluoride reaches a lethal concentration at a certain distance from the battery within a certain time window.

Coupling the chemical model to the CFD model creates a complete picture: what burns, what gases form, and where those gases go. But this coupling is expensive computationally. A full simulation of a single battery fire in a single room might require hours or days of computer time. Researchers often simplify by running the chemical model separately, then using its output as input to the CFD model, rather than solving both simultaneously.

Validating models against real fire tests

A model is only as good as its assumptions. Researchers validate models by comparing their predictions to actual battery fires conducted in controlled laboratory settings. These tests are expensive and dangerous, but essential.

A typical validation test places a battery or battery pack in a chamber with known dimensions, ignites it, and measures the temperature, pressure, and gas concentrations at multiple points over time using sensors. The test is recorded with thermal imaging and sometimes high-speed video. After the fire is extinguished, the researchers compare the model's predictions to the measured data.

Discrepancies reveal where the model is wrong. Perhaps the model overestimated how much hydrogen fluoride would form, or underestimated how quickly it would disperse. Perhaps the model did not account for the battery case rupturing and releasing pressure suddenly. These findings feed back into the model, which is refined and tested again.

Different battery chemistries, sizes, and states of charge require separate validation tests. A model validated for a small cylindrical cell may not be accurate for a large pouch cell. A model validated for a fully charged battery may fail for a partially charged one. This is why modeling is an ongoing process, not a one-time effort.

How regulators and manufacturers use modeling data

Battery modeling has moved from academic research into practical use. The International Maritime Organization (IMO) has incorporated gas modeling into its guidelines for shipping lithium batteries by air and sea. The guidelines specify ventilation requirements for cargo holds based on modeling predictions of how much hydrogen gas a battery fire could produce.

Building codes in several countries now reference modeling data when setting requirements for battery storage rooms. A room storing large quantities of lithium-ion batteries may be required to have mechanical ventilation sized to handle the gas production rate predicted by models for the worst-case battery fire. Some codes specify that the ventilation must be able to remove gases faster than they accumulate, preventing toxic concentrations from building up.

Battery manufacturers use modeling to design safer battery management systems. If modeling shows that a particular chemistry produces dangerous levels of hydrogen fluoride in an enclosed space, the manufacturer might switch to a different electrolyte, add a thermal fuse that stops the reaction early, or design the battery case to vent gases in a controlled way rather than rupturing suddenly.

Emergency response teams also use modeling. Firefighters need to know whether a battery fire in a warehouse will produce enough carbon monoxide to be dangerous in adjacent rooms, or whether hydrogen gas might accumulate in the ceiling and create an explosion hazard. Models can answer these questions before the fire happens, allowing responders to plan their approach.

Limitations and uncertainties in current models

Despite advances, modeling of battery fires remains uncertain. One major limitation is that battery fires are not uniform. A battery that is overcharged and then short-circuited will burn differently than one that is crushed or exposed to external heat. The exact failure mode is often unknown until after the fire occurs.

Another limitation is that models must make simplifying assumptions about the battery's internal structure. A real battery has multiple layers of different materials, and the exact arrangement and thickness of each layer affects how heat spreads and how gases form. Models often treat the battery as a simplified geometry to keep computation time manageable.

The behavior of the electrolyte is also not fully understood. Different electrolyte formulations burn differently, and the exact decomposition pathways depend on temperature, pressure, and the presence of catalytic surfaces. Researchers continue to study these reactions in laboratory settings, but complete understanding remains elusive.

Finally, models are typically validated against fires in controlled laboratory chambers, which are very different from fires in real buildings or vehicles. A fire in a warehouse with high ceilings, multiple rooms, and complex ventilation systems will behave differently than a fire in a small test chamber. Researchers are working to validate models in larger, more realistic spaces, but this is expensive and difficult.

Emerging approaches and future directions

Researchers are developing faster, more accurate models using machine learning. Instead of solving the full equations for every scenario, a machine learning model can be trained on thousands of simulations and then make predictions in seconds. This allows engineers to explore many design scenarios quickly — for example, testing how different ventilation designs would affect gas dispersion.

Multi-scale modeling is another emerging approach. Rather than trying to simulate the entire battery and the entire room in one model, researchers create separate models for different scales — the chemical reactions at the cell level, the thermal behavior at the pack level, and the gas dispersion at the room level — and then link them together. This can reduce computation time while maintaining accuracy.

Real-time monitoring and adaptive modeling is also being explored. If a battery management system can detect early signs of thermal runaway (the cascade of reactions that leads to fire), it could feed this information into a model that predicts what will happen next. This could allow the system to take preventive action — venting gases, cooling the battery, or isolating it from other cells — before a full fire develops.

Frequently Asked Questions

What are the most dangerous gases produced by lithium-ion battery fires?

Hydrogen fluoride is the most acutely toxic, causing severe respiratory and chemical burns at low concentrations. Carbon monoxide is produced in large quantities and causes asphyxiation. Hydrogen gas can accumulate in enclosed spaces and create explosion hazards. Phosphoryl fluoride and other fluorine compounds are also highly toxic. The specific mix depends on the battery chemistry.

How long does it take to run a full battery fire simulation?

A coupled chemical and fluid dynamics simulation of a single battery fire in a single room can take hours to days on a modern computer, depending on the complexity and the desired accuracy. Simplified models or smaller domains run faster. This is why researchers often decouple the models or use machine learning to speed up predictions.

Can modeling predict how a battery fire will behave in my specific building?

Modeling can provide general guidance about gas production and dispersion, but predicting behavior in a specific building requires detailed information about the building's geometry, ventilation system, and the exact battery type and state of charge. A professional engineer would need to run a custom simulation, which is expensive. General guidelines based on modeling are more practical for most applications.

Are battery fire models used to set safety standards?

Yes. Regulatory agencies including the International Maritime Organization, the U.S. Department of Transportation, and various national building code bodies reference modeling data when setting ventilation requirements, storage distance limits, and packaging standards for lithium batteries. However, standards are typically conservative and based on worst-case scenarios rather than average predictions.

Why do different battery chemistries produce different gases?

The electrolyte, cathode, and anode materials all contribute to the gases produced. Fluorine-containing electrolytes release fluorine compounds. Different cathode materials decompose at different temperatures and release different byproducts. The organic solvents in the electrolyte produce carbon monoxide and other combustion products. Changing any of these materials changes the gas profile.