Source Code
This page provides an overview of the source code available at github.com/NatLabRockies/FuelLib.
FuelLib File Organization
docs: directory containing the documentation source files
gcmTableData: directory that contains the pre-tabulated group contributions
fuellib: main package directory containing:
fuel.py: corefuelclass for Group Contribution Method calculationsconstants.py: physical constants (Boltzmann, Avogadro)convert.py: temperature conversion functions and Lennard-Jones calculationsutility.py: utility functions for mixture properties and droplet calculations_data_locator.py: internal module for locating and validating fuel data directoriesdata: directory containing fuel data and metadata
- fuelData:
gcData: directory containing a collection of GCxGC compositional data by weight percentages
groupDecompositionData: directory containing a collection of functional group decompositions
propertiesData: directory containing measurement or predicted data used for validation
fuel_metadata.yaml: YAML file that maps fuel names to their decomposition files and optional metadata fields
exporters: subpackage with CLI exporters for generating fuel properties
converge.py: exporter for Converge CFD simulations (CLI:fl-export-converge)pele.py: exporter for PelePhysics simulations (CLI:fl-export-pele)
cli: subpackage with command-line interface tools for data conversion and analysis
temp_converter.py: temperature conversion utilitiestransport_props_converter.py: transport properties conversion utilitiesplotting.py: plotting utilities for composition and propertiesfuel_manager.py: fuel manager utilitybuild_docs.py: documentation builder utilityclean_docs.py: documentation cleaner utilityformat_code.py: code formatter utility
tests: directory containing CI unit tests for FuelLib. The CI test checks if the cumulative error of property predictions of a new proposed model are less than or equal to the current model.
baselinePredictions: directory that contains baseline predictions and script
generate_baseline.pyfor generating baseline predictions for CI testing.test_accuracy.py: unit test used in CI for verifying new model predictions preserve accuracytest_source_docstrings.py: documentation contract test that checks public source functions include required docstring fields (:param:,:type:,:return:,:rtype:).test_api.py: combined API/signature and function-evaluation test that checks public fuellib module and class method signatures for unexpected API drift and runs representative FuelLib smoke evaluations.test_utilities.py: unit test for utility functions and CLI commands including temperature conversion and transport property calculations.test_hc_identification.py: unit test for hydrocarbon classification logic.get_pred_and_data.py: helper function used bytest_accuracy.pyandbaselinePredictions/generate_baseline.pyto compute predictions and load validation data.
tutorials: directory containing example scripts that demonstrate how to use FuelLib
basic.py: example script that demonstrates basic usage of FuelLibcompositionPlots.py: example script that generates composition plots for a given fuelhefaBlends.py: example script that calculates properties of HEFA:Jet-A blendsmixtureProperties.py: validation script that calculates properties of single component fuels and mixture properties of multicomponent fuels.
Public API
FuelLib’s public API is continuously validated in CI using tests/test_api.py.
This test verifies expected public module/class signatures and runs representative
FuelLib smoke evaluations to catch unintended behavior changes.
The project aims to keep the public API stable across releases. Any intentional breaking API change should be explicitly documented in release notes and accompanied by updates to tests and user-facing documentation.
Click on links below for the full auto-documentation of the API.
|
Class for handling group contribution calculations of thermodynamic and mixture properties. |
Physical constants used in FuelLib calculations. |
|
Unit conversion functions. |
|
Utility functions for mixture calculations and droplet properties. |