fuellib.fuel.core.Fuel
- class fuellib.fuel.core.Fuel(name, data_dir=None, *, use_ref_props=True)
Bases:
objectClass for handling calculations of thermodynamic and mixture properties.
Initialize a Fuel instance.
- Parameters:
name (str) – Name of the fuel.
data_dir (str | Path | None) – Directory containing fuel data. Defaults to fuellib/data.
use_ref_props (bool) – Whether to use reference compound properties for calculations. Defaults to True.
- Raises:
FileNotFoundError – If the fuel data directory does not exist.
ValueError – If the GCxGC data file is missing required columns.
Attributes
Number of components in the fuel.
Name of the fuel.
Directory containing fuel data.
GCxGC data as a DataFrame.
Matched components data with reference compounds.
Property data for the fuel/mixture, if available.
Fuel metadata, if available.
Components attribute for the fuel.
Mixture attribute for the fuel.
Normalized weight fractions from the GCxGC data.
Normalized mole fractions from the GCxGC data.
Methods
- __init__(name, data_dir=None, *, use_ref_props=True)
Initialize a Fuel instance.
- Parameters:
name (str) – Name of the fuel.
data_dir (str | Path | None) – Directory containing fuel data. Defaults to fuellib/data.
use_ref_props (bool) – Whether to use reference compound properties for calculations. Defaults to True.
- Raises:
FileNotFoundError – If the fuel data directory does not exist.
ValueError – If the GCxGC data file is missing required columns.
- Return type:
None
- components_data: DataFrame
Matched components data with reference compounds.
- comps: Components
Components attribute for the fuel.
- data_dir: Path
Directory containing fuel data.
- gc_data: DataFrame
GCxGC data as a DataFrame.
- metadata: dict | None
Fuel metadata, if available.
- name: str
Name of the fuel.
- property num_compounds: int
Number of components in the fuel.
- prop_data: DataFrame | None
Property data for the fuel/mixture, if available.
- x0: Quantity[ndarray[tuple[int]]]
Normalized mole fractions from the GCxGC data.
- y0: Quantity[ndarray[tuple[int]]]
Normalized weight fractions from the GCxGC data.