---
title: Wellbore Casing
slug: wellbore-casing
docTags: 
createdAt: 2023-03-22T19:17:08.000Z
---

The Wellbore Casing table describes the casing strings installed in a wellbore — the steel pipe sections lining the hole. Each record is one casing section with its depth interval and diameters. ProdX uses casing geometry for bottomhole pressure and flow modeling, particularly for annular and casing flow paths.

The unique constraint on casing entries is **sourceWellboreId + sourceId**.

| **Variable**     | **Data Type**   | **Unit of Measure** | **Is Nullable?** | **Default Value** | **Description**                                                                                                                                             |
| ---------------- | --------------- | ------------------- | ---------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sourceId         | String          | -                   | No               | -                 | Source ID for the casing section<br /><br />**From WellView:** wvcas table, idrec column<br />**From OpenWells:** cd\_assembly table, assembly\_id column   |
| sourceWellId     | String          | -                   | No               | -                 | Source ID for the well<br /><br />**From WellView:** wvcas table, idwell column<br />**From OpenWells:** cd\_assembly table, well\_id column                |
| sourceWellboreId | String          | -                   | No               | -                 | Source ID for the wellbore<br /><br />**From WellView:** wvcas table, idrecwellbore column<br />**From OpenWells:** cd\_assembly table, wellbore\_id column |
| topMd            | Double          | ft                  | Yes              | 0.0               | Top measured depth of the casing section                                                                                                                    |
| bottomMd         | Double          | ft                  | No               | -                 | Bottom measured depth of the casing section                                                                                                                 |
| id               | Double          | in                  | No               | -                 | Inner diameter of the casing<br /><br />**From WellView:** wvcas table, SZIDNOMMINCALC column                                                               |
| od               | Double          | in                  | No               | -                 | Outer diameter of the casing<br /><br />**From WellView:** wvcas table, SZODNOMMINCALC column                                                               |
| roughness        | Double          | in                  | Yes              | 0.0006            | Absolute roughness coefficient of the casing material                                                                                                       |
| runDate          | Datetime Offset | -                   | Yes              | -                 | Date the casing was run. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28:37+0000                                              |

:::hint{type="info"}
**Wellbore Casing Notes**

Every well requires casing data. Wells with no casing data will fail a data integrity check, and the system will not compute values for them.
:::

:::hint{type="info"}
**Top Measured Depth Notes**

If topMd is NULL, the system assumes 0 ft.
:::

:::hint{type="info"}
**Roughness Notes**

If roughness is NULL, the compute engine applies 0.0006 in its place.
:::

***

# Data Integrity Checks

| **Condition**                                                        | **Response**    |
| -------------------------------------------------------------------- | --------------- |
| Any non-nullable field is NULL or empty                              | Record Rejected |
| (sourceWellId, sourceWellboreId) does not match an existing wellbore | Row Skipped     |

:::hint{type="info"}
**Partial success on bulk ingest**

Rows referencing an unknown wellbore are skipped while the remaining rows are written. The error response names each skipped row. An error response therefore does not mean nothing was written.
:::

***

# Common Error Messages

| **API**             | **Scenario**     | **Error Response**                                                                                                |
| ------------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------- |
| Add / Upsert casing | Unknown wellbore | Casing with sourceId 'xxx' was skipped: wellbore with sourceWellId 'xxx' and sourceWellboreId 'xxx' was not found |
