Nature can encourage corrosion in many fashions. The force behind the corrosion attraction of metals towards the formation of stable oxides or other oxidized forms of metals can be divided into three types: (reference)
Composition cells (also known as galvanic cells) arise when two metals with dissimilar compositions or microstructures come into contact in the presence of an electrolyte. The two most common examples follow:
Dissimilar metals: Formed by two single-phase metals in contact, such as iron and zinc, or nickel and gold. The metal that is higher on the Electrochemical Series will be the cathode. The other metal will suffer anodic reactions and will corrode.
Incidentally, dissimilar metal contact (while bathed in a suitable electrolyte) is the technology behind the construction of batteries. The voltage of a battery directly follows from the natural electrode potential of the corrosion reactions present inside the battery. Hence, controlled corrosion is a good thing!
Multi-phase alloy: Formed by a metal alloy composed of multiple phases, such as a stainless steel, a cast iron, or an aluminum alloy. The individual phases possess different electrode potentials, resulting in one phase acting as an anode and subject to corrosion.
Stress cells can exist in a single piece of metal where a portion of the metal's microstructure possesses more stored strain energy than the rest of the metal. Metal atoms are at their lowest strain energy state when situated in a regular crystal array.
Grain boundaries: By definition, metal atoms situated along grain boundaries are not located in a regular crystal array (i.e. a grain). Their increased strain energy translates into an electrode potential that is anodic to the metal in the grains proper. Thus, corrosion can selectively occur along grain boundaries.
High localized stress: Regions within a metal subject to a high local stress will contain metal atoms at a higher strain energy state. As a result, high-stress regions will be anodic to low-stress regions and can corrode selectively.
For example, bolts under load are subject to more corrosion than similar bolts that are unloaded. A good rule of thumb is to select fasteners that are cathodic (i.e. higher on the Electrochemical Series) to the metal being fastened in order to prevent fastener corrosion.
Cold worked: Regions within a metal subjected to cold-work contain a higher concentration of dislocations, and as a result will be anodic to non-cold-worked regions. Thus, cold-worked sections of a metal will corrode faster. For example, nails that are bent will often corrode at the bend, or at their head where they were worked by the hammer.
Concentration cells can arise when the concentration of one of the species participating in a corrosion reaction varies within the electrolyte.
Electrolyte concentration: Consider a metal bathed in an electrolyte containing its own ions. The basic corrosion reaction where a metal atom losses an electron and enters the electrolyte as an ion can proceed both forward and backwards, and will eventually reach equilibrium.
If a region of the electrolyte (adjacent to the metal) were to exhibit a decreased concentration of metal ions, this region would become anodic to the other portions of the metal surface. As a result, this portion of the metal would corrode faster in order to increase the local ion concentration.
The net affect is that local corrosion rates are modulated in order to homogenize reduction ion concentrations within the electrolyte.
Oxidation concentration: Perhaps the most common concentration cell affecting engineered structures is that of dissolved oxygen. When oxygen has access to a moist metal surface, corrosion is promoted. However, it is promoted the most where the oxygen concentration is the least.
As a result, sections of a metal that are covered by dirt or scale will often corrode faster, since the flow of oxygen to these sections is restricted. An increased corrosion rate will lead to increased residue, further restricting the oxygen flow to worsen the situation. Pitting often results from this "runaway" reaction.
See also: Conductivity cell, Corrosion cell definition, Daniell cell, Impressed current cathodic protection system, Natural corrosion cells, Rotating cylinder test cell,
Sacrificial anode cathodic protection