Also please explain the effect of the presence of CO2 in the gas on the corrosion. How does sulfur hydrolysis affect the carbon steel material? Thanks in advance.
The presence of elemental sulfur in a wet sour line can cause very severe localized corrosion of the steel if the sulfur particles come in contact with the steel. Sulfur that is suspended in the aqueous phase has not been shown to have much effect. Also, if there is a liquid hydrocarbon phase, this may serve as a solvent for the sulfur and remove it from being available for the corrosion reaction.
As for exactly how the solid sulfur is able to steel when it is on the surface is still a matter of debate and there are a number of papers in the literature discussing it. My best guess is that there is a local increase in hydrogen polysulfides near the surface of the sulfur and that these act as transport agents to carry the elemental sulfur to the steel surface, where a variety of FeS and FeS2 corrosion products can form.
As for the role of CO2, it will generally play an important role in the determination of the in-situ pH, but has no role in the actual corrosion reaction beyond the supply of hydrogen ions.