# Algorithm of Lightning Strikes? [duplicate]

Given an array of charge for a given area (2D or 3D), what algorithm would describe the path that lightning takes?

An example algorithm would be from the highest charge of the cloud, find the lowest charge adjacently below and move there. Repeat until ground reached.

-

## marked as duplicate by Chris White, Dan, BebopButUnsteady, Manishearth♦Jul 18 '13 at 8:29

You definitely need to take care for the change of the charge field due to the current through the lightning, which is determined by both the electric field and the ion density – the latter is another field you would need to calculate. – leftaroundabout Jun 28 '11 at 14:32
I think the path determination in nature is a very chaotic process. It may also be influenced by chance events, such as ionized trails left by high energy cosmic rays. In New Mexico we had a saying regarding high base thunderstorms (cloud base many thousands of feet above the ground), that lightening follows the rain. I.E. falling raindrops help to create a more favorable path. – Omega Centauri Jun 28 '11 at 15:39
possible duplicate of Can lightning be used to solve NP-complete problems? – Chris White Jul 16 '13 at 1:42
Asking for an algorith looks off topic, but if you want to ask what physics determins the path a lightning follows, this would be fine. – Dilaton Jul 16 '13 at 11:19

I have seen a presentation in a lab recently, from a group working precisely on the simulation of lightning. I was surprised to see, at a small scale, how crooked and twisted on itself, was the path of the lighting, due to retro-action of the magnetic field, created by the current, and the varying electric field, on the path itself. The path ends up rolled many times on itself because of that.

About calculus, indeed one would need PIC (particle in cell) as stated above, to model the dynamics of electons and species at low pressures, together with finite elements, to model the electric and magnetic field, and the concentrations at higher pressures. These algorithms are very intensive, and as stated above again, it is difficult to reproduce the correct branching of lighting. Branching in plasma simulations is a difficult thing, subject to research. It is not impossible that in the case of lighting, a lot of "luck" - or chaos, small perturbations changing the path a lot - takes place.

-

Plasma physics is usually computed with particle-in-cell methods.

http://en.wikipedia.org/wiki/Particle-in-cell

-