Mapping out the input values on the GaP code
- Dominant language
- Jupyter Notebook
- Stars
- 2
- Forks
- 0
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 58
Description
Hi @hongbozhou ,
Regarding the input values of the `src/GaP/experiments/GaP_HIRES_15112022.py` file, this is how I should retrieve them from the WellClass.
```python
################# Conductor design ###################
cond_Casing_ID = 0.762 # 30 inch conductor
cond_Casing_strt_depth = 312
cond_Casing_end_depth= 371
cond_oph_strt_depth = 4 # TODO(hzh): input and formula to calculate these numbers?
cond_oph_end_depth = 376
cond_Casing_strt_depth_cement = 312
cond_Casing_end_depth_cement= 371
```
Most of these values are already existing on the WellClass. They may not appear on the input CSV because:
- The input diameters are reported in inches (horrible convention of this industry)
- An all depths are reported as MDRKB, not TVDMSL
The Well Class takes care of transforming all to TVDMSL and converting all units to SI
The `cond_Casing_ID` is the diameter of the shallowest casing. The WellClass tables are sorted from shallowest to deepest, so this value shall be found on the casing table. `my_well.casings['diameter_m'][0]`
`cond_Casing_strt_depth` and `cond_Casing_end_depth` are the depths in TVDMSL of the top and bottom of the casing. These can be retrieved from `my_well.casings['top_msl'][0]` and `my_well.casings['bottom_msl'][0]` respectively.
The `cond_Casing_strt_depth_cement` and `cond_Casing_end_depth_cement` are the top and bottom depths in TVDMSL of the cemented-bond between casing and open_hole. These values are also stored in the casings table as `my_well.casings['toc_msl'][0]` and `my_well.casings['boc_msl'][0]`. TOC and BOC stands for top and bottom of cement, respectively.
Finally, the `cond_oph_strt_depth` and `cond_oph_end_depth` are the top and bottom depths in TVDMSL of hole where this casing was fitted. However, these values are not found in the casing table of the well class, but in the drilling table under `my_well.drilling['top_msl'][0]` and `my_well.drilling['bottom_msl'][0]`, respectively.
Regarding barriers, the csv file ony takes top and bottom of the barrier, stored in the table `barriers`. The well class takes care of computing the diameter of the barrier. Those values are stored in a new table called `barriers_mod `. I built this that way because sometimes the cement plugs are sitting at transitions between two different hole sizes, which results in a barrier having multiple diameters. In those cases, the barrier is splitted in several barriers covering different intervals and different diameters. So, the variable `barrier_ID` (0.3397) is that diameter of the barrier, and it can be indexed in `my_well.barriers_mod['diameter_m'][0]` (0.3397). The `barrier_strt_depth` and `barrier_end_depth` are the top and bottom depths in TVDMSL of the cement plugs/barriers, and can be indexed at `my_well.barriers_mod['top_msl'][0]` and `my_well.barriers_mod['bottom_msl'][0]`, respectively.
The tables below show a breakdown of all the sections declared in that file. Minor numerical discrepancies (370.5 vs 371) are due to the source of the values, the CSV files took values directly from the well report (more accurate). The major discrepancies are between the **`oph`** values and the **`drilling`** table of the well class.
- In the original GaP code, each section is forced to have all three components (casing + hole + cement). The **`_oph_start_depth`** is always equal or less than the top of the casing.
- In the Well Class, the drilled sections are recorded in a different table than the casings. This is because the top of a drilled section are not necessarily the same as the hole section, and because there are drilled sections that are left as open hole. In the Smeaheia case, the well class has 3 sections in the casings table and 4 sections in the drilling table. In the GaP code, this last section was lumped with the previous one.
#Casing, cement bond and hole size
## `_Casing_ID`
| element | source| variable name | value |
| ---- | ---- | ---- | ----|
| 30 inch cond | GaP code | `cond_Casing_ID` | 0.762 |
| | Well class | `my_well.casings['diameter_m'][0]` | 0.762 |
| 13-3/8 inch casing | GaP code | `surf_Casing_ID ` | 0.3397 |
| | Well class | `my_well.casings['diameter_m'][1]` | 0.3397 |
| 9-5/8 inch casing | GaP code | `prod_Casing_ID ` | 0.244 |
| | Well class | `my_well.casings['diameter_m'][2]` | 0.2445 |
## `_Casing_strt_depth`, `_Casing_end_depth`
| element | source| top variable | bottom variable | top value | bottom value |
| ---- | ---- | ---- | ---- |---- |---- |
| 30 inch cond | GaP code | `cond_Casing_strt_depth` | `cond_Casing_end_depth` | 312 | 371 |
| | Well class | `my_well.casings['top_msl'][0]` | `my_well.casings['bottom_msl'][0]` | 312.0 | 370.5 |
| 13-3/8 inch casing | GaP code | `surf_Casing_strt_depth` | `surf_Casing_end_depth` | 312 | 686 |
| | Well class | `my_well.casings['top_msl'][1]` | `my_well.casings['bottom_msl'][1]` | 312.0 | 685.5 |
| 9-5/8 inch casing | GaP code | `prod_Casing_strt_depth` | `prod_Casing_end_depth` | 599 | 1114 |
| | Well class | `my_well.casings['top_msl'][2]` | `my_well.casings['bottom_msl'][2]` | 598.5 | 1114.0 |
## `_Casing_strt_depth_cement`, `_Casing_end_depth_cement`
| element | source| top variable | bottom variable | top value | bottom value |
| ---- | ---- | ---- | ---- |---- |---- |
| 30 inch cond | GaP code | `cond_Casing_strt_depth_cement` | `cond_Casing_end_depth_cement` | 312 | 371 |
| | Well class | `my_well.casings['toc_msl'][0]` | `my_well.casings['boc_msl'][0]` | 312.0 | 370.5 |
| 13-3/8 inch casing | GaP code | `surf_Casing_strt_depth_cement` | `surf_Casing_end_depth_cement ` | 312 | 686 |
| | Well class | `my_well.casings['toc_msl'][1]` | `my_well.casings['boc_msl'][1]` | 312.0 | 685.5 |
| 9-5/8 inch casing | GaP code | `prod_Casing_strt_depth_cement ` | `prod_Casing_strt_depth_cement ` | 683| 1114|
| | Well class | `my_well.casings['toc_msl'][2]` | `my_well.casings['boc_msl'][2]` | 682.5 | 1114.0 |
## `_oph_end_depth`, `_oph_start_depth`
| element | source| top variable | bottom variable | top value | bottom value |
| ---- | ---- | ---- | ---- |---- |---- |
| 30 inch cond | GaP code | `cond_oph_strt_depth ` | `cond_oph_end_depth ` | 312 | 371 |
| | Well class | `my_well.drilling['top_msl'][0]` | `my_well.drilling['bottom_msl'][0]` | 312.0 | 371.5 |
| 13-3/8 inch casing | GaP code | `surf_oph_strt_depth` | `surf_oph_end_depth` | 312 | 697 |
| | Well class | `my_well.drilling['top_msl'][1]` | `my_well.drilling['bottom_msl'][1]` | 371.5 | 696.5 |
| 9-5/8 inch casing | GaP code | `prod_oph_strt_depth` | `prod_oph_end_depth` | 599 | 1622 |
| | Well class | `my_well.drilling['top_msl'][2]` | `my_well.drilling['bottom_msl'][2]` | 696.5 | 1161.5 |
| open hole section | GaP code | Lumped into the 9-5/8 inch casing section | | | |
| | Well class | `my_well.drilling['top_msl'][3]` | `my_well.drilling['bottom_msl'][3]` | 1161.5 | 3162.5 |
# Barriers
| barrier | source | top variable | bottom variable | ID variable | top value | bottom value | ID value |
| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| Barrier 1 | GaP code | `barrier_strt_depth` | `barrier_end_depth` | `barrier_ID` | 352 | 560 | 0.3397 |
| | Well class `my_well.barriers_mod` | `['top_msl'][0]` | `['bottom_msl'][0]` | `['diameter_m'][0]` | 351.5 | 559.5 | 0.3397 |
| Barrier 2 | GaP code | `barrier_strt_depth_2` | `barrier_end_depth_2` | `barrier_ID_2` | 1020| 1046 | 0.244 |
| | Well class `my_well.barriers_mod` | `['top_msl'][1]` | `['bottom_msl'][1]` | `['diameter_m'][1]` | 1025.5 | 1045.5 | 0.2445 |
Contributor guide
Assessment
This issue has not been assessed yet.