Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rips: Completion export parameters and multi segment well options #10781

Closed
tklov11 opened this issue Nov 2, 2023 · 1 comment · Fixed by #10783
Closed

Rips: Completion export parameters and multi segment well options #10781

tklov11 opened this issue Nov 2, 2023 · 1 comment · Fixed by #10783
Assignees
Labels
Enhancement An addition that can be observed by the user

Comments

@tklov11
Copy link

tklov11 commented Nov 2, 2023

Hi,

I have three connected issues today:

(1) It would be good if you could allow for access to the completion export parameters and the multi segment well options in wells/well/Completion Settings through Rips.
(2) And, it would be great if the function case.export_well_path_completions() accounted for the changes done in (1).
(3) Finally, it would be perfect if the function mentioned in (2) exported the values in the section Multi segment well options correctly. Currently, I am reading values for liner diameter and roughness in the project I export from Rips. But, the values I see in the MSW-file, also exported from Rips, shows "inf" for these parameters.

Best regards
Trygve

@magnesj magnesj self-assigned this Nov 2, 2023
@magnesj magnesj added this to the Maintenance 2023 - Sprint 11 milestone Nov 2, 2023
@magnesj magnesj added the Enhancement An addition that can be observed by the user label Nov 2, 2023
@magnesj
Copy link
Member

magnesj commented Nov 2, 2023

Example script with completion settings

# Load ResInsight Processing Server Client Library
import rips
import time

# Connect to ResInsight instance
resinsight = rips.Instance.find()

# Create a modeled well path and add well path targets
# The coordinates are based on the Norne case
# Add a lateral to the main well path

well_path_coll = resinsight.project.descendants(rips.WellPathCollection)[0]
well_path = well_path_coll.add_new_object(rips.ModeledWellPath)
well_path.name = "Test Well-1"
well_path.update()

geometry = well_path.well_path_geometry()

reference_point = geometry.reference_point
reference_point[0] = 457196
reference_point[1] = 7322270
reference_point[2] = 2742
geometry.update()  # Commit updates back to ResInsight

# Create the first well target at the reference point
coord = [0, 0, 0]
geometry.append_well_target(coord)

# Append new well targets relative the the reference point
coord = [454.28, 250, -10]
target = geometry.append_well_target(coord)

coord = [1054.28, 250, -50]
target = geometry.append_well_target(coord)

# Create a lateral at specified location on parent well
measured_depth = 3600
lateral = well_path.append_lateral(measured_depth)
geometry = lateral.well_path_geometry()

coord = [770, 280, 50]
target = geometry.append_well_target(coord)

coord = [1054.28, -100, 50]
target = geometry.append_well_target(coord)

coord = [2054.28, -100, 45]
target = geometry.append_well_target(coord)


# Wait 2 second
print("Wait 2 seconds ...")
time.sleep(2)
print("Move reference point of parent well")

geometry = well_path.well_path_geometry()
reference_point = geometry.reference_point
reference_point[2] += 50
geometry.update()  # Commit updates back to ResInsight


well_path.append_perforation_interval(3300, 3350, 0.2, 0.76)


# Update skin factor of the perforation
perforation_coll = well_path.completions().perforations()
perforation = perforation_coll.perforations()[0]
new_skin_factor = 0.9
print(
    "Changing perforation skin factor from {} to {}.".format(
        perforation.skin_factor, new_skin_factor
    )
)
perforation.skin_factor = new_skin_factor
perforation.update()

completions_settings = well_path.completion_settings()
completions_settings.msw_roughness = 12.34
completions_settings.msw_liner_diameter = 0.2222
completions_settings.well_name_for_export = "file name"
completions_settings.group_name_for_export = "my_group_name"
completions_settings.well_type_for_export = "GAS"
completions_settings.update()  # Commit updates back to ResInsight

# export completions
cases = resinsight.project.cases()

for case in cases:
    print("Case name: ", case.name)
    print("Case id: ", case.id)

    case.export_well_path_completions(
        time_step=0,
        well_path_names=["Test Well-1 Y1"],
        file_split="UNIFIED_FILE",
        include_perforations=True,
        custom_file_name="f:/scratch/2023-11-02/myfile.myext",
    )

@github-actions github-actions bot added the PendingRelease Issues is fixed and will be available in next release label Nov 6, 2023
@magnesj magnesj removed the PendingRelease Issues is fixed and will be available in next release label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement An addition that can be observed by the user
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants