fuellib.fuel.components.Components
- class fuellib.fuel.components.Components(fuel)
Bases:
objectClass representing fuel components.
Initialize the Components class with fuel data.
Attributes
Derived cetane number (DCN) of the fuel components (dimensionless).
Hydrocarbon family codes for thermal conductivity.
Molecular formulas of the fuel components.
Gibbs free energy of formation (at STP) of the components in J/mol.
Hydrocarbon type of each fuel component.
Enthalpy of formation (at STP) of the fuel components in J/mol.
Enthalpy of vaporization (at STP) of the fuel components in J/mol.
Lennard-Jones potential well depth divided by Boltzmann constant in K.
Lennard-Jones collision diameter of the fuel components in m.
Molecular weights of the fuel components in kg/mol.
Reference compound names of the fuel components.
Number of carbon atoms in each fuel component.
Number of hydrogen atoms in each fuel component.
Acentric factor of the fuel components (dimensionless).
Critical pressure of the fuel components in Pa.
PelePhysics species keys of the fuel components, if in the GCxGC data.
RDKit Mol objects for the fuel components.
SMILES strings of the fuel components.
Boiling point of the fuel components in K.
Critical temperature of the fuel components in K.
Melting point of the fuel components in K.
Critical molar volume of the fuel components in m^3/mol.
Molar volume (at STP) of the fuel components in m^3/mol.
Yield Sooting Index (YSI) of the fuel components (dimensionless).
Methods
Compute specific heat capacity at a given temperature.
Compute diffusion coefficients using Lennard-Jones parameters.
Calculate enthalpy of vaporization adjusted for temperature.
Calculate thermal conductivity at a given temperature.
Convert mass of each component to mole fractions (xi).
Convert mass of each component to mass fractions (yi).
Calculate component dynamic viscosity.
Calculate component kinematic viscosity.
Compute vapor pressure.
Estimate Antoine coefficients for vapor pressure of each compound.
Calculate the density of each component at a given temperature.
Calculate surface tension of each compound at a given temperature.
Calculate flash point of each compound.
Compute molar liquid volume with temperature correction.
Convert mole fractions (xi) to mass fractions (yi).
Convert mass fractions (yi) to volume fractions (vi).
Convert mass fractions (yi) to mole fractions (xi).
- Parameters:
fuel (Fuel)
- __init__(fuel)
Initialize the Components class with fuel data.
- Parameters:
fuel (Fuel)
- Return type:
None
- cp(temp, comp_idx=None, basis='mass')
Compute specific heat capacity at a given temperature.
- Parameters:
temp (Quantity[float]) – Temperature to compute property.
comp_idx (int | None) – Index of compound to calculate property for. Defaults to None (all compounds).
basis (Literal['mass', 'molar']) – Basis of the heat capacity (“mass” or “molar”). Defaults to “mass”.
- Returns:
Specific heat capacity in J/kg/K (mass basis) or J/mol/K (molar basis).
- Raises:
ValueError – If basis is not “mass” or “molar”.
- Return type:
Quantity[ndarray[tuple[int]]]
- d(p, temp, sigma_gas=Quantity(3.62, 'angstrom'), lj_eps_by_kb_gas=Quantity(97.0, 'kelvin'), mw_gas=Quantity(0.02897, 'kilogram / mole'), correlation='Tee')
Compute diffusion coefficients using Lennard-Jones parameters.
Uses Wilke and Lee method (Poling, equation 11-4.1). Ambient gas defaults to air parameters.
- Parameters:
p (Quantity[float]) – Pressure to compute property.
temp (Quantity[float]) – Temperature to compute property.
sigma_gas (Quantity[float]) – Collision diameter. Default is 3.62 Angstroms.
lj_eps_by_kb_gas (Quantity[float]) – Well depth over Boltzmann constant. Default is 97.0 K.
mw_gas (Quantity[float]) – Mean molecular weight of ambient gas. Default is 28.97 g/mol.
correlation (Literal['Tee', 'Wilke']) – Method to calculate sigma and epsilon (“Tee” or “Wilke”). Default is “Tee”.
- Returns:
Diffusion coefficient in m^2/s.
- Return type:
Quantity[ndarray[tuple[int]]]
- property dcn: Quantity[ndarray[tuple[int]]]
Derived cetane number (DCN) of the fuel components (dimensionless).
- Raises:
ValueError – If any reference values for DCN are missing.
- property fam: ndarray[tuple[int]]
Hydrocarbon family codes for thermal conductivity.
Code
Hydrocarbon Family
0
saturated
1
aromatics
2
cycloparaffins
3
olefins
- Raises:
ValueError – If an unknown hydrocarbon type is encountered.
- property formulas: list[str]
Molecular formulas of the fuel components.
- property gf_stp: Quantity[ndarray[tuple[int]]]
Gibbs free energy of formation (at STP) of the components in J/mol.
- property hc_type: list[str]
Hydrocarbon type of each fuel component.
Possible values (in ascending priority) are: * “n-alkane” * “iso-alkane” * “alkene” * “cyclo-alkane” * “aromatic”
- property hf_stp: Quantity[ndarray[tuple[int]]]
Enthalpy of formation (at STP) of the fuel components in J/mol.
- hv(temp, comp_idx=None, basis='mass')
Calculate enthalpy of vaporization adjusted for temperature.
- Parameters:
temp (Quantity[float]) – Temperature to compute property.
comp_idx (int | None) – Index of compound to calculate property for. Defaults to None (all compounds).
basis (Literal['mass', 'molar']) – Basis of the enthalpy of vaporization (“mass” or “molar”). Defaults to “mass”.
- Returns:
Enthalpy of vaporization in J/kg (mass basis) or J/mol (molar basis).
- Raises:
ValueError – If basis is not “mass” or “molar”.
- Return type:
Quantity[ndarray[tuple[int]]]
- property hv_stp: Quantity[ndarray[tuple[int]]]
Enthalpy of vaporization (at STP) of the fuel components in J/mol.
- k(temp, comp_idx=None)
Calculate thermal conductivity at a given temperature.
Uses Latini et al. method (Poling equation 10-9.1).
- Parameters:
temp (Quantity[float]) – Temperature to compute property.
comp_idx (int | None) – Index of compound to calculate property for. Defaults to None (all compounds).
- Returns:
Thermal conductivity in W/m/K.
- Return type:
Quantity[ndarray[tuple[int]]]
- property lj_eps_by_kb: Quantity[ndarray[tuple[int]]]
Lennard-Jones potential well depth divided by Boltzmann constant in K.
- property lj_sigma: Quantity[ndarray[tuple[int]]]
Lennard-Jones collision diameter of the fuel components in m.
- mass2x(mass)
Convert mass of each component to mole fractions (xi).
- Parameters:
mass (Quantity[ndarray[tuple[int]]]) – Mass of each compound.
- Returns:
num_compounds,).
- Return type:
Mole fractions of the compounds (shape
- mass2y(mass)
Convert mass of each component to mass fractions (yi).
- Parameters:
mass (Quantity[ndarray[tuple[int]]]) – Mass of each compound.
- Returns:
num_compounds,).
- Return type:
Mass fractions of the compounds (shape
- mu(temp, comp_idx=None, correlation='Nannoolal')
Calculate component dynamic viscosity.
- Parameters:
temp (Quantity[float]) – Temperature to compute property.
comp_idx (int | None) – Index of compound to calculate property for. Defaults to None (all compounds).
correlation (Literal['Dutt', 'Nannoolal']) – Correlation method (“Dutt” or “Nannoolal”). Defaults to “Nannoolal”.
- Returns:
Dynamic viscosity in Pa*s.
- Raises:
ValueError – If correlation is not Dutt or Nannoolal.
- Return type:
Quantity[ndarray[tuple[int]]]
- property mw: Quantity[ndarray[tuple[int]]]
Molecular weights of the fuel components in kg/mol.
- property names: list[str]
Reference compound names of the fuel components.
- nu(temp, comp_idx=None, correlation='Nannoolal')
Calculate component kinematic viscosity.
- Parameters:
temp (Quantity[float]) – Temperature to compute property.
comp_idx (int | None) – Index of compound to calculate property for. Defaults to None (all compounds).
correlation (Literal['Dutt', 'Nannoolal']) – Correlation method (“Dutt” or “Nannoolal”). Defaults to “Nannoolal”.
- Returns:
Viscosity of each component in m^2/s.
- Raises:
ValueError – If correlation is not Dutt or Nannoolal.
- Return type:
Quantity[ndarray[tuple[int]]]
- property num_c: ndarray
Number of carbon atoms in each fuel component.
- property num_h: ndarray
Number of hydrogen atoms in each fuel component.
- property omega: Quantity[ndarray[tuple[int]]]
Acentric factor of the fuel components (dimensionless).
- property pc: Quantity[ndarray[tuple[int]]]
Critical pressure of the fuel components in Pa.
- property pelephysics_keys: list[str] | None
PelePhysics species keys of the fuel components, if in the GCxGC data.
- pvap(temp, comp_idx=None, correlation='Lee-Kesler')
Compute vapor pressure.
Can use Ambrose-Walton or Lee-Kesler correlations (default Lee-Kesler).
- Parameters:
temp (Quantity[float]) – Temperature to compute property.
comp_idx (int | None) – Index of compound to calculate property for. Defaults to None (all compounds).
correlation (Literal['Ambrose-Walton', 'Lee-Kesler']) – Correlation method (“Ambrose-Walton” or “Lee-Kesler”). Defaults to “Lee-Kesler”.
- Returns:
Vapor pressure in Pa.
- Return type:
Quantity[ndarray[tuple[int]]]
- pvap_antoine_coeffs(temp_vals=None, units='mks', correlation='Lee-Kesler')
Estimate Antoine coefficients for vapor pressure of each compound.
- Parameters:
temp_vals (Quantity[ndarray[tuple[int]]] | None) – Temperature range or nodes for Antoine fit in Kelvin. Defaults to [273.15, Tb_i].
units (Literal['mks', 'cgs', 'dyne/cm^2', 'Pa']) – Units for pressure in fit (“mks”, “cgs”, “dyne/cm^2”, “Pa”). Defaults to “mks”.
correlation (Literal['Ambrose-Walton', 'Lee-Kesler']) – Correlation method (“Ambrose-Walton” or “Lee-Kesler”). Defaults to “Lee-Kesler”.
- Returns:
Coefficients A, B, C, D for each compound.
- Return type:
tuple[ndarray[tuple[int]], ndarray[tuple[int]], ndarray[tuple[int]], ndarray[tuple[int]]]
- property rdkit_mols: list[Mol]
RDKit Mol objects for the fuel components.
- rho(temp, comp_idx=None)
Calculate the density of each component at a given temperature.
- Parameters:
temp (Quantity[float]) – Temperature to compute property.
comp_idx (int | None) – Index of compound to calculate property for. Defaults to None (all compounds).
- Returns:
Density of each compound in kg/m^3.
- Return type:
Quantity[ndarray[tuple[int]]]
- sigma(temp, comp_idx=None, correlation='Brock-Bird')
Calculate surface tension of each compound at a given temperature.
Uses Brock-Bird (default) or Pitzer correlations (Poling 12-3.5, 12-3.7).
- Parameters:
temp (Quantity[float]) – Temperature to compute property.
comp_idx (int | None) – Index of compound to calculate property for. Defaults to None (all compounds).
correlation (Literal['Brock-Bird', 'Pitzer']) – Correlation method (“Brock-Bird” or “Pitzer”). Defaults to “Brock-Bird”.
- Returns:
Surface tension in N/m.
- Return type:
Quantity[ndarray[tuple[int]]]
- property smiles: list[str]
SMILES strings of the fuel components.
- t_flash(comp_idx=None, correlation='Alibakhshi')
Calculate flash point of each compound.
- Parameters:
comp_idx (int | None) – Index of compound to calculate property for. Defaults to None (all compounds).
correlation (Literal['Alqaheem', 'Alibakhshi']) – Correlation method (“Alqaheem” or “Alibakhshi”). Defaults to “Alibakhshi”.
- Returns:
Flash point in K.
- Return type:
Quantity[ndarray[tuple[int]]]
- property tb: Quantity[ndarray[tuple[int]]]
Boiling point of the fuel components in K.
- property tc: Quantity[ndarray[tuple[int]]]
Critical temperature of the fuel components in K.
- property tm: Quantity[ndarray[tuple[int]]]
Melting point of the fuel components in K.
- property vc: Quantity[ndarray[tuple[int]]]
Critical molar volume of the fuel components in m^3/mol.
- vm(temp, comp_idx=None)
Compute molar liquid volume with temperature correction.
- Parameters:
temp (Quantity[float]) – Temperature to compute property.
comp_idx (int | None) – Index of compound to calculate property for. Defaults to None (all compounds).
- Returns:
Molar liquid volume in m^3/mol.
- Return type:
Quantity[ndarray[tuple[int]]]
- property vm_stp: Quantity[ndarray[tuple[int]]]
Molar volume (at STP) of the fuel components in m^3/mol.
- x2y(xi)
Convert mole fractions (xi) to mass fractions (yi).
- Parameters:
xi (Quantity[ndarray[tuple[int]]]) – Mole fractions of each compound.
- Returns:
num_compounds,).
- Return type:
Mass fractions of the compounds (shape
- y2v(yi, temp)
Convert mass fractions (yi) to volume fractions (vi).
- Parameters:
yi (Quantity[ndarray[tuple[int]]]) – Mass fractions of each compound.
temp (Quantity[float]) – Temperature at which to evaluate the mixture density.
- Returns:
num_compounds,).
- Return type:
Volume fractions of the compounds (shape
- y2x(yi)
Convert mass fractions (yi) to mole fractions (xi).
- Parameters:
yi (Quantity[ndarray[tuple[int]]]) – Mass fractions of each compound.
- Returns:
num_compounds,).
- Return type:
Mole fractions of the compounds (shape
- property ysi: Quantity[ndarray[tuple[int]]]
Yield Sooting Index (YSI) of the fuel components (dimensionless).
- Raises:
ValueError – If any reference values for YSI are missing.