To model the uniform corrosion, just set the minimum measured wall thickness of the pipe, bend, tee and other elements, set the corrosion allowance for remaining service life and run pipe stress analysis
Read about START-PROF pipe stress analysis software
To model the local corrosion or flaws, use plane flaw or volumetric flaw element. The stress analysis of flaw elements will be performed and results are presented in flaw stress table.