diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..be006de --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +# Keep GitHub Actions up to date with GitHub's Dependabot... +# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot +# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + groups: + github-actions: + patterns: + - "*" # Group all Actions updates into a single larger pull request + schedule: + interval: weekly diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0f700e3..492f95a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,13 +12,16 @@ jobs: if: startsWith(github.event.ref, 'refs/tags') runs-on: ubuntu-latest + permissions: + contents: write + id-token: write steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.x" - name: Install build run: | python -m pip install --upgrade pip @@ -27,11 +30,8 @@ jobs: run: | python -m build - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.pypi_token }} + uses: pypa/gh-action-pypi-publish@v1.12.3 - name: GitHub Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: files: dist/* diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index c863c90..8c726a9 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: # Disabling shallow clone is recommended for improving relevancy of reporting fetch-depth: 0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 98ebeee..564399f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,10 +20,10 @@ jobs: os: [ubuntu-latest, windows-latest] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} @@ -37,7 +37,7 @@ jobs: tox -e py - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 + uses: codecov/codecov-action@v5.1.1 with: token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true diff --git a/README.rst b/README.rst index eaead1b..fe3cd14 100644 --- a/README.rst +++ b/README.rst @@ -32,7 +32,32 @@ Features ----------- * Converter from Score input JSON to Alfacase -* Parser for the ALFAsim results +* Parser for the ALFAsim results and generate a JSON compatible with SCORE + +How to use it +------------- +#. First, the user needs to create an instance of the converter:: + + from pathlib import Path + from alfasim_score.converter.alfacase.alfasim_score_converter import AlfasimScoreConverter + # path indicating where the SCORE input file is + score_input_filepath = Path("path/to/score_input.json") + # path indicating where the output file (converted from ALFAsim results) should be created + score_output_filepath = Path("path/to/score_output_result.json") + # then create a converter instance + converter = AlfasimScoreConverter(score_input_filepath, score_output_filepath) + +#. To convert the SCORE input into an alfacase file, the user can do the following:: + + alfacase_filepath = Path("path/where/save/converted_score.alfacase") + converter.generate_alfasim_input_file(alfacase_filepath) + +#. Run the ALFAsim with the generated file (and the pvt tables in the same folder) + +#. Once the result file of ALFAsim is generated, one can call the converter for the output file:: + + alfasim_results_directory = Path("path/to/alfasim_results_folder") + converter.generate_score_output_file(alfasim_results_directory) Development @@ -91,7 +116,7 @@ Ex.: v1.0.5 1. Create a ``release-VERSION`` branch from ``upstream/master``. 2. Update ``CHANGELOG.rst``. 3. Push a branch with the changes. -4. Once all builds pass, push a ``VERSION`` tag to ``upstream``. +4. Once all builds pass, push a ``VERSION`` tag to ``upstream``. Ex: ``git tag v1.0.5; git push origin --tags`` 5. Merge the PR. diff --git a/src/alfasim_score/common.py b/src/alfasim_score/common.py index 27a0b7c..3f3f2b1 100644 --- a/src/alfasim_score/common.py +++ b/src/alfasim_score/common.py @@ -11,7 +11,6 @@ from dataclasses import dataclass from dataclasses import field from enum import Enum -from pathlib import Path from alfasim_score.constants import AIR_DENSITY_STANDARD from alfasim_score.constants import WATER_DENSITY_STANDARD diff --git a/src/alfasim_score/conftest.py b/src/alfasim_score/conftest.py index 7e77f9b..ac53db8 100644 --- a/src/alfasim_score/conftest.py +++ b/src/alfasim_score/conftest.py @@ -1,16 +1,6 @@ import pytest -from alfasim_sdk import PluginDescription -from barril.units import Array -from barril.units import Scalar -from enum import Enum from pathlib import Path -from alfasim_score.common import Annuli -from alfasim_score.common import Annulus -from alfasim_score.common import AnnulusDepthTable -from alfasim_score.common import AnnulusModeType -from alfasim_score.common import FluidModelPvt -from alfasim_score.common import SolidMechanicalProperties from alfasim_score.converter.alfacase.base_operation import BaseOperationBuilder from alfasim_score.converter.alfacase.convert_alfacase import ScoreAlfacaseConverter from alfasim_score.converter.alfacase.injection_operation import InjectionOperationBuilder @@ -33,20 +23,24 @@ def alfacase_gas_lift(score_input_gas_lift: ScoreInputReader) -> ScoreAlfacaseCo @pytest.fixture -def base_operation_gas_lift(shared_datadir: Path) -> BaseOperationBuilder: - return BaseOperationBuilder(shared_datadir / SCORE_GAS_LIFT_EXAMPLE_FILENAME) +def base_operation_gas_lift(score_input_gas_lift: ScoreInputReader) -> BaseOperationBuilder: + return BaseOperationBuilder(score_input_gas_lift) @pytest.fixture -def production_operation_gas_lift(shared_datadir: Path) -> ProductionOperationBuilder: - return ProductionOperationBuilder(shared_datadir / SCORE_GAS_LIFT_EXAMPLE_FILENAME) +def production_operation_gas_lift( + score_input_gas_lift: ScoreInputReader, +) -> ProductionOperationBuilder: + return ProductionOperationBuilder(score_input_gas_lift) @pytest.fixture def production_operation_natural_flow(shared_datadir: Path) -> ProductionOperationBuilder: - return ProductionOperationBuilder(shared_datadir / SCORE_NATURAL_FLOW_EXAMPLE_FILENAME) + score_input_reader = ScoreInputReader(shared_datadir / SCORE_NATURAL_FLOW_EXAMPLE_FILENAME) + return ProductionOperationBuilder(score_input_reader) @pytest.fixture def injection_operation(shared_datadir: Path) -> InjectionOperationBuilder: - return InjectionOperationBuilder(shared_datadir / SCORE_INJECTION_EXAMPLE_FILENAME) + score_input_reader = ScoreInputReader(shared_datadir / SCORE_INJECTION_EXAMPLE_FILENAME) + return InjectionOperationBuilder(score_input_reader) diff --git a/src/alfasim_score/constants.py b/src/alfasim_score/constants.py index bdae730..b517667 100644 --- a/src/alfasim_score/constants.py +++ b/src/alfasim_score/constants.py @@ -9,7 +9,6 @@ from alfasim_score.units import PRESSURE_UNIT from alfasim_score.units import ROUGHNESS_UNIT from alfasim_score.units import STD_VOLUMETRIC_FLOW_RATE_UNIT -from alfasim_score.units import TIME_UNIT WELLBORE_NAME = "WELLBORE" WELLBORE_TOP_NODE_NAME = "WELLBORE_TOP_NODE" @@ -64,3 +63,6 @@ # set default value for annulus for the plugin APB # there is no such option in the SCORE input so use this default value HAS_FLUID_RETURN = True + +# total number of walls in the output +TOTAL_WALLS = 6 diff --git a/src/alfasim_score/converter/alfacase/_tests/data/case.data/results/results_00000 b/src/alfasim_score/converter/alfacase/_tests/data/case.data/results/results_00000 index e74a841..2814722 100644 Binary files a/src/alfasim_score/converter/alfacase/_tests/data/case.data/results/results_00000 and b/src/alfasim_score/converter/alfacase/_tests/data/case.data/results/results_00000 differ diff --git a/src/alfasim_score/converter/alfacase/_tests/test_build_injection_alfacase/test_create_alfacase_injection.alfacase b/src/alfasim_score/converter/alfacase/_tests/test_build_injection_alfacase/test_create_alfacase_injection.alfacase index 52a67a1..9c56773 100644 --- a/src/alfasim_score/converter/alfacase/_tests/test_build_injection_alfacase/test_create_alfacase_injection.alfacase +++ b/src/alfasim_score/converter/alfacase/_tests/test_build_injection_alfacase/test_create_alfacase_injection.alfacase @@ -444,6 +444,22 @@ outputs: - mixture temperature - pressure - environment temperature + - annulus_a_temperature + - annulus_b_temperature + - annulus_c_temperature + - annulus_d_temperature + - annulus_e_temperature + - annulus_a_pressure + - annulus_b_pressure + - annulus_c_pressure + - annulus_d_pressure + - annulus_e_pressure + - wall_0_temperature + - wall_1_temperature + - wall_2_temperature + - wall_3_temperature + - wall_4_temperature + - wall_5_temperature location: main element_name: WELLBORE profile_frequency: diff --git a/src/alfasim_score/converter/alfacase/_tests/test_build_production_alfacase/test_create_alfacase_gas_lift_production.alfacase b/src/alfasim_score/converter/alfacase/_tests/test_build_production_alfacase/test_create_alfacase_gas_lift_production.alfacase index 23d84df..66cdcde 100644 --- a/src/alfasim_score/converter/alfacase/_tests/test_build_production_alfacase/test_create_alfacase_gas_lift_production.alfacase +++ b/src/alfasim_score/converter/alfacase/_tests/test_build_production_alfacase/test_create_alfacase_gas_lift_production.alfacase @@ -455,6 +455,22 @@ outputs: - mixture temperature - pressure - environment temperature + - annulus_a_temperature + - annulus_b_temperature + - annulus_c_temperature + - annulus_d_temperature + - annulus_e_temperature + - annulus_a_pressure + - annulus_b_pressure + - annulus_c_pressure + - annulus_d_pressure + - annulus_e_pressure + - wall_0_temperature + - wall_1_temperature + - wall_2_temperature + - wall_3_temperature + - wall_4_temperature + - wall_5_temperature location: main element_name: WELLBORE profile_frequency: diff --git a/src/alfasim_score/converter/alfacase/_tests/test_build_production_alfacase/test_create_alfacase_natural_flow_production.alfacase b/src/alfasim_score/converter/alfacase/_tests/test_build_production_alfacase/test_create_alfacase_natural_flow_production.alfacase index b99a3c3..0693e48 100644 --- a/src/alfasim_score/converter/alfacase/_tests/test_build_production_alfacase/test_create_alfacase_natural_flow_production.alfacase +++ b/src/alfasim_score/converter/alfacase/_tests/test_build_production_alfacase/test_create_alfacase_natural_flow_production.alfacase @@ -455,6 +455,22 @@ outputs: - mixture temperature - pressure - environment temperature + - annulus_a_temperature + - annulus_b_temperature + - annulus_c_temperature + - annulus_d_temperature + - annulus_e_temperature + - annulus_a_pressure + - annulus_b_pressure + - annulus_c_pressure + - annulus_d_pressure + - annulus_e_pressure + - wall_0_temperature + - wall_1_temperature + - wall_2_temperature + - wall_3_temperature + - wall_4_temperature + - wall_5_temperature location: main element_name: WELLBORE profile_frequency: diff --git a/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase.py b/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase.py index 5c15884..d8310ad 100644 --- a/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase.py +++ b/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase.py @@ -2,7 +2,7 @@ from pathlib import Path from pytest_regressions.file_regression import FileRegressionFixture -from alfasim_score.converter.alfacase.converter_main import convert_score_to_alfacase +from alfasim_score.converter.alfacase.alfasim_score_converter import AlfasimScoreConverter @pytest.mark.parametrize( @@ -12,8 +12,11 @@ def test_create_alfacase_file( shared_datadir: Path, datadir: Path, file_regression: FileRegressionFixture, score_filename: str ) -> None: score_input = shared_datadir / f"{score_filename}.json" - alfacase_output = datadir / f"{score_filename}.alfacase" - convert_score_to_alfacase(score_input, alfacase_output) + converted_alfacase_filepath = datadir / f"{score_filename}.alfacase" + converter = AlfasimScoreConverter(score_input, Path("score_output/dummy.json")) + converter.generate_alfasim_input_file(converted_alfacase_filepath) file_regression.check( - alfacase_output.read_text(encoding="utf-8"), encoding="utf-8", extension=".alfacase" + converted_alfacase_filepath.read_text(encoding="utf-8"), + encoding="utf-8", + extension=".alfacase", ) diff --git a/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase_file_score_input_injection_operation_.alfacase b/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase_file_score_input_injection_operation_.alfacase index 52a67a1..9c56773 100644 --- a/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase_file_score_input_injection_operation_.alfacase +++ b/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase_file_score_input_injection_operation_.alfacase @@ -444,6 +444,22 @@ outputs: - mixture temperature - pressure - environment temperature + - annulus_a_temperature + - annulus_b_temperature + - annulus_c_temperature + - annulus_d_temperature + - annulus_e_temperature + - annulus_a_pressure + - annulus_b_pressure + - annulus_c_pressure + - annulus_d_pressure + - annulus_e_pressure + - wall_0_temperature + - wall_1_temperature + - wall_2_temperature + - wall_3_temperature + - wall_4_temperature + - wall_5_temperature location: main element_name: WELLBORE profile_frequency: diff --git a/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase_file_score_input_natural_flow_.alfacase b/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase_file_score_input_natural_flow_.alfacase index b99a3c3..0693e48 100644 --- a/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase_file_score_input_natural_flow_.alfacase +++ b/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase_file_score_input_natural_flow_.alfacase @@ -455,6 +455,22 @@ outputs: - mixture temperature - pressure - environment temperature + - annulus_a_temperature + - annulus_b_temperature + - annulus_c_temperature + - annulus_d_temperature + - annulus_e_temperature + - annulus_a_pressure + - annulus_b_pressure + - annulus_c_pressure + - annulus_d_pressure + - annulus_e_pressure + - wall_0_temperature + - wall_1_temperature + - wall_2_temperature + - wall_3_temperature + - wall_4_temperature + - wall_5_temperature location: main element_name: WELLBORE profile_frequency: diff --git a/src/alfasim_score/converter/alfacase/_tests/test_convert_base_alfacase/test_create_alfacase_base_operation_configuration.alfacase b/src/alfasim_score/converter/alfacase/_tests/test_convert_base_alfacase/test_create_alfacase_base_operation_configuration.alfacase index 9840cba..6cd8883 100644 --- a/src/alfasim_score/converter/alfacase/_tests/test_convert_base_alfacase/test_create_alfacase_base_operation_configuration.alfacase +++ b/src/alfasim_score/converter/alfacase/_tests/test_convert_base_alfacase/test_create_alfacase_base_operation_configuration.alfacase @@ -434,6 +434,22 @@ outputs: - mixture temperature - pressure - environment temperature + - annulus_a_temperature + - annulus_b_temperature + - annulus_c_temperature + - annulus_d_temperature + - annulus_e_temperature + - annulus_a_pressure + - annulus_b_pressure + - annulus_c_pressure + - annulus_d_pressure + - annulus_e_pressure + - wall_0_temperature + - wall_1_temperature + - wall_2_temperature + - wall_3_temperature + - wall_4_temperature + - wall_5_temperature location: main element_name: WELLBORE profile_frequency: diff --git a/src/alfasim_score/converter/alfacase/_tests/test_output_results.py b/src/alfasim_score/converter/alfacase/_tests/test_output_results.py index 9b46512..f6aaf52 100644 --- a/src/alfasim_score/converter/alfacase/_tests/test_output_results.py +++ b/src/alfasim_score/converter/alfacase/_tests/test_output_results.py @@ -1,25 +1,22 @@ -import json -import pandas as pd -import pytest -from barril.units import Scalar from pathlib import Path from pytest_regressions.file_regression import FileRegressionFixture from alfasim_score.common import AnnulusLabel -from alfasim_score.converter.alfacase.score_output_generator import ScoreOutputGenerator +from alfasim_score.converter.alfacase.alfasim_score_converter import AlfasimScoreConverter def test_generate_output_file_results( shared_datadir: Path, datadir: Path, file_regression: FileRegressionFixture ) -> None: - alfasim_results_directory = shared_datadir / "case.data" - well_start_position = Scalar(2072, "m") - active_annuli = [AnnulusLabel.A, AnnulusLabel.B, AnnulusLabel.C] - output_generator = ScoreOutputGenerator( - alfasim_results_directory, well_start_position, active_annuli - ) - output_generator.element_name = "7-SRR-2-RJS (2022-07-28_15-01-27)" - output_filepath = datadir / "output_score.json" - output_generator.generate_output_file(datadir / "output_score.json") - output_content = output_filepath.read_text(encoding="utf-8") + alfasim_results_path = shared_datadir / "case.data" + # dummy input file just to have the reader for this test + score_input_file = shared_datadir / "score_input_natural_flow.json" + output_file = datadir / "output_score.json" + converter = AlfasimScoreConverter(score_input_file, output_file) + # change the element name to match this test result well name + converter.output_builder.element_name = "7-SRR-2-RJS (2022-07-28_15-01-27)" + # TODO: remember to get these annuli inside the output class + converter.output_builder.active_annuli = [AnnulusLabel.A, AnnulusLabel.B, AnnulusLabel.C] + converter.generate_score_output_file(alfasim_results_path) + output_content = converter.output_builder.score_output_filepath.read_text(encoding="utf-8") file_regression.check(output_content, extension=".json", encoding="utf-8") diff --git a/src/alfasim_score/converter/alfacase/_tests/test_output_results/test_generate_output_file_results.json b/src/alfasim_score/converter/alfacase/_tests/test_output_results/test_generate_output_file_results.json index c4a0e56..ce7d2bd 100644 --- a/src/alfasim_score/converter/alfacase/_tests/test_output_results/test_generate_output_file_results.json +++ b/src/alfasim_score/converter/alfacase/_tests/test_output_results/test_generate_output_file_results.json @@ -158,79 +158,79 @@ ], "final": [ 4.0, - 52.65062702931107, - 54.48615360711608, - 55.334132197981944, - 56.01932573589295, - 56.7805873197961, - 57.381708930551326, - 58.064889585715946, - 58.46481975710333, - 58.84299419174397, - 59.22248281789837, - 59.59160009161201, - 59.94887826865738, - 60.29468056094993, - 60.62998175756013, - 61.052194934487716, - 61.579721449310284, - 61.87462469133584, - 62.160119364960394, - 62.43467148864943, - 62.69226321812164, - 63.03653916455875, - 63.23015099315097, - 63.43362957146405, - 63.75286426962572, - 63.91065604932942, - 64.0661547866942, - 64.23477543540434, - 64.46817531584838, - 64.60176903262561, - 64.73360278751932, - 64.86700839763608, - 64.99475354938846, - 65.12452332017705, - 65.2481954909581, - 65.37384313736379, - 65.47734514790989, - 65.72518201011258, - 65.84292325106969, - 65.95528097012448, - 66.06599282523177, - 66.1744110111755, - 66.2848869709336, - 66.38977506988135, - 66.49175302555705, - 66.59469497811199, - 66.77270922340324, - 66.8374221783788, - 66.89945733530624, - 66.96404992005819, - 66.97425476878146, - 67.1440090052862, - 67.14713329164124, - 67.31463532993342, - 67.36794328327642, - 67.42289205674786, - 67.48110263994045, - 67.55494865682442, - 67.60393970738653, - 67.60922829588333, - 67.6509306233026, - 67.69372511929055, - 67.73185236053007, - 67.75279104237495, - 69.25291558750399, - 70.6508374871787, - 71.54026358371522, - 72.92003582314385, - 74.3649741210412, - 75.77280406339344, - 77.17743849273813, - 78.6108492841899, - 80.00203667369317, - 80.86551653407275, + 43.0074790950091, + 45.06995331988969, + 46.040598967900905, + 47.14185885178813, + 48.0426110690849, + 49.072134717905556, + 49.91754629550553, + 50.50316011012774, + 51.08328340952869, + 51.665064614057655, + 52.23859343960646, + 52.80293690114661, + 53.3582130560352, + 53.905206007288825, + 54.73388789980811, + 55.44672675540119, + 55.96673226151461, + 56.486678898678406, + 56.984944657317556, + 57.48369532082427, + 58.90176920217664, + 59.274569291978594, + 59.85387146479553, + 60.19911583020178, + 60.40112945755516, + 60.598251298162666, + 61.08931141890116, + 61.35112433329425, + 61.52550310848892, + 61.6997600881549, + 61.87403891648387, + 62.044832576634235, + 62.21604186973457, + 62.38340286237076, + 62.55113744355356, + 62.75653281979896, + 63.032305177674175, + 63.19340643878775, + 63.349903009435025, + 63.505036159356564, + 63.65969400028837, + 63.8147759801185, + 63.9650964257213, + 64.1144516579381, + 64.26479975768927, + 65.40828421955854, + 65.50038000871916, + 65.59092204735339, + 65.68315353820037, + 65.75868002153288, + 65.9479167848686, + 66.01888392817318, + 66.2062864136127, + 66.2880745732258, + 66.3735967347933, + 66.49059685116259, + 66.77849435604526, + 66.89168760922911, + 67.01411658825793, + 67.1794114921056, + 67.3515820136322, + 67.53045572980488, + 67.76567804450076, + 69.24011830090274, + 70.63212037190169, + 71.50479621725799, + 72.88208494383304, + 74.32483680208657, + 75.73078479061104, + 77.13385249971259, + 78.56620049846913, + 79.95707891627353, + 80.8229823702253, 81.38448532358734 ] }, @@ -313,60 +313,60 @@ -0.0 ], "final": [ - 7708.406553074917, - 7860.727587936746, - 8002.585231809651, - 8073.5125777562625, - 8218.80753232753, - 8289.73053777495, - 8433.289979671521, - 8505.941417644784, - 8573.404401896025, - 8644.327570177125, - 8715.251410387746, - 8786.175664371653, - 8857.100206628282, - 8928.02561870106, - 8998.953977181523, - 9144.263647809421, - 9215.197452244465, - 9286.132859391533, - 9358.801140611506, - 9428.009857558658, - 9500.679022370143, - 9571.613474990523, - 9639.076329602323, - 9786.034738624288, - 9858.618229656735, - 9931.173005003482, - 10000.246833530993, - 10119.485489940642, - 10190.467906769372, - 10261.52772993214, - 10334.352859790983, - 10405.45795975766, - 10478.309375543238, - 10549.438339580092, - 10622.314417265043, - 10693.467653093052, - 10834.06374047651, - 10906.988814957977, - 10978.189664651563, - 11049.40359930697, - 11120.630467128396, - 11193.607404530778, - 11264.85967508613, - 11336.12463261982, - 11409.140821756882, - 11482.170405194285, - 11553.4713650547, - 11624.78655999733, - 11697.85561772535, - 11769.199619209205, - 11911.920846390023, - 11983.30822864118, - 12127.857955595113, - 12199.289212495589, + 6262.896646512984, + 6415.297192503928, + 6557.211693245237, + 6628.163048812234, + 6773.473001245373, + 6844.398185189282, + 6987.92718116429, + 7060.556941349862, + 7127.992820438015, + 7198.87947312992, + 7269.758768596895, + 7340.630356826322, + 7411.493999395101, + 7482.3501747575565, + 7553.200862718333, + 7698.317850717317, + 7769.150435026675, + 7839.975631138989, + 7912.521409480809, + 7981.604744000524, + 8054.132373272578, + 8124.885158654661, + 8192.168474603855, + 8338.70446970056, + 8411.078623371977, + 8483.422489259492, + 8552.294052851172, + 8671.161828436338, + 8741.922595862145, + 8812.759042349027, + 8885.353655008077, + 8956.232194797585, + 9028.849867067145, + 9099.749101654535, + 9172.388159892927, + 9243.308439454217, + 9383.436386703184, + 9456.117802477258, + 9527.07916078966, + 9598.051930918578, + 9669.035949530997, + 9741.762314608932, + 9812.768289483545, + 9883.785225620975, + 9956.545495796006, + 10029.317313265086, + 10100.32772372368, + 10171.351386458087, + 10244.120749564452, + 10315.171201368117, + 10457.300338309942, + 10528.391114409877, + 10672.335147829339, + 10743.46662941632, -0.0, -0.0, -0.0, @@ -549,79 +549,79 @@ ], "final": [ 4.0, - 33.264977908114076, - 35.55679707924776, - 36.65147980620981, - 38.174457986027164, - 39.21636300660418, - 40.67999232154176, - 41.68948986877126, - 42.46313051752139, - 43.247764712774256, - 44.03438429804129, - 44.81488447660496, - 45.588858645298046, - 46.35620146336919, - 47.11749220859792, - 48.35660894000381, - 49.25694081845688, - 50.00482656426891, - 50.7620837473396, - 51.48676456617329, - 52.22956618907307, - 54.739540661664705, - 55.29310640318465, - 56.251566808302414, - 56.622840790894884, - 56.86934131303633, - 57.1083303719937, - 57.9216977804457, - 58.212058588627656, - 58.427533623841384, - 58.64454132302649, - 58.86000476214542, - 59.07418085630809, - 59.28714677356106, - 59.49853684694824, - 59.70868184598726, - 60.01685165827564, - 60.32069008397713, - 60.525486722442565, - 60.726465983760306, - 60.92636657694055, - 61.127626426510005, - 61.32766002939297, - 61.523767054284235, - 61.720870616520415, - 61.918992866044846, - 64.03541971731079, - 64.15510300013841, - 64.274365632171, - 64.3944413471495, - 64.53580183106283, - 64.74463805557957, - 64.88397249032113, - 65.09139628353694, - 65.20189153331603, - 65.31820822272505, - 65.49444366498324, - 64.91801528364749, - 65.21183600234315, - 65.65541258915925, - 66.14597903555244, - 66.6411673139566, - 67.14579204308319, - 67.78491837817774, - 69.21825686358056, - 70.60000460726332, - 71.44138575731614, - 72.81350409203588, - 74.25163472976988, - 75.65358570572903, - 77.05329616051688, - 78.48332125065008, - 79.87350721850419, - 80.7439010968883, + 27.535592693844933, + 29.954925099584557, + 31.120192878419743, + 32.89732590096423, + 34.02054112958342, + 35.74549849432765, + 36.84926421021572, + 37.73454193274142, + 38.64108896686395, + 39.54976057478922, + 40.453665551542485, + 41.35255924021749, + 42.24642842717873, + 43.13571054473584, + 44.58531093644467, + 45.597193344471634, + 46.4834662154974, + 47.384827472207235, + 48.24696686216839, + 49.13822530648008, + 52.52933797393797, + 53.18170314490038, + 54.349223489378915, + 54.730440835298, + 54.99887261755447, + 55.25839199069242, + 55.92535857344535, + 56.230927573245026, + 56.471114766093365, + 56.71394887705878, + 56.95421129838081, + 57.19468068733511, + 57.432867114865246, + 57.671022987696006, + 57.906864399264464, + 58.279931335087895, + 58.59865821938752, + 58.83008719670573, + 59.05827182625319, + 59.28558605009465, + 59.51547104660176, + 59.743045196085745, + 59.967298910538716, + 60.19384009002249, + 60.42137272355512, + 60.579674678503466, + 60.78837490637483, + 60.999923881937264, + 61.208815974171216, + 61.56134516295765, + 61.82861823954477, + 62.182831375105536, + 62.44900087076769, + 62.65444339681562, + 62.863753010341156, + 63.219317185986995, + 62.58335330964485, + 63.12878390647552, + 64.01343196829384, + 64.93951583241403, + 65.85230786255693, + 66.75492424522184, + 67.79794804857403, + 69.19545297806604, + 70.56598377006117, + 71.36871024705056, + 72.73368910372488, + 74.16533935881591, + 75.56168983080534, + 76.95666802533282, + 78.38335686190135, + 79.77256123835082, + 80.64767205696262, 81.38448532358734 ] }, @@ -704,52 +704,52 @@ -0.0 ], "final": [ - 6520.115363781206, - 6673.504747400614, - 6816.322160678546, - 6887.719993084221, - 7033.90957629912, - 7105.258424121483, - 7249.60933937284, - 7322.648208886165, - 7390.456709015459, - 7461.726778293817, - 7532.9811592210035, - 7604.219409952731, - 7675.44117957569, - 7746.646847098898, - 7817.838308736726, - 7963.619235859524, - 8034.768230164906, - 8105.900550660506, - 8178.751043044106, - 8248.115573062512, - 8320.928264345996, - 8391.914944953538, - 8459.413683729139, - 8606.386981627498, - 8678.975924602408, - 8751.532591896332, - 8820.6050390101, - 8939.797559733972, - 9010.750393395185, - 9081.77739067387, - 9154.56545153836, - 9225.63113977044, - 9298.438693928601, - 9369.52156689647, - 9442.346884446028, - 9513.447239474366, - 9653.922665471362, - 9726.783024456425, - 9797.917263137422, - 9869.061083354922, - 9940.214309898598, - 10013.11204593166, - 10084.283460390623, - 10155.463952411152, - 10228.389757115408, - 10301.325096925517, + 5617.489310556395, + 5770.895989576697, + 5913.72046736307, + 5985.119524575953, + 6131.290985801907, + 6202.628206999704, + 6346.934534616617, + 6419.947397192766, + 6487.727639842088, + 6558.963239906711, + 6630.178386551493, + 6701.372575276901, + 6772.545386184104, + 6843.697125298332, + 6914.82962048523, + 7060.47248292713, + 7131.549896028314, + 7202.605149427923, + 7275.3708287076915, + 7344.649263956038, + 7417.365495896051, + 7488.222170352258, + 7555.593563830185, + 7702.272012930376, + 7774.715227780104, + 7847.125458905995, + 7916.057820578899, + 8035.018644733165, + 8105.833163465281, + 8176.720821679642, + 8249.365138917581, + 8320.28960192133, + 8392.951496889173, + 8463.89125770962, + 8536.568959796636, + 8607.524270101134, + 8747.708099591087, + 8820.416843462184, + 8891.402089669042, + 8962.395900373522, + 9033.398090885927, + 9106.140004417788, + 9177.158275334154, + 9248.184564428484, + 9320.95126475476, + 9393.726362103725, -0.0, -0.0, -0.0, @@ -863,26 +863,26 @@ "temperature": { "start": [ 4.0, - 7.969828803887253, - 9.862421605740451, - 11.78578827429044, - 13.709154942840485, - 15.617134678042078, - 17.540501346592066, - 18.786842947812488, - 20.017797615684515, - 21.279526150253332, - 22.541254684822093, - 23.80298321939091, - 25.064711753959728, - 26.326440288528545, - 28.249806957078533, - 30.17317362562858, - 31.434902160197396, - 32.71201762811461, - 33.97374616268337, - 35.23547469725219, - 36.5125901651694, + 8.455731962257744, + 10.579976269845758, + 12.738761135280697, + 14.897546000715693, + 17.03906058722714, + 19.197845452662136, + 20.59673804546395, + 21.978360359342332, + 23.394523231067694, + 24.810686102793, + 26.22684897451836, + 27.643011846243667, + 29.05917471796903, + 31.217959583403967, + 33.376744448838906, + 34.79290732056427, + 36.226340471213064, + 37.642503342938426, + 39.05866621466373, + 40.49209936531253, -273.15, -273.15, -273.15, @@ -940,105 +940,105 @@ ], "final": [ 4.0, - 22.10119818817418, - 24.638680928586155, - 25.869577087732353, - 27.884820534050164, - 29.08382763465795, - 31.05389872666092, - 32.24565696764773, - 33.235594387028414, - 34.2565449042325, - 35.27980422265557, - 36.29963749485739, - 37.31594317830775, - 38.328814110281996, - 39.33855861842062, - 40.97951314146144, - 42.096668909703226, - 43.11391510634206, - 44.151752131967044, - 45.14415485317983, - 46.176224862055506, - 50.43721118237437, - 51.18186960885595, - 52.545156209551294, - 52.93525359044543, - 53.22398900697783, - 53.50250883882086, - 53.10424744463256, - 53.43199983840543, - 53.70956677781419, - 53.991470813586375, - 54.26916929147444, - 54.54935593843243, - 54.82555448332437, - 55.10407345238502, - 55.37857894009238, - 55.85015809430581, - 56.19031421451609, - 56.46166231085715, - 56.73060421442557, - 56.998940396430385, - 57.271628917150224, - 57.540291392117524, - 57.806508248455884, - 58.07689682331579, - 58.34814523982766, - 56.795159923010715, - 57.10129499000948, - 57.41386316090069, - 57.71997440417226, - 58.30375158648667, - 58.63491350763718, - 59.224448554841615, - 59.5548569496022, - 59.86426031059602, - 60.17538333836916, - 60.72736849673015, - 60.781812083404645, - 61.52257533220768, - 62.75026717142396, - 64.01420018155096, - 65.25010245925034, - 66.4590871149818, - 67.8069838097258, - 69.1735571876651, - 70.53285043311388, - 71.2960324330636, - 72.65363070638205, - 74.07858996175366, - 75.46921129719391, - 76.85937935985135, - 78.28270240338759, - 79.67099885790174, - 80.54987195786123, + 19.464205735155474, + 22.05340304143556, + 23.314558841885287, + 25.453744708209797, + 26.68812668270175, + 28.785504310902525, + 30.01878409935796, + 31.061577586228168, + 32.14078201089848, + 33.222336166532784, + 34.30122345977156, + 35.37738895267012, + 36.450962648877976, + 37.52223124661168, + 39.12883573895863, + 40.30220453851513, + 41.39236711945375, + 42.506251867390006, + 43.571093627363894, + 44.68168308358645, + 46.666583070243234, + 47.65271359497973, + 49.526087259091355, + 49.912922022766224, + 50.23829077376979, + 50.55030942940857, + 50.92911777149948, + 51.27476923793688, + 51.585540777710776, + 51.902181291391344, + 52.21300947696898, + 52.52842498000905, + 52.838175957332396, + 53.15239673868405, + 53.46093480320553, + 54.021266370836656, + 54.37816937729076, + 54.684423445642324, + 54.98898735780995, + 55.29310191461684, + 55.60308582184882, + 55.907372585870974, + 56.20993950834645, + 56.518256700934444, + 56.827155800885976, + 55.9382415484414, + 56.266195550234556, + 56.601411593166176, + 56.92931082288544, + 57.565379168369645, + 57.91050687205677, + 58.55330623279974, + 58.897813321872036, + 59.230654691087125, + 59.56469895644943, + 60.16128770746502, + 60.17165975007225, + 60.979030255243856, + 62.32411321179541, + 63.70324801657239, + 65.04896552322799, + 66.3613690205218, + 67.80959143164955, + 69.16461191797828, + 70.51912094043308, + 71.26535825198812, + 72.61973550475034, + 74.04178691625714, + 75.42994397346729, + 76.81806215171537, + 78.23997377744627, + 79.6279362548263, + 80.508016710947, 81.38448532358734 ] }, "pressure": { "start": [ 3407.8503419337335, - 3543.215087838753, - 3669.3090641257413, - 3732.3331717498872, - 3861.3920373937867, - 3924.365444590416, - 4051.7822391011086, - 4116.251980407297, - 4176.101108152553, - 4239.0015267488, - 4301.88405220991, - 4364.748142967057, - 4427.593322652582, - 4490.419754714383, - 4553.214516579858, - 4681.797390534515, - 4744.548709283564, - 4807.280073392045, - 4871.522061959681, - 4932.684428081595, - 4996.881954982977, + 3543.191828618042, + 3669.2538754805787, + 3732.2568287927666, + 3861.261709910285, + 3924.2036615535826, + 4051.5463233862206, + 4115.975190534128, + 4175.783252624477, + 4238.637150427801, + 4301.469816373166, + 4364.280717241521, + 4427.069385043804, + 4489.835991073923, + 4552.565851000566, + 4681.00538560831, + 4743.683539734108, + 4806.338425508652, + 4870.498725240338, + 4931.580119523132, + 4995.689257428405, -0.0, -0.0, -0.0, @@ -1095,27 +1095,27 @@ -0.0 ], "final": [ - 4975.409608094189, - 5110.673749648646, - 5236.64908974887, - 5299.630278218826, - 5428.600002865664, - 5491.5465608559725, - 5618.909753190979, - 5683.354575390994, - 5743.186311841662, - 5806.074488942414, - 5868.950756554364, - 5931.814633763903, - 5994.665706583769, - 6057.504198571584, - 6120.3316856896245, - 6248.996523297375, - 6311.791763572451, - 6374.573384609226, - 6438.872547319835, - 6500.0957018398685, - 6564.363184763248, + 4296.052194278666, + 4431.192745797583, + 4557.049368764471, + 4619.970271081896, + 4748.809835501782, + 4811.6918431175545, + 4938.9177023772445, + 5003.291862263632, + 5063.056673665675, + 5125.87298940628, + 5188.675896063427, + 5251.464900986246, + 5314.2395775001405, + 5377.000134957533, + 5439.748133826868, + 5568.250775181829, + 5630.965451923674, + 5693.664722406865, + 5757.8776238550445, + 5819.016909729165, + 5883.194386821758, -0.0, -0.0, -0.0, @@ -1410,5 +1410,943 @@ 8256.262661491208 ] } + }, + "layers": { + "0": { + "MD": [ + 2072.0, + 2160.0, + 2242.0, + 2283.0, + 2367.0, + 2408.0, + 2491.0, + 2533.0, + 2572.0, + 2613.0, + 2654.0, + 2695.0, + 2736.0, + 2777.0, + 2818.0, + 2902.0, + 2943.0, + 2984.0, + 3026.0, + 3066.0, + 3108.0, + 3149.0, + 3188.0, + 3273.0, + 3315.0, + 3357.0, + 3397.0, + 3466.0, + 3507.0, + 3548.0, + 3590.0, + 3631.0, + 3673.0, + 3714.0, + 3756.0, + 3797.0, + 3878.0, + 3920.0, + 3961.0, + 4002.0, + 4043.0, + 4085.0, + 4126.0, + 4167.0, + 4209.0, + 4251.0, + 4292.0, + 4333.0, + 4375.0, + 4416.0, + 4498.0, + 4539.0, + 4622.0, + 4663.0, + 4705.0, + 4747.0, + 4787.0, + 4819.0, + 4843.0, + 4883.0, + 4924.0, + 4964.0, + 5003.0, + 5046.0, + 5086.0, + 5126.0, + 5148.0, + 5188.0, + 5230.0, + 5271.0, + 5312.0, + 5354.0, + 5395.0, + 5421.0, + 5447.0 + ], + "temperature": [ + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85 + ] + }, + "1": { + "MD": [ + 2072.0, + 2160.0, + 2242.0, + 2283.0, + 2367.0, + 2408.0, + 2491.0, + 2533.0, + 2572.0, + 2613.0, + 2654.0, + 2695.0, + 2736.0, + 2777.0, + 2818.0, + 2902.0, + 2943.0, + 2984.0, + 3026.0, + 3066.0, + 3108.0, + 3149.0, + 3188.0, + 3273.0, + 3315.0, + 3357.0, + 3397.0, + 3466.0, + 3507.0, + 3548.0, + 3590.0, + 3631.0, + 3673.0, + 3714.0, + 3756.0, + 3797.0, + 3878.0, + 3920.0, + 3961.0, + 4002.0, + 4043.0, + 4085.0, + 4126.0, + 4167.0, + 4209.0, + 4251.0, + 4292.0, + 4333.0, + 4375.0, + 4416.0, + 4498.0, + 4539.0, + 4622.0, + 4663.0, + 4705.0, + 4747.0, + 4787.0, + 4819.0, + 4843.0, + 4883.0, + 4924.0, + 4964.0, + 5003.0, + 5046.0, + 5086.0, + 5126.0, + 5148.0, + 5188.0, + 5230.0, + 5271.0, + 5312.0, + 5354.0, + 5395.0, + 5421.0, + 5447.0 + ], + "temperature": [ + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85, + 9725.85 + ] + }, + "2": { + "MD": [ + 2072.0, + 2160.0, + 2242.0, + 2283.0, + 2367.0, + 2408.0, + 2491.0, + 2533.0, + 2572.0, + 2613.0, + 2654.0, + 2695.0, + 2736.0, + 2777.0, + 2818.0, + 2902.0, + 2943.0, + 2984.0, + 3026.0, + 3066.0, + 3108.0, + 3149.0, + 3188.0, + 3273.0, + 3315.0, + 3357.0, + 3397.0, + 3466.0, + 3507.0, + 3548.0, + 3590.0, + 3631.0, + 3673.0, + 3714.0, + 3756.0, + 3797.0, + 3878.0, + 3920.0, + 3961.0, + 4002.0, + 4043.0, + 4085.0, + 4126.0, + 4167.0, + 4209.0, + 4251.0, + 4292.0, + 4333.0, + 4375.0, + 4416.0, + 4498.0, + 4539.0, + 4622.0, + 4663.0, + 4705.0, + 4747.0, + 4787.0, + 4819.0, + 4843.0, + 4883.0, + 4924.0, + 4964.0, + 5003.0, + 5046.0, + 5086.0, + 5126.0, + 5148.0, + 5188.0, + 5230.0, + 5271.0, + 5312.0, + 5354.0, + 5395.0, + 5421.0, + 5447.0 + ], + "temperature": [ + 4.0, + 15.056574880579433, + 17.735386094656235, + 19.050477168180066, + 21.424535214886873, + 22.721912805710645, + 25.058297780314604, + 26.365614728944763, + 27.505664982711664, + 28.692120345368778, + 29.88058085356738, + 31.067441048873775, + 32.25269565035455, + 33.43649093383533, + 34.61905592875547, + 36.72013131539461, + 37.97174013609617, + 39.16409886386327, + 40.38420365442073, + 41.54979717525953, + 42.769214913114865, + 42.67474898034362, + 43.91683681307586, + 46.33099500293315, + 46.71409357125384, + 47.07813713765745, + 47.42551129581017, + 48.59845653797561, + 48.95983096972668, + 49.30469195350054, + 49.65714534524511, + 50.00201896122053, + 50.35387981649774, + 50.698228013187986, + 51.04950595800017, + 51.39326117877391, + 52.04902367394669, + 52.42043209684783, + 52.76305279045516, + 53.104861920553844, + 53.446440366215995, + 53.79560106393001, + 54.137227587764414, + 54.478026474329624, + 54.82635540824674, + 55.17494872898925, + 55.002559969364654, + 55.35380348693104, + 55.7132486469186, + 56.064439610083014, + 56.757404407688455, + 57.11670892904539, + 57.81757431342089, + 58.17651325357008, + 58.534699018569256, + 58.89346451095156, + 59.53898466415842, + 60.12591524949215, + 60.93830120476514, + 62.29227017094479, + 63.680094273967825, + 65.03407209135787, + 66.35420524991622, + 67.80975412020211, + 69.163854475108, + 70.51794819562383, + 71.26271757149749, + 72.6168094743017, + 74.03860529693247, + 75.42654829014612, + 76.81449070050292, + 78.23628443644196, + 79.6242245778052, + 80.50438080350523, + 81.38448532358734 + ] + }, + "3": { + "MD": [ + 2072.0, + 2160.0, + 2242.0, + 2283.0, + 2367.0, + 2408.0, + 2491.0, + 2533.0, + 2572.0, + 2613.0, + 2654.0, + 2695.0, + 2736.0, + 2777.0, + 2818.0, + 2902.0, + 2943.0, + 2984.0, + 3026.0, + 3066.0, + 3108.0, + 3149.0, + 3188.0, + 3273.0, + 3315.0, + 3357.0, + 3397.0, + 3466.0, + 3507.0, + 3548.0, + 3590.0, + 3631.0, + 3673.0, + 3714.0, + 3756.0, + 3797.0, + 3878.0, + 3920.0, + 3961.0, + 4002.0, + 4043.0, + 4085.0, + 4126.0, + 4167.0, + 4209.0, + 4251.0, + 4292.0, + 4333.0, + 4375.0, + 4416.0, + 4498.0, + 4539.0, + 4622.0, + 4663.0, + 4705.0, + 4747.0, + 4787.0, + 4819.0, + 4843.0, + 4883.0, + 4924.0, + 4964.0, + 5003.0, + 5046.0, + 5086.0, + 5126.0, + 5148.0, + 5188.0, + 5230.0, + 5271.0, + 5312.0, + 5354.0, + 5395.0, + 5421.0, + 5447.0 + ], + "temperature": [ + 4.0, + 22.10119818817418, + 24.638680928586155, + 25.869577087732353, + 27.884820534050164, + 29.08382763465795, + 31.05389872666092, + 32.24565696764773, + 33.235594387028414, + 34.2565449042325, + 35.27980422265557, + 36.29963749485739, + 37.31594317830775, + 38.328814110281996, + 39.33855861842062, + 40.97951314146144, + 42.096668909703226, + 43.11391510634206, + 44.151752131967044, + 45.14415485317983, + 46.176224862055506, + 50.43721118237437, + 51.18186960885595, + 52.545156209551294, + 52.93525359044543, + 53.22398900697783, + 53.50250883882086, + 53.10424744463256, + 53.43199983840543, + 53.70956677781419, + 53.991470813586375, + 54.26916929147444, + 54.54935593843243, + 54.82555448332437, + 55.10407345238502, + 55.37857894009238, + 55.85015809430581, + 56.19031421451609, + 56.46166231085715, + 56.73060421442557, + 56.998940396430385, + 57.271628917150224, + 57.540291392117524, + 57.806508248455884, + 58.07689682331579, + 58.34814523982766, + 56.795159923010715, + 57.10129499000948, + 57.41386316090069, + 57.71997440417226, + 58.30375158648667, + 58.63491350763718, + 59.224448554841615, + 59.5548569496022, + 59.86426031059602, + 60.17538333836916, + 60.72736849673015, + 60.781812083404645, + 61.52257533220768, + 62.75026717142396, + 64.01420018155096, + 65.25010245925034, + 66.4590871149818, + 67.8069838097258, + 69.1735571876651, + 70.53285043311388, + 71.2960324330636, + 72.65363070638205, + 74.07858996175366, + 75.46921129719391, + 76.85937935985135, + 78.28270240338759, + 79.67099885790174, + 80.54987195786123, + 81.38448532358734 + ] + }, + "4": { + "MD": [ + 2072.0, + 2160.0, + 2242.0, + 2283.0, + 2367.0, + 2408.0, + 2491.0, + 2533.0, + 2572.0, + 2613.0, + 2654.0, + 2695.0, + 2736.0, + 2777.0, + 2818.0, + 2902.0, + 2943.0, + 2984.0, + 3026.0, + 3066.0, + 3108.0, + 3149.0, + 3188.0, + 3273.0, + 3315.0, + 3357.0, + 3397.0, + 3466.0, + 3507.0, + 3548.0, + 3590.0, + 3631.0, + 3673.0, + 3714.0, + 3756.0, + 3797.0, + 3878.0, + 3920.0, + 3961.0, + 4002.0, + 4043.0, + 4085.0, + 4126.0, + 4167.0, + 4209.0, + 4251.0, + 4292.0, + 4333.0, + 4375.0, + 4416.0, + 4498.0, + 4539.0, + 4622.0, + 4663.0, + 4705.0, + 4747.0, + 4787.0, + 4819.0, + 4843.0, + 4883.0, + 4924.0, + 4964.0, + 5003.0, + 5046.0, + 5086.0, + 5126.0, + 5148.0, + 5188.0, + 5230.0, + 5271.0, + 5312.0, + 5354.0, + 5395.0, + 5421.0, + 5447.0 + ], + "temperature": [ + 4.0, + 33.264977908114076, + 35.55679707924776, + 36.65147980620981, + 38.174457986027164, + 39.21636300660418, + 40.67999232154176, + 41.68948986877126, + 42.46313051752139, + 43.247764712774256, + 44.03438429804129, + 44.81488447660496, + 45.588858645298046, + 46.35620146336919, + 47.11749220859792, + 48.35660894000381, + 49.25694081845688, + 50.00482656426891, + 50.7620837473396, + 51.48676456617329, + 52.22956618907307, + 54.739540661664705, + 55.29310640318465, + 56.251566808302414, + 56.622840790894884, + 56.86934131303633, + 57.1083303719937, + 57.9216977804457, + 58.212058588627656, + 58.427533623841384, + 58.64454132302649, + 58.86000476214542, + 59.07418085630809, + 59.28714677356106, + 59.49853684694824, + 59.70868184598726, + 60.01685165827564, + 60.32069008397713, + 60.525486722442565, + 60.726465983760306, + 60.92636657694055, + 61.127626426510005, + 61.32766002939297, + 61.523767054284235, + 61.720870616520415, + 61.918992866044846, + 64.03541971731079, + 64.15510300013841, + 64.274365632171, + 64.3944413471495, + 64.53580183106283, + 64.74463805557957, + 64.88397249032113, + 65.09139628353694, + 65.20189153331603, + 65.31820822272505, + 65.49444366498324, + 64.91801528364749, + 65.21183600234315, + 65.65541258915925, + 66.14597903555244, + 66.6411673139566, + 67.14579204308319, + 67.78491837817774, + 69.21825686358056, + 70.60000460726332, + 71.44138575731614, + 72.81350409203588, + 74.25163472976988, + 75.65358570572903, + 77.05329616051688, + 78.48332125065008, + 79.87350721850419, + 80.7439010968883, + 81.38448532358734 + ] + }, + "5": { + "MD": [ + 2072.0, + 2160.0, + 2242.0, + 2283.0, + 2367.0, + 2408.0, + 2491.0, + 2533.0, + 2572.0, + 2613.0, + 2654.0, + 2695.0, + 2736.0, + 2777.0, + 2818.0, + 2902.0, + 2943.0, + 2984.0, + 3026.0, + 3066.0, + 3108.0, + 3149.0, + 3188.0, + 3273.0, + 3315.0, + 3357.0, + 3397.0, + 3466.0, + 3507.0, + 3548.0, + 3590.0, + 3631.0, + 3673.0, + 3714.0, + 3756.0, + 3797.0, + 3878.0, + 3920.0, + 3961.0, + 4002.0, + 4043.0, + 4085.0, + 4126.0, + 4167.0, + 4209.0, + 4251.0, + 4292.0, + 4333.0, + 4375.0, + 4416.0, + 4498.0, + 4539.0, + 4622.0, + 4663.0, + 4705.0, + 4747.0, + 4787.0, + 4819.0, + 4843.0, + 4883.0, + 4924.0, + 4964.0, + 5003.0, + 5046.0, + 5086.0, + 5126.0, + 5148.0, + 5188.0, + 5230.0, + 5271.0, + 5312.0, + 5354.0, + 5395.0, + 5421.0, + 5447.0 + ], + "temperature": [ + 4.0, + 52.65062702931107, + 54.48615360711608, + 55.334132197981944, + 56.01932573589295, + 56.7805873197961, + 57.381708930551326, + 58.064889585715946, + 58.46481975710333, + 58.84299419174397, + 59.22248281789837, + 59.59160009161201, + 59.94887826865738, + 60.29468056094993, + 60.62998175756013, + 61.052194934487716, + 61.579721449310284, + 61.87462469133584, + 62.160119364960394, + 62.43467148864943, + 62.69226321812164, + 63.03653916455875, + 63.23015099315097, + 63.43362957146405, + 63.75286426962572, + 63.91065604932942, + 64.0661547866942, + 64.23477543540434, + 64.46817531584838, + 64.60176903262561, + 64.73360278751932, + 64.86700839763608, + 64.99475354938846, + 65.12452332017705, + 65.2481954909581, + 65.37384313736379, + 65.47734514790989, + 65.72518201011258, + 65.84292325106969, + 65.95528097012448, + 66.06599282523177, + 66.1744110111755, + 66.2848869709336, + 66.38977506988135, + 66.49175302555705, + 66.59469497811199, + 66.77270922340324, + 66.8374221783788, + 66.89945733530624, + 66.96404992005819, + 66.97425476878146, + 67.1440090052862, + 67.14713329164124, + 67.31463532993342, + 67.36794328327642, + 67.42289205674786, + 67.48110263994045, + 67.55494865682442, + 67.60393970738653, + 67.60922829588333, + 67.6509306233026, + 67.69372511929055, + 67.73185236053007, + 67.75279104237495, + 69.25291558750399, + 70.6508374871787, + 71.54026358371522, + 72.92003582314385, + 74.3649741210412, + 75.77280406339344, + 77.17743849273813, + 78.6108492841899, + 80.00203667369317, + 80.86551653407275, + 81.38448532358734 + ] + } } -} +} \ No newline at end of file diff --git a/src/alfasim_score/converter/alfacase/alfasim_score_converter.py b/src/alfasim_score/converter/alfacase/alfasim_score_converter.py new file mode 100644 index 0000000..b6e9703 --- /dev/null +++ b/src/alfasim_score/converter/alfacase/alfasim_score_converter.py @@ -0,0 +1,43 @@ +import json +from alfasim_sdk import convert_description_to_alfacase +from pathlib import Path + +from alfasim_score.common import OperationType +from alfasim_score.converter.alfacase.base_operation import BaseOperationBuilder +from alfasim_score.converter.alfacase.injection_operation import InjectionOperationBuilder +from alfasim_score.converter.alfacase.production_operation import ProductionOperationBuilder +from alfasim_score.converter.alfacase.score_input_reader import ScoreInputReader +from alfasim_score.converter.alfacase.score_output_generator import ScoreOutputBuilder + + +class AlfasimScoreConverter: + """ + This class handles the process of convertions between ALFAsim and SCORE file formats: + - it can convert the SCORE input file format into an alfacase to be used by ALFAsim simulator + - it can use a ALFAsim result into a SCORE output file. + """ + + def __init__(self, score_input_file: Path, score_output_file: Path): + self.score_input = ScoreInputReader(score_input_file) + self.alfacase_builder = self._get_score_to_alfacase_builder() + self.output_builder = ScoreOutputBuilder(self.score_input, score_output_file) + + def _get_score_to_alfacase_builder(self) -> BaseOperationBuilder: + """Convert SCORE input file to an alfacase description.""" + operation_type = self.score_input.read_operation_type() + if operation_type == OperationType.PRODUCTION: + return ProductionOperationBuilder(self.score_input) + else: + return InjectionOperationBuilder(self.score_input) + + def generate_alfasim_input_file(self, alfacase_filepath: Path) -> None: + """Create the ALFAsim input file (AKA alfacase) from an SCORE input file.""" + alfacase_description = self.alfacase_builder.generate_operation_alfacase_description() + alfacase_content = convert_description_to_alfacase(alfacase_description) + alfacase_filepath.write_text(data=alfacase_content, encoding="utf-8") + + def generate_score_output_file(self, alfasim_results_folder: Path) -> None: + """Create the output file for SCORE based on the results generated by ALFAsim.""" + output = self.output_builder.generate_output_results(alfasim_results_folder) + json_data = json.dumps(output, indent=2) + self.output_builder.score_output_filepath.write_text(json_data, encoding="utf-8") diff --git a/src/alfasim_score/converter/alfacase/base_operation.py b/src/alfasim_score/converter/alfacase/base_operation.py index 59da7fe..50cf2c9 100644 --- a/src/alfasim_score/converter/alfacase/base_operation.py +++ b/src/alfasim_score/converter/alfacase/base_operation.py @@ -1,6 +1,3 @@ -from typing import Any -from typing import Union - from alfasim_sdk import CaseDescription from alfasim_sdk import CaseOutputDescription from alfasim_sdk import EnergyModel @@ -21,7 +18,6 @@ from alfasim_sdk import NumericalOptionsDescription from alfasim_sdk import OutputAttachmentLocation from alfasim_sdk import PhysicsDescription -from alfasim_sdk import PluginDescription from alfasim_sdk import PressureContainerDescription from alfasim_sdk import PressureNodePropertiesDescription from alfasim_sdk import ProfileOutputDescription @@ -39,7 +35,6 @@ from barril.units import Array from barril.units import Scalar from copy import deepcopy -from dataclasses import asdict from pathlib import Path from alfasim_score.constants import GAS_LIFT_MASS_NODE_NAME @@ -63,8 +58,8 @@ class BaseOperationBuilder: - def __init__(self, score_filepath: Path): - self.score_input = ScoreInputReader(score_filepath) + def __init__(self, score_input_reader: ScoreInputReader): + self.score_input = score_input_reader self.alfacase_converter = ScoreAlfacaseConverter(self.score_input) self.apb_plugin_converter = ScoreAPBPluginConverter(self.score_input) self.base_alfacase = self.alfacase_converter.build_base_alfacase_description() @@ -76,6 +71,22 @@ def __init__(self, score_filepath: Path): "mixture temperature", "pressure", "environment temperature", + "annulus_a_temperature", + "annulus_b_temperature", + "annulus_c_temperature", + "annulus_d_temperature", + "annulus_e_temperature", + "annulus_a_pressure", + "annulus_b_pressure", + "annulus_c_pressure", + "annulus_d_pressure", + "annulus_e_pressure", + "wall_0_temperature", + "wall_1_temperature", + "wall_2_temperature", + "wall_3_temperature", + "wall_4_temperature", + "wall_5_temperature", ] def _get_fluid_model_name(self) -> str: diff --git a/src/alfasim_score/converter/alfacase/convert_alfacase.py b/src/alfasim_score/converter/alfacase/convert_alfacase.py index 2d0c3c8..137a879 100644 --- a/src/alfasim_score/converter/alfacase/convert_alfacase.py +++ b/src/alfasim_score/converter/alfacase/convert_alfacase.py @@ -54,9 +54,9 @@ def get_section_top_of_filler( class ScoreAlfacaseConverter: - def __init__(self, score_reader: ScoreInputReader): - self.score_input = score_reader - self.general_data = score_reader.read_general_data() + def __init__(self, score_input_reader: ScoreInputReader): + self.score_input = score_input_reader + self.general_data = score_input_reader.read_general_data() self.well_start_position = self.general_data["water_depth"] + self.general_data["air_gap"] def get_position_in_well(self, position: Scalar) -> Scalar: diff --git a/src/alfasim_score/converter/alfacase/convert_plugin_data.py b/src/alfasim_score/converter/alfacase/convert_plugin_data.py index 52551eb..33616d9 100644 --- a/src/alfasim_score/converter/alfacase/convert_plugin_data.py +++ b/src/alfasim_score/converter/alfacase/convert_plugin_data.py @@ -1,21 +1,15 @@ from typing import Any from typing import Dict from typing import List -from typing import Union import numpy as np from alfasim_sdk import PluginDescription from barril.units import Array from barril.units import Scalar -from dataclasses import asdict -from dataclasses import dataclass -from enum import Enum -from pathlib import Path from alfasim_score.common import Annuli from alfasim_score.common import Annulus from alfasim_score.common import AnnulusDepthTable -from alfasim_score.common import AnnulusModeType from alfasim_score.common import AnnulusTemperatureTable from alfasim_score.common import FluidModelPvt from alfasim_score.common import SolidMechanicalProperties @@ -28,9 +22,9 @@ class ScoreAPBPluginConverter: - def __init__(self, score_reader: ScoreInputReader): - self.score_input = score_reader - self.general_data = score_reader.read_general_data() + def __init__(self, score_input_reader: ScoreInputReader): + self.score_input = score_input_reader + self.general_data = score_input_reader.read_general_data() self.well_start_position = self.general_data["water_depth"] + self.general_data["air_gap"] def get_position_in_well(self, position: Scalar) -> Scalar: diff --git a/src/alfasim_score/converter/alfacase/converter_main.py b/src/alfasim_score/converter/alfacase/converter_main.py deleted file mode 100644 index 9774ef7..0000000 --- a/src/alfasim_score/converter/alfacase/converter_main.py +++ /dev/null @@ -1,28 +0,0 @@ -from alfasim_sdk import CaseDescription -from alfasim_sdk import convert_description_to_alfacase -from pathlib import Path - -from alfasim_score.common import OperationType -from alfasim_score.converter.alfacase.base_operation import BaseOperationBuilder -from alfasim_score.converter.alfacase.injection_operation import InjectionOperationBuilder -from alfasim_score.converter.alfacase.production_operation import ProductionOperationBuilder -from alfasim_score.converter.alfacase.score_input_reader import ScoreInputReader - - -def convert_score_to_alfacase_description(score_filepath: Path) -> CaseDescription: - """Convert SCORE input file to an alfacase description.""" - score_input = ScoreInputReader(score_filepath) - operation_type = score_input.read_operation_type() - builder: BaseOperationBuilder - if operation_type == OperationType.PRODUCTION: - builder = ProductionOperationBuilder(score_filepath) - else: # OperationType.INJECTION - builder = InjectionOperationBuilder(score_filepath) - return builder.generate_operation_alfacase_description() - - -def convert_score_to_alfacase(score_filepath: Path, alfacase_filepath: Path) -> None: - """Convert SCORE input file to an alfacase file.""" - alfacase_description = convert_score_to_alfacase_description(score_filepath) - alfacase_content = convert_description_to_alfacase(alfacase_description) - alfacase_filepath.write_text(data=alfacase_content, encoding="utf-8") diff --git a/src/alfasim_score/converter/alfacase/injection_operation.py b/src/alfasim_score/converter/alfacase/injection_operation.py index 5ff77aa..0bbfd3c 100644 --- a/src/alfasim_score/converter/alfacase/injection_operation.py +++ b/src/alfasim_score/converter/alfacase/injection_operation.py @@ -1,5 +1,4 @@ import attr -import numpy as np from alfasim_sdk import CaseDescription from alfasim_sdk import MassInflowSplitType from alfasim_sdk import MassSourceNodePropertiesDescription @@ -11,7 +10,6 @@ from alfasim_sdk._internal.constants import FLUID_OIL from alfasim_sdk._internal.constants import FLUID_WATER from barril.units import Scalar -from pathlib import Path from alfasim_score.common import FluidType from alfasim_score.common import OperationType @@ -20,13 +18,14 @@ from alfasim_score.constants import WELLBORE_BOTTOM_NODE_NAME from alfasim_score.constants import WELLBORE_TOP_NODE_NAME from alfasim_score.converter.alfacase.base_operation import BaseOperationBuilder +from alfasim_score.converter.alfacase.score_input_reader import ScoreInputReader from alfasim_score.units import FRACTION_UNIT from alfasim_score.units import TEMPERATURE_UNIT class InjectionOperationBuilder(BaseOperationBuilder): - def __init__(self, score_filepath: Path): - super().__init__(score_filepath) + def __init__(self, score_input_reader: ScoreInputReader): + super().__init__(score_input_reader) self.operation_type = OperationType.INJECTION assert ( self.general_data["type"] == self.operation_type diff --git a/src/alfasim_score/converter/alfacase/production_operation.py b/src/alfasim_score/converter/alfacase/production_operation.py index 58fc3a5..3567df4 100644 --- a/src/alfasim_score/converter/alfacase/production_operation.py +++ b/src/alfasim_score/converter/alfacase/production_operation.py @@ -7,7 +7,6 @@ from alfasim_sdk import GasLiftValveEquipmentDescription from alfasim_sdk import HydrodynamicModelType from alfasim_sdk import InitialConditionsDescription -from alfasim_sdk import InitialConditionStrategyType from alfasim_sdk import InitialPressuresDescription from alfasim_sdk import InitialTemperaturesDescription from alfasim_sdk import InitialVelocitiesDescription @@ -19,7 +18,6 @@ from alfasim_sdk import PressureContainerDescription from alfasim_sdk import PressureNodePropertiesDescription from alfasim_sdk import PvtModelCorrelationDescription -from alfasim_sdk import PvtModelsDescription from alfasim_sdk import SimulationRegimeType from alfasim_sdk import TableInputType from alfasim_sdk import TemperaturesContainerDescription @@ -31,7 +29,6 @@ from alfasim_sdk._internal.constants import FLUID_WATER from barril.units import Array from barril.units import Scalar -from pathlib import Path from alfasim_score.common import LiftMethod from alfasim_score.common import OperationType @@ -48,6 +45,7 @@ from alfasim_score.constants import WELLBORE_BOTTOM_NODE_NAME from alfasim_score.constants import WELLBORE_TOP_NODE_NAME from alfasim_score.converter.alfacase.base_operation import BaseOperationBuilder +from alfasim_score.converter.alfacase.score_input_reader import ScoreInputReader from alfasim_score.units import FRACTION_UNIT from alfasim_score.units import LENGTH_UNIT from alfasim_score.units import PRESSURE_UNIT @@ -56,8 +54,8 @@ class ProductionOperationBuilder(BaseOperationBuilder): - def __init__(self, score_filepath: Path): - super().__init__(score_filepath) + def __init__(self, score_input_reader: ScoreInputReader): + super().__init__(score_input_reader) self.operation_type = OperationType.PRODUCTION self.lift_method_data = self.score_input.read_operation_method_data() self.produced_fluid_data = self.score_input.read_operation_fluid_data() diff --git a/src/alfasim_score/converter/alfacase/score_input_reader.py b/src/alfasim_score/converter/alfacase/score_input_reader.py index 2ea19f3..291132d 100644 --- a/src/alfasim_score/converter/alfacase/score_input_reader.py +++ b/src/alfasim_score/converter/alfacase/score_input_reader.py @@ -1,7 +1,6 @@ from typing import Any from typing import Dict from typing import List -from typing import Tuple from typing import Union import csv diff --git a/src/alfasim_score/converter/alfacase/score_output_generator.py b/src/alfasim_score/converter/alfacase/score_output_generator.py index 394d8c8..3a484a4 100644 --- a/src/alfasim_score/converter/alfacase/score_output_generator.py +++ b/src/alfasim_score/converter/alfacase/score_output_generator.py @@ -2,59 +2,46 @@ from typing import Dict from typing import List -import json import numpy as np -from alfasim_sdk import CaseDescription -from alfasim_sdk import CaseOutputDescription -from alfasim_sdk import GlobalTrendDescription -from alfasim_sdk import LengthAndElevationDescription -from alfasim_sdk import OutputAttachmentLocation -from alfasim_sdk import PipeDescription -from alfasim_sdk import ProfileDescription -from alfasim_sdk import ProfileOutputDescription -from alfasim_sdk import TrendsOutputDescription -from alfasim_sdk import WellDescription from alfasim_sdk.result_reader import Results -from barril.units import Scalar from pathlib import Path from alfasim_score.common import AnnulusLabel +from alfasim_score.constants import TOTAL_WALLS from alfasim_score.constants import WELLBORE_NAME +from alfasim_score.converter.alfacase.score_input_reader import ScoreInputReader from alfasim_score.units import LENGTH_UNIT from alfasim_score.units import PRESSURE_UNIT from alfasim_score.units import TEMPERATURE_UNIT -class ScoreOutputGenerator: +class ScoreOutputBuilder: def __init__( self, - results_path: Path, - well_start_position: Scalar, - active_annuli: List[AnnulusLabel] = [], + score_input_reader: ScoreInputReader, + score_output_filepath: Path, ): - self.results_path = results_path - self.well_start_position = well_start_position - self.active_annuli = active_annuli + self.score_input_reader = score_input_reader + self.score_output_filepath = score_output_filepath + self.active_annuli = self._get_annuli_list() self.element_name = WELLBORE_NAME - def _generate_output_results(self) -> Dict[str, Any]: - """Create data for the output results.""" + def _get_annuli_list(self) -> List[AnnulusLabel]: + """Get the list of active annuli configured in the input file""" + annuli_data = self.score_input_reader.read_operation_annuli_data() + total_annuli = len(annuli_data) + return list(AnnulusLabel)[:total_annuli] + + def _generate_annuli_output( + self, results: Results, measured_depths: np.ndarray + ) -> Dict[str, Any]: + """Create data for the output results of annuli.""" annuli_temperature_profiles = [ f"annulus_{annuli_label.value}_temperature" for annuli_label in self.active_annuli ] annuli_pressure_profiles = [ f"annulus_{annuli_label.value}_pressure" for annuli_label in self.active_annuli ] - tubing_profiles = [ - "pressure", - "mixture temperature", - ] - results = Results(self.results_path) - measured_depths = self.well_start_position.GetValue(LENGTH_UNIT) + np.array( - results.get_profile_curve("pressure", self.element_name, -1).domain.GetValues("m") - ) - - # build annuli output data annuli_output: Dict[str, Any] = {} annulus_index = 0 for temperature_profile_name, pressure_profile_name in zip( @@ -87,8 +74,10 @@ def _generate_output_results(self) -> Dict[str, Any]: annuli_output[str(annulus_index)]["temperature"] = temperature annuli_output[str(annulus_index)]["pressure"] = pressure annulus_index += 1 + return annuli_output - # build production tubing output data + def _generate_production_tubing_output(self, results: Results) -> Dict[str, Any]: + """Create data for the output results of production tubing.""" production_tubing = { "temperature": { "final": ( @@ -105,13 +94,42 @@ def _generate_output_results(self) -> Dict[str, Any]: ) }, } + return production_tubing + + def _generate_walls_output( + self, results: Results, measured_depths: np.ndarray + ) -> Dict[str, Any]: + """Create data for the output results of walls.""" + walls_output: Dict[str, Any] = {} + wall_index = 0 + # Score wall labels are inverted with respect to PWPA + for wall_label in range(TOTAL_WALLS - 1, -1, -1): + wall_name = f"wall_{wall_label}_temperature" + wall = {} + wall["MD"] = measured_depths.tolist() + wall_temperatures = results.get_profile_curve( + wall_name, self.element_name, -1 + ).image.GetValues(TEMPERATURE_UNIT) + # Ignore walls with negative dummy values from ALFAsim + if not np.all(wall_temperatures < 0): + wall["temperature"] = wall_temperatures.tolist() + walls_output[str(wall_index)] = wall + wall_index += 1 + return walls_output + + def generate_output_results(self, alfasim_results_filepath: Path) -> Dict[str, Any]: + """Create data for the output results.""" + results = Results(alfasim_results_filepath) + general_data = self.score_input_reader.read_general_data() + well_start_position = general_data["water_depth"] + general_data["air_gap"] + measured_depths = well_start_position.GetValue(LENGTH_UNIT) + np.array( + results.get_profile_curve("pressure", self.element_name, -1).domain.GetValues( + LENGTH_UNIT + ) + ) return { - "annuli": annuli_output, + "annuli": self._generate_annuli_output(results, measured_depths), "MD": measured_depths.tolist(), - "production_tubing": production_tubing, + "production_tubing": self._generate_production_tubing_output(results), + "layers": self._generate_walls_output(results, measured_depths), } - - def generate_output_file(self, output_filepath: Path) -> None: - """Create the output file for SCORE.""" - json_data = json.dumps(self._generate_output_results(), indent=2) - output_filepath.write_text(json_data, encoding="utf-8")