Skip to content

Commit d216970

Browse files
committed
Update rips module, proto files, and Python examples
1 parent fd10545 commit d216970

File tree

6 files changed

+856
-11
lines changed

6 files changed

+856
-11
lines changed

docs/proto/SimulatorTables.proto

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,20 @@ package rips;
77
service WellPath {
88
rpc GetCompletionData(SimulatorTableRequest)
99
returns (SimulatorTableData) {}
10+
rpc GetCompletionDataUnified(SimulatorTableUnifiedRequest)
11+
returns (SimulatorTableData) {}
1012
}
1113

1214
message SimulatorTableRequest {
1315
string wellpath_name = 1;
1416
int32 case_id = 2;
1517
}
1618

19+
message SimulatorTableUnifiedRequest {
20+
repeated string wellpath_names = 1;
21+
int32 case_id = 2;
22+
}
23+
1724
message SimulatorCompdatEntry {
1825
string well_name = 1;
1926
int32 grid_i = 2;
@@ -49,8 +56,87 @@ message SimulatorWelspecsEntry {
4956
optional int32 fip_region = 13;
5057
}
5158

59+
message SimulatorWelsegsHeaderEntry {
60+
string well_name = 1;
61+
double top_depth = 2;
62+
double top_length = 3;
63+
optional double wellbore_volume = 4;
64+
string info_type = 5;
65+
optional string pressure_omponents = 6;
66+
optional string flow_model = 7;
67+
}
68+
69+
message SimulatorWelsegsRowEntry {
70+
int32 segment_1 = 1;
71+
int32 segment_2 = 2;
72+
int32 branch = 3;
73+
int32 join_segment = 4;
74+
double length = 5;
75+
double depth = 6;
76+
optional double diameter = 7;
77+
optional double roughness = 8;
78+
optional string description = 9;
79+
}
80+
81+
message SimulatorWelsegsEntry {
82+
SimulatorWelsegsHeaderEntry header = 1;
83+
repeated SimulatorWelsegsRowEntry row = 2;
84+
}
85+
86+
message SimulatorCompsegsEntry {
87+
int32 i = 1;
88+
int32 j = 2;
89+
int32 k = 3;
90+
int32 branch = 4;
91+
double distance_start = 5;
92+
double distance_end = 6;
93+
optional string grid_name = 7;
94+
}
95+
96+
message SimulatorWsegvalvEntry {
97+
string well_name = 1;
98+
int32 segment_number = 2;
99+
double cv = 3;
100+
double area = 4;
101+
optional double extra_length = 5;
102+
optional double pipe_d = 6;
103+
optional double roughness = 7;
104+
optional double pipe_a = 8;
105+
optional string status = 9;
106+
optional double max_a = 10;
107+
}
108+
109+
message SimulatorWsegaicdEntry {
110+
string well_name = 1;
111+
int32 segment_1 = 2;
112+
int32 segment_2 = 3;
113+
double strength = 4;
114+
optional double length = 5;
115+
optional double density_cali = 6;
116+
optional double viscosity_cali = 7;
117+
optional double critical_value = 8;
118+
optional double width_trans = 9;
119+
optional double max_visc_ratio = 10;
120+
optional int32 method_scaling_factor = 11;
121+
double max_abs_rate = 12;
122+
double flow_rate_exponent = 13;
123+
double visc_exponent = 14;
124+
optional string status = 15;
125+
optional double oil_flow_fraction = 16;
126+
optional double water_flow_fraction = 17;
127+
optional double gas_flow_fraction = 18;
128+
optional double oil_visc_fraction = 19;
129+
optional double water_visc_fraction = 20;
130+
optional double gas_visc_fraction = 21;
131+
optional string description = 22;
132+
}
133+
52134
message SimulatorTableData {
53135
repeated SimulatorCompdatEntry compdat = 1;
54136
repeated SimulatorWelspecsEntry welspecs = 2;
137+
repeated SimulatorWelsegsEntry welsegs = 3;
138+
repeated SimulatorCompsegsEntry compsegs = 4;
139+
repeated SimulatorWsegvalvEntry wsegvalv = 5;
140+
repeated SimulatorWsegaicdEntry wsegaicd = 6;
55141
}
56142

docs/rips/generated/SimulatorTables_pb2.py

Lines changed: 23 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/rips/generated/SimulatorTables_pb2_grpc.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ def __init__(self, channel):
3939
request_serializer=SimulatorTables__pb2.SimulatorTableRequest.SerializeToString,
4040
response_deserializer=SimulatorTables__pb2.SimulatorTableData.FromString,
4141
_registered_method=True)
42+
self.GetCompletionDataUnified = channel.unary_unary(
43+
'/rips.WellPath/GetCompletionDataUnified',
44+
request_serializer=SimulatorTables__pb2.SimulatorTableUnifiedRequest.SerializeToString,
45+
response_deserializer=SimulatorTables__pb2.SimulatorTableData.FromString,
46+
_registered_method=True)
4247

4348

4449
class WellPathServicer(object):
@@ -50,6 +55,12 @@ def GetCompletionData(self, request, context):
5055
context.set_details('Method not implemented!')
5156
raise NotImplementedError('Method not implemented!')
5257

58+
def GetCompletionDataUnified(self, request, context):
59+
"""Missing associated documentation comment in .proto file."""
60+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
61+
context.set_details('Method not implemented!')
62+
raise NotImplementedError('Method not implemented!')
63+
5364

5465
def add_WellPathServicer_to_server(servicer, server):
5566
rpc_method_handlers = {
@@ -58,6 +69,11 @@ def add_WellPathServicer_to_server(servicer, server):
5869
request_deserializer=SimulatorTables__pb2.SimulatorTableRequest.FromString,
5970
response_serializer=SimulatorTables__pb2.SimulatorTableData.SerializeToString,
6071
),
72+
'GetCompletionDataUnified': grpc.unary_unary_rpc_method_handler(
73+
servicer.GetCompletionDataUnified,
74+
request_deserializer=SimulatorTables__pb2.SimulatorTableUnifiedRequest.FromString,
75+
response_serializer=SimulatorTables__pb2.SimulatorTableData.SerializeToString,
76+
),
6177
}
6278
generic_handler = grpc.method_handlers_generic_handler(
6379
'rips.WellPath', rpc_method_handlers)
@@ -95,3 +111,30 @@ def GetCompletionData(request,
95111
timeout,
96112
metadata,
97113
_registered_method=True)
114+
115+
@staticmethod
116+
def GetCompletionDataUnified(request,
117+
target,
118+
options=(),
119+
channel_credentials=None,
120+
call_credentials=None,
121+
insecure=False,
122+
compression=None,
123+
wait_for_ready=None,
124+
timeout=None,
125+
metadata=None):
126+
return grpc.experimental.unary_unary(
127+
request,
128+
target,
129+
'/rips.WellPath/GetCompletionDataUnified',
130+
SimulatorTables__pb2.SimulatorTableUnifiedRequest.SerializeToString,
131+
SimulatorTables__pb2.SimulatorTableData.FromString,
132+
options,
133+
channel_credentials,
134+
insecure,
135+
call_credentials,
136+
compression,
137+
wait_for_ready,
138+
timeout,
139+
metadata,
140+
_registered_method=True)

0 commit comments

Comments
 (0)