What is the function of flux in submerged arc welding

Flux is used to completely cover the welded zone. It prevents oxidation of weld joint and spattering of molten metal.