Plasticity theory for working of porous metals