Skip to content

Commit

Permalink
Minor fixes in names and types;
Browse files Browse the repository at this point in the history
Change the casing enumeration schema;

PWPA-1933
  • Loading branch information
Gabriel Antão committed Jun 20, 2024
1 parent 000406b commit 81c9b1d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
inner_roughness: 0.05
material: X-80
material_above_filler: fluid_default
name: SURFACE_CASING_2
name: SURFACE_CASING_1
outer_diameter: 18.0
settings_depth: 3490.0
top_of_filler: 2072.0
Expand All @@ -27,7 +27,7 @@
inner_roughness: 0.05
material: N-80
material_above_filler: fluid_default
name: PRODUCTION_CASING_3
name: PRODUCTION_CASING_1
outer_diameter: 11.875
settings_depth: 3072.0
top_of_filler: 4905.0
Expand All @@ -38,7 +38,7 @@
inner_roughness: 0.05
material: C-110 HC
material_above_filler: fluid_default
name: PRODUCTION_CASING_4
name: PRODUCTION_CASING_2
outer_diameter: 10.75
settings_depth: 5441.0
top_of_filler: 4905.0
Expand All @@ -49,7 +49,7 @@
inner_roughness: 0.05
material: SDSS/125KSI
material_above_filler: fluid_default
name: PRODUCTION_CASING_5
name: PRODUCTION_CASING_3
outer_diameter: 10.75
settings_depth: 5607.0
top_of_filler: 4905.0
3 changes: 1 addition & 2 deletions src/alfasim_score/converter/alfacase/convert_alfacase.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ def _convert_formation(self) -> AnnulusDescription:
def _convert_casing_list(self) -> List[CasingSectionDescription]:
"""Create the description for the casings."""
casing_sections = []
i = 1
for data in self.score_input.read_casings():
for section in data["sections"]:
for i, section in enumerate(data["sections"], 1):
casing_sections.append(
CasingSectionDescription(
name=f"{data['function'].value}_{data['type'].value}_{i}",
Expand Down
12 changes: 6 additions & 6 deletions src/alfasim_score/converter/alfacase/score_input_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def read_packer_fluid(self) -> List[Dict[str, Union[Scalar, str]]]:
def read_casings(self) -> List[Dict[str, Any]]:
"""Read the data for the casing from SCORE input file"""
casing_data = []
for item in self.input_content["operation"]["thermal_simulation"]["well_strings"]:
for item in self.input_content["well_strings"]:
if item["interval"] != WellItemFunction.OPEN.value:
casing_data.append(
{
Expand Down Expand Up @@ -190,7 +190,7 @@ def read_casings(self) -> List[Dict[str, Any]]:
)
return casing_data

def read_tubing(self) -> List[Dict[str, Union[Scalar, str]]]:
def read_tubing(self) -> List[Dict[str, Any]]:
"""Read the data for the tubing from SCORE input file"""
tubing_data = []
for section in self.input_content["operation"]["tubing_string"]["string_sections"]:
Expand Down Expand Up @@ -223,13 +223,13 @@ def read_packers(self) -> List[Dict[str, Union[Scalar, str]]]:

def read_open_hole(self) -> List[Dict[str, Scalar]]:
"""Read the data for the open hole from SCORE input file"""
casing_data = []
for section in self.input_content["operation"]["thermal_simulation"]["well_strings"]:
open_hole_data = []
for section in self.input_content["well_strings"]:
if section["interval"] == WellItemFunction.OPEN.value:
casing_data.append(
open_hole_data.append(
{
"final_md": Scalar(section["final_md"], LENGTH_UNIT, "length"),
"hole_diameter": Scalar(section["hole_size"], DIAMETER_UNIT, "diameter"),
}
)
return casing_data
return open_hole_data

0 comments on commit 81c9b1d

Please sign in to comment.