Skip to main content

A package for the simulation of hybrid energy systems for off-shore oil and gas installations.

Project description

HES-OFF

Description

Despite the efforts to move towards a carbon-neutral future, the global demand of fossil fuels continues to grow. As a result, the oil and gas (O&G) industry if facing a double challenge: meet the increased need for energy while simultaneously reducing its overall emissions. One way to achieve these goals is through the use of hybrid energy systems that combine renewable energies with conventional power generation.

In this context, HES-OFF Python package offers a platform-independent environment for the simulation of hybrid energy systems for stable heat and power supply in off-shore oil and gas installations. The code was developed aiming at ease of use and computational speed. Some notable features of the package are listed below:

  • Supports the simulation of off-shore energy systems that integrate offshore wind power with gas turbines and an energy storage solution based on proton exchange membrane fuel cells and electrolysers.

  • Contains commercial and user-defined numerical models to simulate the performance of the different system components.

  • Includes an intuitive, web-based graphical user interface to perform the simulations and visualize the results.

    • The backend of the interface was developed using the Flask framework
    • The frontend of the interface was developed using the Bootstrap framework
    • The web-based app is currently hosted in the Heroku platform
  • Uses the Numba JIT compiler to achieve execution times comparable with those of compiled languages such as C++ or FORTRAN.

Getting started

Running the all online

There is not need to install anything to start using the online web application! Just open the app and start playing around with the different parameters and settings. The user interface has many tooltips and warnings to guide the users and help them understand what inputs are expected.

Running the app locally

If you want to have access to the core functionality of the HES-OFF package, you can install it with pip:

pip install hes_off

Once the package is installed, you can run the web application locally typing the following command in your terminal:

python3 -c "import hes_off; hes_off.launch_app()"

Documentation

To be completed

  • Add link to Read the Docs documentation
  • Add the links to related publications

License

The hes_off package is licensed under the terms of the MIT license. See the license file for more information.

Contact information

To be completed

To-do list

  • Add option to export Excel files with results (Roberto)
  • Add option to add a user-defined model for the electrolyzer and fuel cell systems (Roberto)
  • Prepare some test cases and compare results with MATLAB (Luca)
  • Prepare a documentation page using Read the Docs (Erick)
  • Implement the electric grid surrogate model (Erick)
  • Implement a gradient-free optimization for design
  • Prepare a paper for an open-software journal

Deployment

This section is intended for developers

In order to deploy the app you must create a Heroku account and install the Heroku command line interface. Once you are set, open a terminal in the project's root directory and type the following commands:

  1. Create a Conda virtual environment with all the dependencies using the environment.yml file:

    conda env create environment.yml
    
  2. Check that the app works locally typing this one-liner in your terminal:

    python3 -c "import hes_off; hes_off.launch_app()"
    
  3. If the app works locally, then create a requirements.txt file with the list of dependencies:

    pip list --format=freeze > requirements.txt
    
  4. Create the Procfile file in case it does not exists already:

    echo "web: gunicorn app:app" > Procfile
    
  5. Deploy the app to Heroku with a Git push;

    git push heroku main
    

That's it! The app might take some moments to go online.

Known caveats

In some cases the requirements.txt file might include some unnecessary packages that cause the Heroku deployment to fail. If this is the case, remove the problematic packages and try to re-deploy.

python setup.py sdist bdist_wheel

Project details


Download files

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

Source Distribution

hes_off-1.0.1.tar.gz (13.2 MB view details)

Uploaded Source

Built Distribution

hes_off-1.0.1-py3-none-any.whl (13.4 MB view details)

Uploaded Python 3

File details

Details for the file hes_off-1.0.1.tar.gz.

File metadata

  • Download URL: hes_off-1.0.1.tar.gz
  • Upload date:
  • Size: 13.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for hes_off-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7e94c724aba91237d57f067490dce2c6cc12354948f826dfd25d1c96f07a5581
MD5 52ce40da4468bd2b39751c400a45361e
BLAKE2b-256 629af8754f3bf5d735111b585de8b3a1787e6eec58de430e681087d0384bbae6

See more details on using hashes here.

File details

Details for the file hes_off-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: hes_off-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for hes_off-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ff34d313154660bb7048bcbcd779be509e580753191f70e32572fdb7a675db1
MD5 e4e59bbcc05e62b01cc46669270e83ce
BLAKE2b-256 8c52c030e3f91d98094abb5f11f61b57872c013be5e8ca5b711b1fc0833e6bcb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page