Pipe wall thickness calculation