Skip to content

Commit 6ad94d0

Browse files
committed
Update rips module, proto files, and Python examples
1 parent b1dac57 commit 6ad94d0

File tree

5 files changed

+60
-25
lines changed

5 files changed

+60
-25
lines changed

docs/proto/SimulatorTables.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ message SimulatorCompdatEntry {
3939
optional double end_md = 15;
4040
optional string comment = 16;
4141
optional string grid_name = 17;
42+
optional int32 completion_number = 18;
4243
}
4344

4445
message SimulatorWelspecsEntry {

docs/rips/PythonExamples/wells_and_fractures/completion_data.py

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,25 @@ def fieldValueOrDefaultText(grpc_object, optional_field_name: str):
5353
txt += fieldValueOrDefaultText(line, "pvt_num") + " "
5454
txt += fieldValueOrDefaultText(line, "hydrostatic_density_calc") + " "
5555
txt += fieldValueOrDefaultText(line, "fip_region") + " "
56+
txt += "/"
5657

5758
print(txt)
5859

5960
print("/\n")
6061

6162
compdat = completion_data.compdat
6263

64+
complump_entries = []
65+
6366
print("COMPDAT")
6467

6568
for line in compdat:
6669
txt = ""
70+
complump = ""
6771

6872
if line.HasField("start_md"):
6973
txt += "-- Perforation MD In " + str(line.start_md)
70-
txt += ", MD Out " + str(line.end_md) + "\n"
74+
txt += ", MD Out " + str(line.end_md) + "--\n"
7175

7276
txt += " "
7377
txt += line.well_name + " "
@@ -83,13 +87,36 @@ def fieldValueOrDefaultText(grpc_object, optional_field_name: str):
8387
txt += fieldValueOrDefaultText(line, "skin_factor") + " "
8488
txt += fieldValueOrDefaultText(line, "d_factor") + " "
8589
txt += "'%s'" % line.direction
90+
txt += " /"
91+
92+
if (line.HasField("completion_number")) and (line.completion_number > 0):
93+
complump += " "
94+
complump += line.well_name + " "
95+
complump += str(line.grid_i) + " "
96+
complump += str(line.grid_j) + " "
97+
complump += str(line.upper_k) + " "
98+
complump += str(line.lower_k) + " "
99+
complump += str(line.completion_number) + " "
100+
complump += " /"
101+
102+
complump_entries.append(complump)
86103

87104
print(txt)
88105

106+
print("/\n")
107+
108+
if len(complump_entries) > 0:
109+
print("COMPLUMP")
110+
for complump_entry in complump_entries:
111+
print(complump_entry)
112+
print("/\n")
113+
else:
114+
print("-- No COMPLUMP entries --\n")
115+
89116
print("WELSEGS")
90117
welsegs = completion_data.welsegs
91118
if (welsegs is None) or (len(welsegs) == 0):
92-
print(" -- No WELSEGS data --")
119+
print(" -- No WELSEGS data --\n")
93120
else:
94121
for welsegs_entry in welsegs:
95122
# Print WELSEGS header
@@ -102,6 +129,7 @@ def fieldValueOrDefaultText(grpc_object, optional_field_name: str):
102129
txt += header.info_type + " "
103130
txt += fieldValueOrDefaultText(header, "pressure_components") + " "
104131
txt += fieldValueOrDefaultText(header, "flow_model")
132+
txt += " /"
105133
print(txt)
106134

107135
# Print WELSEGS segment rows
@@ -115,7 +143,7 @@ def fieldValueOrDefaultText(grpc_object, optional_field_name: str):
115143
txt += str(row.depth) + " "
116144
txt += fieldValueOrDefaultText(row, "diameter") + " "
117145
txt += fieldValueOrDefaultText(row, "roughness") + " "
118-
# txt += fieldValueOrDefaultText(row, "description")
146+
txt += " /"
119147
print(txt)
120148

121149
print("/")
@@ -135,6 +163,7 @@ def fieldValueOrDefaultText(grpc_object, optional_field_name: str):
135163
txt += str(compseg.distance_start) + " "
136164
txt += str(compseg.distance_end) + " "
137165
txt += fieldValueOrDefaultText(compseg, "grid_name")
166+
txt += " /"
138167
print(txt)
139168

140169
print("/\n")

0 commit comments

Comments
 (0)