-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Proper inclusion of generated classes * Better organisation * Linking to examples
- Loading branch information
Showing
26 changed files
with
442 additions
and
219 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
docs/rips/PythonExamples/launch_load_case_snapshot_exit.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Access to environment variables | ||
import os | ||
# Load ResInsight Processing Server Client Library | ||
import rips | ||
# Connect to ResInsight instance | ||
resinsight = rips.Instance.launch() | ||
|
||
# This requires the TestModels to be installed with ResInsight (RESINSIGHT_BUNDLE_TESTMODELS): | ||
resinsight_exe_path = os.environ.get('RESINSIGHT_EXECUTABLE') | ||
|
||
# Get the TestModels path from the executable path | ||
resinsight_install_path = os.path.dirname(resinsight_exe_path) | ||
test_models_path = os.path.join(resinsight_install_path, 'TestModels') | ||
path_name = os.path.join(test_models_path, 'TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID') | ||
|
||
# Load an example case. Needs to be replaced with a valid path! | ||
case = resinsight.project.load_case(path_name) | ||
|
||
# Get a view | ||
view1 = case.views()[0] | ||
|
||
# Set the time step for view1 only | ||
view1.set_time_step(time_step=2) | ||
|
||
# Set cell result to SOIL | ||
view1.apply_cell_result(result_type='DYNAMIC_NATIVE', result_variable='SOIL') | ||
|
||
# Set export folder for snapshots and properties | ||
resinsight.set_export_folder(export_type='SNAPSHOTS', path="e:/temp") | ||
resinsight.set_export_folder(export_type='PROPERTIES', path="e:/temp") | ||
|
||
# Export all snapshots | ||
resinsight.project.export_snapshots() | ||
|
||
# Export properties in the view | ||
view1.export_property() | ||
|
||
resinsight.exit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Access to environment variables and path tools | ||
import os | ||
# Load ResInsight Processing Server Client Library | ||
import rips | ||
# Connect to ResInsight instance | ||
resinsight = rips.Instance.find() | ||
|
||
# This requires the TestModels to be installed with ResInsight (RESINSIGHT_BUNDLE_TESTMODELS): | ||
resinsight_exe_path = os.environ.get('RESINSIGHT_EXECUTABLE') | ||
|
||
# Get the TestModels path from the executable path | ||
resinsight_install_path = os.path.dirname(resinsight_exe_path) | ||
test_models_path = os.path.join(resinsight_install_path, 'TestModels') | ||
path_name = os.path.join(test_models_path, 'TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID') | ||
case = resinsight.project.load_case(path_name) | ||
|
||
# Print out lots of information from the case object | ||
print("Case id: " + str(case.id)) | ||
print("Case name: " + case.name) | ||
print("Case type: " + case.__class__.__name__) | ||
print("Case file name: " + case.file_path) | ||
print("Case reservoir bounding box:", case.reservoir_boundingbox()) | ||
|
||
timesteps = case.time_steps() | ||
for t in timesteps: | ||
print("Year: " + str(t.year)) | ||
print("Month: " + str(t.month)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Access to environment variables and path tools | ||
import os | ||
# Load ResInsight Processing Server Client Library | ||
import rips | ||
# Connect to ResInsight instance | ||
resinsight = rips.Instance.find() | ||
|
||
# This requires the TestModels to be installed with ResInsight (RESINSIGHT_BUNDLE_TESTMODELS): | ||
resinsight_exe_path = os.environ.get('RESINSIGHT_EXECUTABLE') | ||
|
||
# Get the TestModels path from the executable path | ||
resinsight_install_path = os.path.dirname(resinsight_exe_path) | ||
test_models_path = os.path.join(resinsight_install_path, 'TestModels') | ||
path_name = os.path.join(test_models_path, 'TEST10K_FLT_LGR_NNC/10KWithWellLog.rsp') | ||
|
||
# Open a project | ||
resinsight.project.open(path_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.