Fluid Placement in a Closed-end Pipe with Application in the Plug and Abandonment of Oil and Gas Wells