Drilling continues in stages: The crew drills, then runs and cements new casings, then drills again. When the rock cuttings from the mud reveal the oil sand from the reservoir rock, the crew may have reached the well's final depth. At this point, crew members remove the drilling apparatus from the hole and perform several tests to confirm this finding:
- Well logging - lowering electrical and gas sensors into the hole to take measurements of the rock formations there
- Drill-stem testing - lowering a device into the hole to measure the pressures, which will reveal whether reservoir rock has been reached
- Core samples - taking samples of rock to look for characteristics of reservoir rock
Once they've reached the final depth, the crew completes the well to allow oil to flow into the casing in a controlled manner. First, they lower a perforating gun into the well to the production depth. The gun has explosive charges to create holes in the casing through which oil can flow. After the casing has been perforated, they run a small-diameter pipe (tubing) into the hole as a conduit for oil and gas to flow up through the well. A device called a packer is run down the outside of the tubing. When the packer is set at the production level, it's expanded to form a seal around the outside of the tubing. Finally, they connect a multi-valved structure called a Christmas tree to the top of the tubing and cement it to the top of the casing. The Christmas tree allows them to control the flow of oil from the well.
After the well is completed, the crew must start the flow of oil into the well. For limestone reservoir rock, acid is pumped down the well and out the perforations. The acid dissolves channels in the limestone that lead oil into the well. For sandstone reservoir rock, a specially blended fluid containing proppants (sand, walnut shells, aluminum pellets) is pumped down the well and out the perforations. The pressure from this fluid makes small fractures in the sandstone that allow oil to flow into the well, while the proppants hold these fractures open. Once the oil is flowing, the oil rig is removed from the site and production equipment is set up to extract the oil from the well.