Galvanic corrosion can occur when two dissimilar metallic materials are electrically connected in a corrosive environment. The less noble material will corrode. The corrosion rate is strongly dependent on the electric conductivity of the aggressive solution, the difference in corrosion potential between the galvanically coupled materials and the surface ratio between the electrodes.
If two stainless steel grades of similar type are galvanically coupled, there is usually no risk of galvanic corrosion. However, if corrosion occurs for some reason in one of the stainless steels, the active steel corrodes with a higher corrosion rate than usual, driven by the difference in potential between the active and passive states.
When stainless steel is joined with carbon steel, for example stainless tubes and carbon-steel tube plates in a heat exchanger, the carbon steel may suffer from galvanic corrosion attack.
When stainless steel is combined with graphite, the attack will be on the steel. Graphite gaskets should therefore be avoided.