2D RMHD simulation study of nested wire array Z-pinch with foam target