|
| 1 | +""" |
| 2 | +Example demonstrating how to create well paths from XYZ coordinates |
| 3 | +using the import_fixed_trajectory_well_path API. |
| 4 | +""" |
| 5 | + |
| 6 | +import sys |
| 7 | +import os |
| 8 | +import rips |
| 9 | + |
| 10 | + |
| 11 | +def create_norne_well(): |
| 12 | + coordinates = [ |
| 13 | + [457121.858, 7322122.992, -371.7], |
| 14 | + [457121.820, 7322122.956, -404.999], |
| 15 | + [457121.767, 7322122.946, -434.999], |
| 16 | + [457123.250, 7322120.048, -644.946], |
| 17 | + [457132.573, 7322112.750, -914.534], |
| 18 | + [457132.853, 7322111.663, -1184.492], |
| 19 | + [457141.541, 7322111.158, -1484.359], |
| 20 | + [457147.535, 7322109.991, -1694.269], |
| 21 | + [457152.835, 7322107.659, -1934.198], |
| 22 | + [457142.201, 7322088.313, -2182.14], |
| 23 | + [457108.159, 7322025.317, -2335.345], |
| 24 | + [457077.300, 7321905.985, -2464.557], |
| 25 | + [457100.629, 7321698.916, -2584.388], |
| 26 | + [457226.480, 7321457.656, -2629.045], |
| 27 | + [457374.455, 7321253.227, -2633.377], |
| 28 | + [457499.332, 7321103.741, -2630.816], |
| 29 | + [457581.202, 7321019.105, -2630.42], |
| 30 | + [457661.101, 7320934.536, -2630.212], |
| 31 | + [457727.784, 7320862.819, -2632.240], |
| 32 | + ] |
| 33 | + |
| 34 | + return coordinates |
| 35 | + |
| 36 | + |
| 37 | +resinsight = rips.Instance.find() |
| 38 | + |
| 39 | +# Get the well path collection |
| 40 | +well_path_coll = resinsight.project.well_path_collection() |
| 41 | + |
| 42 | +# Create different types of well paths |
| 43 | +well_paths_data = [ |
| 44 | + ("B 2-H", create_norne_well()), |
| 45 | +] |
| 46 | + |
| 47 | +created_wells = [] |
| 48 | + |
| 49 | +for name, coordinates in well_paths_data: |
| 50 | + print(f"\nCreating well path: {name}") |
| 51 | + print(f" Number of coordinate points: {len(coordinates)}") |
| 52 | + print( |
| 53 | + f" Start: [{coordinates[0][0]:.1f}, {coordinates[0][1]:.1f}, {coordinates[0][2]:.1f}]" |
| 54 | + ) |
| 55 | + print( |
| 56 | + f" End: [{coordinates[-1][0]:.1f}, {coordinates[-1][1]:.1f}, {coordinates[-1][2]:.1f}]" |
| 57 | + ) |
| 58 | + |
| 59 | + # Create the well path using the new API |
| 60 | + well_path = well_path_coll.import_fixed_trajectory_well_path( |
| 61 | + name=name, coordinates=coordinates |
| 62 | + ) |
| 63 | + |
| 64 | + created_wells.append(well_path) |
0 commit comments