Skip to main content

FuelLib: A Python library for Group Contribution Method (GCM) calculations of fuel properties

Project description

FuelLib

PyPI - Version PyPI - Status PyPI - Python Version

GitHub Release CI Documentation

DOI Badge GitHub License

Overview

FuelLib (SWR-25-26) utilizes the tables and functions of the Group Contribution Method (GCM) as proposed by Constantinou and Gani (1994) and Constantinou, Gani and O'Connel (1995), with additional physical properties discussed in Govindaraju & Ihme (2016). The code is based on Pavan B. Govindaraju's Matlab implementation of the GCM, and has been expanded to include additional thermodynamic properties and mixture properties. The fuel library contains gas chromatography (GC x GC) data for a variety of fuels ranging from simple single component fuels to complex jet fuels. The GC x GC data for POSF jet fuels comes from Edwards (2020).

Citing this Work

If you use FuelLib in your research, please cite the following software record:

Montgomery, David, Appukuttan, Sreejith, Yellapantula, Shashank, Perry, Bruce, and Binswanger, Adam. FuelLib (Fuel Library) [SWR-25-26]. Computer Software. https://github.com/NatLabRockies/FuelLib. USDOE Office of Energy Efficiency and Renewable Energy (EERE), Office of Sustainable Transportation. Vehicle Technologies Office (VTO). 27 Feb. 2025. Web. doi:10.11578/dc.20250317.1.

Installation

Option 1: Install from PyPI (Recommended)

The easiest way to install FuelLib is via pip:

pip install fuellib

This will make the command-line tools available, including:

  • fl-export-pele and fl-export-converge for exporting fuel properties
  • fl-plt-props and fl-plt-comp for plotting fuel composition and properties
  • fl-fuels for listing available fuels
  • Temperature and unit conversion utilities

Option 2: Development Installation (For Contributors)

Clone the repository and install in editable mode:

git clone https://github.com/NatLabRockies/FuelLib.git
cd FuelLib
pip install -e '.[dev]'  # Install with development tools (docs, testing, formatting)

See the Contributing page for more detailed setup instructions and contribution guidelines.

Optional: Use a Dedicated Conda Environment

For better dependency isolation, you can create a conda environment first:

conda create --name fuellib-env python
conda activate fuellib-env
pip install fuellib

Library Usage

This repository includes multiple tutorials of ways to use FuelLib. We recommend starting with the basic tutorial, tutorials/basic.py, which is documented at https://natlabrockies.github.io/FuelLib/tutorials-basic.html. The script tutorials/mixtureProperties.py calculates a given mixture's density, viscosity and vapor pressure from GC x GC data. The results are plotted against data from NIST and Edwards (2020).

Command-Line Tools

After installing FuelLib using one of the methods above, you have access to several command-line tools for plotting, unit conversion, and exporting fuel data. A comprehensive list is provided in the documentation at https://natlabrockies.github.io/FuelLib/tutorials-cli.html.

Contributing

New contributions are always welcome! For detailed contribution guidelines, installation instructions, and development setup, see the Contributing page in the documentation.

Quick start:

  1. Fork the main repository
  2. Create a newFeature branch that contains your changes
  3. Update the sphinx documentation in newFeature
  4. Install development dependencies: pip install -e '.[dev]'
  5. Format the source code files using the provided CLI command: fl-format
  6. Run tests and build documentation locally to verify your changes
  7. Open a Pull Request (PR) from newFeature on your fork to branch main FuelLib repository.

Sphinx Documentation

This repository uses Sphinx to generate documentation.

To build the documentation, first install FuelLib with development support:

pip install -e ".[dev]"

Then use the provided CLI command:

fl-build-docs

The HTML documentation will be generated in docs/_build/html/. Open docs/_build/html/index.html in your web browser to view it.

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

fuellib-3.0.0a9.tar.gz (67.9 kB view details)

Uploaded Source

Built Distribution

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

fuellib-3.0.0a9-py3-none-any.whl (79.6 kB view details)

Uploaded Python 3

File details

Details for the file fuellib-3.0.0a9.tar.gz.

File metadata

  • Download URL: fuellib-3.0.0a9.tar.gz
  • Upload date:
  • Size: 67.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for fuellib-3.0.0a9.tar.gz
Algorithm Hash digest
SHA256 71f46e16c8d6ecceaa836ea9817ebc9fb7663acc58dd948207d773db18432c12
MD5 bedf78978b4116115d80c76482eace34
BLAKE2b-256 e36d25b85f04f279f3406ed064427b2f1925b4060b47b9403ab6ca44b371041e

See more details on using hashes here.

File details

Details for the file fuellib-3.0.0a9-py3-none-any.whl.

File metadata

  • Download URL: fuellib-3.0.0a9-py3-none-any.whl
  • Upload date:
  • Size: 79.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for fuellib-3.0.0a9-py3-none-any.whl
Algorithm Hash digest
SHA256 5752f694c2af29d28a2c4dc99dd6ae4908d7580bd48f39fdc4d12f4e5dfc2ab4
MD5 622ae62fbdef3fdf82cf8d4994de3311
BLAKE2b-256 ce613ada2116b9289b40020b78f91cf8c6a50159005b4bf9ae35837a15977afe

See more details on using hashes here.

Supported by

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