I’m by no means an expert on this, but I guess it would be pretty complex to have topological or structural optimisation algorithms take into account local erosion artefacts, like corrosion, since this pretty much happens on a nano scale, compared to most simulations performing on macro scale models, like for instance an entire truss?
In computer graphics, this probably wouldn’t be represented by actual geometry, but by a lower detail model (lower polygon count) and the rust would be done with a texture or shader, especially if the pipe would be part of a larger system of pipes. There really are only few programs that specialise in dealing with high-poly models (i.e. ZBrush).
This is to say that processing models with a high polygon count needs lots of CPU/GPU power even just to display them on screen.
My guess would be that you’d need to abstract the rust information, convert it to some kind of numerical data that makes sense for the simulation. When calculating snow loads on buildings you also don’t account for each and every snowflake, but there are percentages, ratios, norms, … that can then be used in calculations to evaluate local loads.
Any body else wanting to chime in on this?