mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-24 06:48:13 -06:00
Scripting: geomechanical cell result (replaces #14952)
Make RimGeoMechResultDefinition (position, field and component) and the view's cell result scriptable, as for grid views.
This commit is contained in:
1 parent
914cab9084
commit
848c2394bb
10 files changed
+94
-14
No files matched your search
+22
@@ -0,0 +1,22 @@
|
||||
######################################################################
|
||||
# This script applies a geomechanical cell result to the first view
|
||||
# of the first GeoMech case in the project
|
||||
######################################################################
|
||||
import sys
|
||||
|
||||
import rips
|
||||
|
||||
resinsight = rips.Instance.find()
|
||||
|
||||
cases = resinsight.project.descendants(rips.GeoMechCase)
|
||||
if not cases:
|
||||
print("No GeoMech cases in project")
|
||||
sys.exit(1)
|
||||
|
||||
view = cases[0].views()[0]
|
||||
|
||||
cell_result = view.cell_result()
|
||||
cell_result.result_position_type = "ELEMENT_NODAL"
|
||||
cell_result.result_field_name = "SE"
|
||||
cell_result.result_component_name = "S33"
|
||||
cell_result.update()
|
||||
Reference in new issue
Block a user