Skip to content

Commit

Permalink
Fix test rebase conflict;
Browse files Browse the repository at this point in the history
PWPA-1971
  • Loading branch information
Gabriel Antão committed Jul 5, 2024
1 parent eb44ad6 commit dfcabd3
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ nodes:
source_type: mass_source_type_all_volumetric_flow_rates
volumetric_flow_rates_std:
gas:
value: 345000.0
value: -345000.0
unit: sm3/d
oil:
value: 1500.0
value: -1500.0
unit: sm3/d
water:
value: 7500.0
value: -7500.0
unit: sm3/d
total_mass_flow_rate:
value: 1.0
Expand Down Expand Up @@ -303,7 +303,7 @@ nodes:
unit: '-'
temperature:
value: 60.0
unit: psi
unit: degC
source_type: mass_source_type_all_volumetric_flow_rates
volumetric_flow_rates_std:
gas:
Expand Down Expand Up @@ -947,12 +947,44 @@ wells:
bottom_node: WELLBORE_BOTTOM_NODE
environment:
thermal_model: steady_state_heat_transfer
position_input_mode: position_by_md
position_input_mode: position_by_tvd
reference_y_coordinate:
value: 0.0
unit: m
md_properties_table: []
tvd_properties_table: []
tvd_properties_table:
- position:
value: 2072.0
unit: m
temperature:
value: 4.44
unit: degC
type: walls_and_environment_heat_transfer_coefficient
heat_transfer_coefficient:
value: 1000.0
unit: W/m2.K
overall_heat_transfer_coefficient:
value: 0.0
unit: W/m2.K
fluid_velocity:
value: 0.0
unit: m/s
- position:
value: 5735.0
unit: m
temperature:
value: 106.04
unit: degC
type: walls_and_environment_heat_transfer_coefficient
heat_transfer_coefficient:
value: 1000.0
unit: W/m2.K
overall_heat_transfer_coefficient:
value: 0.0
unit: W/m2.K
fluid_velocity:
value: 0.0
unit: m/s
initial_conditions:
pressures:
position_input_type: length
Expand Down
10 changes: 6 additions & 4 deletions src/alfasim_score/converter/alfacase/base_operation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import List

import attr
from alfasim_sdk import MassInflowSplitType
from alfasim_sdk import MassSourceNodePropertiesDescription
from alfasim_sdk import MassSourceType
from alfasim_sdk import MultiInputType
Expand Down Expand Up @@ -29,10 +30,11 @@ def build_nodes(self) -> List[NodeDescription]:
temperature_input_type=MultiInputType.Constant,
source_type=MassSourceType.AllVolumetricFlowRates,
volumetric_flow_rates_std={
"gas": operation_data["gas_oil_ratio"].GetValue()
"gas": -1.0
* operation_data["gas_oil_ratio"].GetValue()
* operation_data["oil_flow_rate"],
"oil": operation_data["oil_flow_rate"],
"water": operation_data["water_flow_rate"],
"oil": -1.0 * operation_data["oil_flow_rate"],
"water": -1.0 * operation_data["water_flow_rate"],
},
),
),
Expand All @@ -41,7 +43,7 @@ def build_nodes(self) -> List[NodeDescription]:
pressure_properties=PressureNodePropertiesDescription(
temperature=operation_data["flow_initial_temperature"],
pressure=operation_data["flow_initial_pressure"],
split_type=self._get_mass_split(),
split_type=MassInflowSplitType.Pvt,
),
),
]
Expand Down
10 changes: 0 additions & 10 deletions src/alfasim_score/converter/alfacase/convert_alfacase.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,6 @@ def __init__(self, score_reader: ScoreInputReader):
self.general_data = score_reader.read_general_data()
self.well_start_position = self.general_data["water_depth"] + self.general_data["air_gap"]

def _get_mass_split(self) -> MassInflowSplitType:
"""Check if the end of well trajectory is above the reservoir."""
threshold_distance = Scalar(100.0, LENGTH_UNIT)
well_trajectory_end = self.score_input.read_general_data()["final_md"]
reservoir_position = self.score_input.read_operation_data()["perforation_base_depth"]
# TODO: check the returned massinflow splits used here....
if reservoir_position - well_trajectory_end > threshold_distance:
return MassInflowSplitType.ConstantVolumeFraction
return MassInflowSplitType.Pvt

def _get_position_in_well(self, position: Scalar) -> Scalar:
"""Get the position relative to the well start position."""
return position - self.well_start_position
Expand Down
2 changes: 1 addition & 1 deletion src/alfasim_score/converter/alfacase/score_input_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def read_operation_method_data(self) -> Dict[str, Any]:
return {
"well_head_pressure": Scalar(method_data["well_head_pressure"], PRESSURE_UNIT),
"well_head_temperature": Scalar(
method_data["well_head_temperature"], PRESSURE_UNIT
method_data["well_head_temperature"], TEMPERATURE_UNIT
),
"fluid": method_data["fluid_type"],
"valve_depth": Scalar(method_data["valve_depth"], LENGTH_UNIT),
Expand Down

0 comments on commit dfcabd3

Please sign in to comment.