Skip to main content
https://img.shields.io/pypi/v/alfasim-score.svg https://img.shields.io/pypi/pyversions/alfasim-score.svg https://github.com/ESSS/alfasim-score/workflows/test/badge.svg https://codecov.io/gh/ESSS/alfasim-score/branch/master/graph/badge.svg https://img.shields.io/readthedocs/alfasim-score.svg https://sonarcloud.io/api/project_badges/measure?project=ESSS_alfasim-score&metric=alert_status

What is alfasim-score?

Python package to convert the SCORE input JSON to Alfacase (ALFAsim input file).

Features

  • Converter from Score input JSON to Alfacase

  • Converter from Wellprop pvt tables to .tab pvt table format

  • Parser for the ALFAsim results and generate a JSON compatible with SCORE

How to use it

  1. 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
    alfacase_converter = AlfasimScoreConverter(score_input_filepath, score_output_filepath)
  2. To convert the SCORE input into an alfacase file, the user can do the following:

    alfacase_filepath = Path("path/where/save/converted_score.alfacase")
    alfacase_converter.generate_alfasim_input_file(alfacase_filepath)
  3. Run the ALFAsim with the generated file (and the pvt tables in the same folder)

  4. 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")
    alfacase_converter.generate_score_output_file(alfasim_results_directory)
  5. The user also must remember to convert and save the pvt table (as .tab file) if wellprop tables are being used:

    from alfasim_score.converter.wellprop.wellprop_pvt_table_converter import WellpropToPvtConverter
    table_converter = WellpropToPvtConverter(Path("name_of_folder_with_wellprop_tables"))
    table_converter.generate_pvt_table_file(Path("name_of_folder_to_save_converted_pvt_table"))

Development

For complete description of what type of contributions are possible, see the full CONTRIBUTING guide.

Here is a quick summary of the steps necessary to setup your environment to contribute to alfasim-score.

  1. Create a virtual environment and activate it:

    $ python -m virtualenv .env
    $ .env\Scripts\activate  # windows
    $ source .env/bin/activate  # linux
  2. Update pip:

    $ python -m pip install -U pip
  3. Install development dependencies:

    $ pip install -e .[testing]
  4. Install pre-commit:

    $ pre-commit install
  5. Run tests:

    $ pytest --pyargs alfasim_score
  6. Generate docs locally:

    $ tox -e docs

    The documentation files will be generated in docs/_build.

Release

A reminder for the maintainers on how to make a new release.

Note that the VERSION should folow the semantic versioning as X.Y.Z 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. Ex: git tag v1.0.5; git push origin --tags

  5. Merge the PR.

1.3.1 (2026-06-19)

  • Update alfasim-sdk dependency to 1.6.0 and migrate to the generate_alfacase_file API.

  • Drop support for Python 3.8 and 3.9 (alfasim-sdk requires Python >= 3.10).

1.2.1 (2026-06-19)

  • Fix output results JSON dropping annuli MDs beyond the annulus end and emitting volume.diff as a scalar.

1.2.0 (2026-06-10)

  • Include support to simulation regime input.

1.1.1 (2026-03-19)

  • Ignore walls with NaN or negative dummy values from ALFAsim output to build output results JSON layers.

1.1.0 (2026-02-20)

  • Update the alfacase converter to support ALFAsim APB plugin v2025.2.1

  • Update convert to improve ALFAsim simulation performance: * Use Zamora correlation for PVT table input * Periodic calculation for APB * Update of thermal properties only in initalization

1.0.0 (2025-04-11)

  • Update the alfacase converter to create files compatible with ALFAsim APB plugin v1.0.1

  • Add new converter for pvt tables from wellprops to .tab format

0.2.0 (2024-12-18)

  • Improvements on API.

  • Add documentation on how to use the API.

0.1.0 (2024-06-10)

  • First release on PyPI.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alfasim_score-1.3.1.tar.gz (3.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alfasim_score-1.3.1-py3-none-any.whl (3.7 MB view details)

Uploaded Python 3

File details

Details for the file alfasim_score-1.3.1.tar.gz.

File metadata

  • Download URL: alfasim_score-1.3.1.tar.gz
  • Upload date:
  • Size: 3.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for alfasim_score-1.3.1.tar.gz
Algorithm Hash digest
SHA256 2301a6876866399d06e0eaec41e0b66537c9d8088d2234c1ce986a974919fea4
MD5 0de6d759aeea8483086a1d0322c5dd2c
BLAKE2b-256 78158d448d09c27dd010e591da15dbd4ed1c7a9c60ceaecc3f97d1097e8321df

See more details on using hashes here.

Provenance

The following attestation bundles were made for alfasim_score-1.3.1.tar.gz:

Publisher: deploy.yml on ESSS/alfasim-score

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file alfasim_score-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: alfasim_score-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for alfasim_score-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4bbb433f351d84bc6c815f8d80615c1af290103cddf4995497d515dfef902cdb
MD5 885be360e6b6edf24b1928f7dd2854a9
BLAKE2b-256 97182aacaa06c29d615b02d56d3caabbdaff07bd9bdb62710aae7379c5f5acd7

See more details on using hashes here.

Provenance

The following attestation bundles were made for alfasim_score-1.3.1-py3-none-any.whl:

Publisher: deploy.yml on ESSS/alfasim-score

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page