This article needs additional citations for verification. (January 2017) (Learn how and when to remove this template message)
Casing is large diameter pipe that is assembled and inserted into a recently drilled section of a borehole. Similar to the bones of a spine protecting the spinal cord, casing is set inside the drilled borehole to protect and support the wellstream. The lower portion (and sometimes the entirety) is typically held in place with cement. Deeper strings usually are not cemented all the way to the surface, so the weight of the pipe must be partially supported by a casing hanger in the wellhead.
Casing that is cemented in place aids the drilling process in several ways:
- Prevents contamination of fresh water well zones.
- Prevents unstable upper formations from caving in and sticking the drill string or forming large caverns.
- Provides a strong upper foundation to allow use of high-density drilling fluid to continue drilling deeper.
- Isolates various zones, which may have different pressures or fluids, in the drilled formations from one another.
- Seals off high pressure zones from the surface, minimizing potential for a blowout
- Prevents fluid loss into or contamination of production zones.
- Provides a smooth internal bore for installing production equipment.
Optimum design of the casing program decreases the well construction costs, enhances the efficiency of operations and also diminishes the environmental impacts. 
A slightly different metal string, called production tubing, is often used without cement inside the final casing string of a well to contain production fluids and convey them to the surface from an underground reservoir.
In the planning stages of a well, a drilling engineer, usually with input from geologists and others, will pick strategic depths at which the hole will need to be cased in order for drilling to reach the desired total depth. This decision is often based on subsurface data such as formation pressures and strengths, and is balanced against the cost objectives and desired drilling strategy.
With the casing set depths determined, hole sizes and casing sizes must follow. The hole drilled for each casing string must be large enough to accommodate the casing to be placed inside it, allowing room for cement between the outside of that casing and the hole. Also, subsequent bits that will continue drilling obviously must pass through existing casing strings. Thus, each casing string will have a subsequently smaller diameter. The inside diameter of the final casing string (or penultimate one in some instances of a liner completion) must accommodate the production tubing and associated hardware such as packers, gas lift mandrels and subsurface safety valves.
Casing design for each size of designed pipes is done by calculating the worst conditions that may be faced during drilling and over the producing life of the well. Mechanical properties such as longitudinal tensile strength, and burst and collapse resistance (calculated considering biaxial effects of axial and hoop stresses), must be sufficient at various depths. Pipe of differing strengths often comprises a long casing string, which typically will have the greatest axial tension and perhaps highest internal burst pressure differentials in the upper parts, and the greatest collapsing loads deeper in the well from external pressure vs lowered internal pressure.
Casing strings are supported by casing hangers that are set in the wellhead, which later will be topped with the Christmas tree. The lower members of the wellhead usually are installed on top of the first casing string after it has been cemented in place.
- Conductor casing
- Surface casing
- Intermediate casing (optional)
- Production casing
- Production liner
The conductor casing serves as a support during drilling operations, to flowback returns during drilling and cementing of the surface casing, and to prevent collapse of the loose soil near the surface. It can normally vary from sizes such as 18" to 30".
The purpose of surface casing is to isolate freshwater zones so that they are not contaminated during drilling and completion. Surface casing is the most strictly regulated due to these environmental concerns, which can include regulation of casing depth and cement quality. A typical size of surface casing is 13⅜ inches.
Intermediate casing may be necessary on longer drilling intervals where necessary drilling mud weight to prevent blowouts may cause a hydrostatic pressure that can fracture shallower or deeper formations. Casing placement is selected so that the hydrostatic pressure of the drilling fluid remains at a pressure level that is between formation pore pressures and fracture pressures.
In order to reduce cost, a liner may be used which extends just above the shoe (bottom) of the previous casing interval and hung off downhole rather than at the surface. It may typically be 7", although many liners match the diameter of the production tubing.
Few wells actually produce through casing, since producing fluids can corrode steel or form deposits such as asphaltenes or paraffin waxes and the larger diameter can make flow unstable. Production tubing is therefore installed inside the last casing string and the tubing annulus is usually sealed at the bottom of the tubing by a packer. Tubing is easier to remove for maintenance, replacement, or for various types of workover operations. It is significantly lighter than casing and does not require a drilling rig to run in and out of hole; smaller "service rigs" are used for this purpose.
Cementing is performed by circulating a cement slurry through the inside of the casing and out into the annulus through the casing shoe at the bottom of the casing string. In order to precisely place the cement slurry at a required interval on the outside of the casing, a plug is pumped with a displacement fluid behind the cement slurry column, which "bumps" in the casing shoe and prevents further flow of fluid through the shoe. This bump can be seen at surface as a pressure spike at the cement pump. To prevent the cement from flowing back into the inside of the casing, a float collar above the casing shoe acts as a check valve and prevents fluid from flowing up through the shoe from the annulus.
- "How Does Casing Work?". www.rigzone.com. Retrieved 2018-07-05.
- Rabia, Hussain (1986). Oil Well Drilling Engineering. springer. pp. 185–243. ISBN 0860106616.
- "Using casing to drill directional wells" (PDF).
- Petroleum Engineering Handbook, Volume II: Drilling Engineering. Society of Petroleum Engineers. 2007. pp. 287–288. ISBN 978-1-55563-114-7.
- Closed-Loop Systems and Methods for Geothermal Electricity Generation - US 20120174581 A1 - www.google.com - Patents.