bloc.carbon_utils_nobili#

Functions#

generate_species_groups_nobili(gas)

Generate species groups based on Nobili's classification.

generate_reactions_classes_nobili(gas, species_groups)

Generate reaction classes based on Nobili's mechanism. Does not include oxidation, dehydrogenation and

generate_solid_carbon_added_per_reaction_nobili(gas, ...)

Compute the mass of carbon added per kmol for nucleation, HACA, Coalescence and surface growth reactions.

get_average_PP_diameter_nobili(df_resultsP, df_nobili)

Compute the number-weighted average primary particle diameter (m), only primary_particles and aggregates.

get_aggregate_size_distribution_nobili(df_resultsP, ...)

Compute particle size distribution dN/dlogD for a given residence time.

get_primary_particle_size_distribution_nobili(...[, ...])

Compute primary particle size distribution dN/dlogD for a given residence time.

get_pseudo_species_fractions_nobili(df_resultsY)

Compute mass fractions of grouped pseudo-species from a DataFrame of mass fractions.

get_top10_aggregate_species_nobili(df_resultsP, df_nobili)

Return the top 10 aggregate species (not ending with J or 'liq') with their particle concentrations.

get_number_pp_per_aggregate_nobili(df_resultsP, df_nobili)

Compute the number of primary particles per aggregate and the number of primary particles per particle.

get_specific_surface_area_from_PPSD_nobili(...)

Compute the specific surface area (SSA) in m²/g among primary particles and aggregates.

Module Contents#

bloc.carbon_utils_nobili.generate_species_groups_nobili(gas)#

Generate species groups based on Nobili’s classification.

Parameters.#

gas: Cantera Solution object

The gas object containing species information.

returns:

A dictionary containing the generated species groups.

rtype:

dict

bloc.carbon_utils_nobili.generate_reactions_classes_nobili(gas, species_groups)#

Generate reaction classes based on Nobili’s mechanism. Does not include oxidation, dehydrogenation and gas phase reactions.

Parameters:

gas (Cantera Solution object) – The gas object containing reaction information.

Returns:

  • dict – A dictionary containing reaction classes numbers: - ‘HACA’. - ‘Inception’. - ‘Nucleation’. - ‘SurfaceGrowth’. - ‘Coalescence’. - ‘Aggregation’.

  • Does not returns oxidation, dehydrogenation and gas phase reactions.

bloc.carbon_utils_nobili.generate_solid_carbon_added_per_reaction_nobili(gas, reaction_classes, species_groups)#

Compute the mass of carbon added per kmol for nucleation, HACA, Coalescence and surface growth reactions.

Details about condition for each class:
  • Nucleation: Reaction converts a single liquid particle (liq) to a single primary particle (J).

  • HACA: Reaction involves C2H2 and (aggregate or primary particle) as reactants.

  • Coalescence: Reaction involves a liquid particle and a primary particle, mass of carbon added is from the liquid particle.

  • SurfaceGrowthPAH: Reaction involves a PAH and (primary particle or aggregate), mass of carbon added is from the PAH.

  • SurfaceGrowthRadicals: Reaction involves a radical and (primary particle or aggregate), mass of carbon added is from the radical.

For all other reactions, the mass of carbon added is set to zero.

Parameters:
  • gas (Cantera Solution object containing reactions.)

  • reaction_classes (Dictionary of reaction class indices.)

  • species_groups (Dictionary of species groups.)

Returns:

  • np.ndarray (Array of carbon mass (kg/kmol) added per reaction (indexed by reaction number).)

  • If reaction is not in nucleation, HACA or surface growth, returns 0 for that reaction.

bloc.carbon_utils_nobili.get_average_PP_diameter_nobili(df_resultsP, df_nobili)#

Compute the number-weighted average primary particle diameter (m), only primary_particles and aggregates.

Parameters:
  • df_resultsP (DataFrame with species concentrations [#/cm³] and residence_time column.)

  • df_nobili (DataFrame with species properties: 'bin', 'Dpp_m', 'npp')

Return type:

A 1D NumPy array of average primary particle diameters [m] for each time

bloc.carbon_utils_nobili.get_aggregate_size_distribution_nobili(df_resultsP, df_nobili, residence_time, rebin=20, mass_distribution=False, plot_results=False)#

Compute particle size distribution dN/dlogD for a given residence time.

Parameters:
  • df_resultsP (DataFrame with species [#/cm³], includes 'residence_time')

  • df_nobili (DataFrame with 'bin' (species) and 'dcollision_m' (diameter in meters).)

  • residence_time (Residence time value to evaluate.)

  • rebin (Optional. If set, rebins the result into this number of log-spaced bins.)

Returns:

  • D_nm: Bin center diameters [nm]

  • dN_dlogD: Particle density [#/cm³] per dlogD

  • D_nm_rebin: Re-binned diameters [nm] if rebin > 0

  • dN_dlogD_rebin: Re-binned particle density [#/cm³] per dlogD

Return type:

Tuple of 4 NumPy arrays

bloc.carbon_utils_nobili.get_primary_particle_size_distribution_nobili(df_resultsP, df_nobili, residence_time, rebin=20, mass_distribution_pp=False, plot_results=False)#

Compute primary particle size distribution dN/dlogD for a given residence time.

Parameters:
  • df_resultsP (DataFrame with species [#/cm³], includes 'residence_time')

  • df_nobili (DataFrame with 'bin' (species) and 'dcollision_m' (diameter in meters).)

  • residence_time (Residence time value to evaluate.)

  • rebin (Optional. If set, rebins the result into this number of log-spaced bins.)

  • mass_distribution_pp (If True, computes the mass distribution of primary particles.)

Returns:

  • D_nm: Bin center diameters [nm]

  • dN_dlogD: Particle density [#/cm³] per dlogD

  • D_nm_rebin: Re-binned bin center diameters [nm]

  • dN_dlogD_rebin: Re-binned particle density [#/cm³] per dlogD

Return type:

Tuple of two NumPy arrays

bloc.carbon_utils_nobili.get_pseudo_species_fractions_nobili(df_resultsY)#

Compute mass fractions of grouped pseudo-species from a DataFrame of mass fractions.

Parameters:

df_resultsY (DataFrame with species mass fractions. Each row is a time/state.)

Returns:

  • large_pah

  • liquid_particles

  • primary_particles

  • aggregates

  • species_1 … species_5 (first 5 non-BIN species)

  • rest (all other non-BIN species)

Return type:

DataFrame with new columns for grouped species

bloc.carbon_utils_nobili.get_top10_aggregate_species_nobili(df_resultsP, df_nobili)#

Return the top 10 aggregate species (not ending with J or ‘liq’) with their particle concentrations.

Parameters:
  • df_resultsP (DataFrame with species concentrations [#/cm³] and residence_time column.)

  • df_nobili (DataFrame with species properties: 'bin', 'Dpp_m', 'npp')

Returns:

  • A DataFrame with columns 'species_1', 'species_2', ..., 'conc_1', 'conc_2', ,

  • indexed by residence time.

bloc.carbon_utils_nobili.get_number_pp_per_aggregate_nobili(df_resultsP, df_nobili)#

Compute the number of primary particles per aggregate and the number of primary particles per particle.

Parameters:
  • df_resultsP (DataFrame with species concentrations [#/cm³] and residence_time column.)

  • df_nobili (DataFrame with species properties: 'bin', 'Dpp_m', 'npp')

Returns:

  • number_pp_per_aggregate: Number of primary particles per aggregate for each residence time.

  • number_pp_per_solid_particle: Number of primary particles per solid particle for each time.

Return type:

Tuple of two 1D NumPy arrays

bloc.carbon_utils_nobili.get_specific_surface_area_from_PPSD_nobili(df_resultsP, df_nobili)#

Compute the specific surface area (SSA) in m²/g among primary particles and aggregates. Based on theoretical collision diameters and number of pricobdmary particles. Formula is SSA = (sum(Ni * Npp * pi * Dpp_i²)) / (sum(Ni * mi)), summing only primary particles and aggregates.

Parameters:
  • df_resultsP (DataFrame with species concentrations [#/cm³] and residence_time column.)

  • df_nobili (DataFrame with species properties: 'bin', 'dcollision_m', 'mass_kg')

Return type:

A 1D NumPy array of SSA [m²/g] for each row (residence time).