bonsai_ipcc.industry.chemical package
Submodules
bonsai_ipcc.industry.chemical.elementary module
Greenhouse Gas Emission Calculations for Chemical Production
This script calculates CO2 and CH4 emissions from chemical production using IPCC Tier 1-3 methods. It includes functions for:
Tier 1: CO2 emissions using emission factors Tier 2: CO2 emissions via mass balance Tier 3: Direct measurement of CO2 emissions Detailed analysis of combustion, process vent, and flaring emissions Fugitive and process vent methane emissions These reusable functions leverage annual production data, emissions factors, and mass balances. Ensure all input data units are consistent when using these functions.
Author: @Albertkwame Affiliation: Aalborg University, Copenhagen Email: ako@plan.aau.dk
- bonsai_ipcc.industry.chemical.elementary.e_combustion(fa_i_k: float, ncv_k: float, ef_k: float) float [source]
Calculate the CH4 emissions from the combustion of a specific fuel k for petrochemical product i.
This is a part of Equation 3.28 from the IPCC guidelines. The function calculates the emissions for one type of fuel and should be used inside a loop to sum the emissions for all types of fuel.
Parameters: - fa_ij_k: The amount of fuel k consumed for production of petrochemical i, in tonnes. - ncv_k: The net calorific value of fuel k, in TJ/tonne. - ef_k: The CH4 emission factor of fuel k, in kg/TJ.
Returns: - CH4 emissions from the combustion of fuel k for product i.
- bonsai_ipcc.industry.chemical.elementary.e_flare(fg_i_k: float, ncv_k: float, ef_k: float) float [source]
Calculate the CH4 emissions from the flaring of a specific gas k for petrochemical product i.
This is a part of Equation 3.29 from the IPCC guidelines. The function calculates the emissions for one type of flared gas and should be used inside a loop to sum the emissions for all types of flared gas.
Parameters: - fg_ij_k: The amount of gas k flared during production of petrochemical i, in tonnes. - ncv_k: The net calorific value of flared gas k, in TJ/tonne. - ef_k: The CH4 emission factor of flared gas k, in kg/TJ.
Returns: - CH4 emissions from the flaring of gas k for product i.
- bonsai_ipcc.industry.chemical.elementary.e_hfc_23_by_monitoring(c_i: float, p_i: float) float [source]
Calculate total HFC-23 emissions from individual process streams by monitoring reactor product (Equation 3.36).
- bonsai_ipcc.industry.chemical.elementary.e_hfc_23_direct_method(c_ij: float, f_ij: float) float [source]
Calculate total HFC-23 emissions from individual process streams using the direct method (Equation 3.34).
- bonsai_ipcc.industry.chemical.elementary.e_hfc_23_proxy_method(e_ij: float) float [source]
Calculate total HFC-23 emissions from individual process streams using proxy methods (Equation 3.35).
- bonsai_ipcc.industry.chemical.elementary.e_i(c_i: float, p_i: float, tf: float, r_i: float) float [source]
Calculate the emissions of HFC-23 from an individual facility based on in-process measurements (Equation 3.40).
- Parameters:
c_i (float) – The concentration of HFC-23 in the reactor product at facility i (kg HFC-23/kg HCFC-22).
p_i (float) – The mass of HCFC-22 produced at facility i while this concentration applied (kg).
tf (float) – The fractional duration during which this HFC-23 is actually vented to the atmosphere (dimensionless).
r_i (float) – The quantity of HFC-23 recovered from facility i for use as chemical feedstock, and hence destroyed (kg).
- Returns:
The HFC-23 emissions from an individual facility (kg).
- Return type:
- bonsai_ipcc.industry.chemical.elementary.e_ij_hfc_23_proxy_method(s_ij: float, f_ij: float, por_ij: float, t: float, r_ij: float) float [source]
Calculate HFC-23 emissions from an individual process stream using the proxy method (Equation 3.38).
- Parameters:
s_ij (float) – The standard mass emission of HFC-23 in vent stream j at plant i (kg).
f_ij (float) – A dimensionless factor relating the measured standard mass emission rate to the emission rate at the actual plant operating rate.
por_ij (float) – The proxy operating rate (such as process operating rate) at plant i during the trial (unit/hour).
t (float) – The total duration of venting for the year, or the period if the process is not operated continuously (hours).
r_ij (float) – The quantity of HFC-23 recovered for vent stream j at plant i for use as chemical feedstock, or hence destroyed (kg).
- Returns:
The mass emission of HFC-23 from the process stream j at plant i (kg).
- Return type:
- bonsai_ipcc.industry.chemical.elementary.e_ij_instantaneous_hfc_23_direct_method(c_ij: float, f_ij: float, t: float) float [source]
Calculate ‘instantaneous’ HFC-23 emissions from an individual process stream (Equation 3.37).
- Parameters:
- Returns:
The ‘instantaneous’ HFC-23 emissions for the given process stream (kg).
- Return type:
- bonsai_ipcc.industry.chemical.elementary.ech4_fugitive(pp: float, ef: float) float [source]
Calculate fugitive CH4 emissions from the production of chemical i using Equation 3.23.
- bonsai_ipcc.industry.chemical.elementary.ech4_process_vent(pp: float, ef: float) float [source]
Calculate process vent CH4 emissions from the production of chemical i using Equation 3.24.
- bonsai_ipcc.industry.chemical.elementary.ech4_tier1(ech4_fugitive: float, ech4_process_vent: float) float [source]
Calculate total CH4 emissions from the production of chemical i using Equation 3.25.
- bonsai_ipcc.industry.chemical.elementary.ech4_tier3a(c_total_vocs: float, ch4_fraction: float, ch4_background_level: float, WS: float, PA: float) float [source]
Calculate total plant CH4 emissions from atmospheric measurement data using Equation 3.26.
- Parameters:
c_total_vocs (float) – VOC concentration at the plant, in micrograms/m^3.
ch4_fraction (float) – Fraction of total VOC concentration that is CH4.
ch4_background_level (float) – Ambient CH4 concentration at background location, in micrograms/m^3.
WS (float) – Wind speed at the plant, in metres/second.
PA (float) – Plume area, in square metres.
- Returns:
Total CH4 emissions from the plant, in micrograms/second.
- Return type:
- bonsai_ipcc.industry.chemical.elementary.ech4_tier3b(e_combustion: float, ech4_process_vent: float, e_flare: float) float [source]
Calculate the total emissions of CH4 from production of chemical i using Equation 3.27.
- Parameters:
- Returns:
The total emissions of CH4 from production of chemical i, in kg.
- Return type:
- bonsai_ipcc.industry.chemical.elementary.eco2_tier1(pp: float, ef: float, gaf: float) float [source]
Implements Equation 3.15 to calculate the CO2 emissions for chemical production using Tier 1 emission factors.
This method computes the CO2 emissions by considering the annual production of the chemical, its specific CO2 emission factor, and a geographic adjustment factor, as per Equation 3.15.
- Parameters:
- Returns:
The calculated CO2 emissions from the production of chemical i, in tonnes.
- Return type:
Examples
>>> eco2_tier1(1000, 0.5, 100) 500.0
Notes
The GAF should be provided as a percentage value where 100 represents no adjustment, less than 100 indicates a reduction, and more than 100 indicates an increase in the CO2 emissions due to geographic efficiency differences.
- bonsai_ipcc.industry.chemical.elementary.eco2_tier2(fa_fc, pp_pc, sp_sc) float [source]
Implements Equation 3.17 to calculate CO2 emissions from the production of chemical i using the Tier 2 mass balance method. Equation has been subdivided.
- Parameters:
- Returns:
CO2 emissions from the production of chemical i, in t/yr.
- Return type:
- bonsai_ipcc.industry.chemical.elementary.ef_carbon_balance(cbe: float, f_efficiency_loss: float, fcc: float = 0.81) float [source]
Calculate the HFC-23 emission factor from carbon balance efficiency (Equation 3.32).
- Parameters:
- Returns:
The HFC-23 emission factor calculated from carbon balance efficiency.
- Return type:
- bonsai_ipcc.industry.chemical.elementary.ef_fluorine_balance(fbe: float, f_efficiency_loss: float, ffc: float = 0.54) float [source]
Calculate the HFC-23 emission factor from fluorine balance efficiency (Equation 3.33).
- Parameters:
- Returns:
The HFC-23 emission factor calculated from fluorine balance efficiency.
- Return type:
- bonsai_ipcc.industry.chemical.elementary.ef_hfc23_average(carbon, flurine)[source]
Calculate average of carbon and flurine emission factor (as described on page 3.13)
- bonsai_ipcc.industry.chemical.elementary.fa_fc(fa, fc) float [source]
Implements Equation 3.17 to calculate the carbon input of the production of chemical i using the Tier 2 mass balance method.
- bonsai_ipcc.industry.chemical.elementary.pp_i(fa, spp) float [source]
Implements Equation 3.16 to estimate the annual production of a chemical using feedstock consumption and specific production factors.
- Parameters:
- Returns:
The estimated annual production of the chemical (PP_i), in tonnes.
- Return type:
- bonsai_ipcc.industry.chemical.elementary.pp_pc(pp, pc) float [source]
Implements Equation 3.17 to calculate carbon output of the production of chemical i using the Tier 2 mass balance method.
- bonsai_ipcc.industry.chemical.elementary.sp_acrylonitrile_j(fp_acrylonitrile, ssp) float [source]
Implements Equation 3.19 to estimate the annual production of a secondary product j from acrylonitrile production.
- bonsai_ipcc.industry.chemical.elementary.sp_ethylene_j(fa_ethylene, ssp) float [source]
Implements Equation 3.18 to estimate the annual production of a secondary product j from ethylene production.
- bonsai_ipcc.industry.chemical.elementary.sp_sc(sp, sc) float [source]
Implements Equation 3.17 to calculate CO2 emissions from the production of chemical i using the Tier 2 mass balance method.
- bonsai_ipcc.industry.chemical.elementary.st_ij(ct_ij: float, ft_ij: float, por_t_ij: float) float [source]
Calculate the standard emission for the proxy method (Equation 3.39).
- Parameters:
ct_ij (float) – The average mass fractional concentration of HFC-23 in vent stream j at plant i during the trial (kg HFC-23/kg gas).
ft_ij (float) – The average mass flow rate of vent stream j at plant i during the trial (kg/hour).
por_t_ij (float) – The proxy quantity (such as process operating rate) at plant i during the trial (unit/hour).
- Returns:
The standard mass emission of HFC-23 in vent stream j at plant i (‘unit’ in units compatible with the factors in Equation 3.38).
- Return type:
- bonsai_ipcc.industry.chemical.elementary.tier1_e_hfc_23(ef_default: float, p_hcfc_22: float) float [source]
Estimate HFC-23 emissions from HCFC-22 production using the Tier 1 default factor. This is a part of Equation 3.30 from the IPCC guidelines.
- bonsai_ipcc.industry.chemical.elementary.tier1_e_k(ef_default_k: float, p_k: float) float [source]
Calculate the production-related emissions of fluorinated greenhouse gases (Equation 3.41).
- bonsai_ipcc.industry.chemical.elementary.tier2_e_hfc_23(ef_calculated: float, p_hcfc_22: float, f_released: float) float [source]
Estimate HFC-23 emissions from HCFC-22 production using calculated factors from process efficiencies (Tier 2). This is a part of Equation 3.31 from the IPCC guidelines.
- bonsai_ipcc.industry.chemical.elementary.tier3_e_k_direct(c_ij: float, f_ij: float, t: float) float [source]
Calculate the total production-related emissions of fluorinated greenhouse gases using Tier 3 direct method (Equation 3.42).
bonsai_ipcc.industry.chemical.sequence module
- bonsai_ipcc.industry.chemical.sequence.tier1_ch4_pp(year=2006, region='GB', product='methanol', uncertainty='def')[source]
Tier 1 method total CH4 emissions calculations. Starting with data input for parameter pp (anual production of petrochemical)
Argument
- yearint
year under study
- regionstr
region under study
- productstr
type of petrochemical product
- uncertaintystr
‘analytical’, ‘monte_carlo’ or a property dimension, e.g. ‘def’
- returns:
VALUE – Inlcudes the results of each step of the sequence.
- rtype:
DataClass
- bonsai_ipcc.industry.chemical.sequence.tier1_co2_fa(year=2006, region='GB', product='methanol', uncertainty='def')[source]
Tier 1 method CO2 Emissions. Starting with data input for parameter fa (anual consumption of feedstock)
Argument
- yearint
year under study
- regionstr
region under study
- productstr
type of petrochemical product
- uncertaintystr
‘analytical’, ‘monte_carlo’ or a property dimension, e.g. ‘def’
- returns:
VALUE – Inlcudes the results of each step of the sequence.
- rtype:
DataClass
- bonsai_ipcc.industry.chemical.sequence.tier1_co2_pp(year=2006, region='GB', product='methanol', uncertainty='def')[source]
Tier 1 method CO2 Emissions. Starting with data input for parameter pp (anual production of petrochemical)
Argument
- yearint
year under study
- regionstr
region under study
- productstr
type of petrochemical product
- uncertaintystr
‘analytical’, ‘monte_carlo’ or a property dimension, e.g. ‘def’
- returns:
VALUE – Inlcudes the results of each step of the sequence.
- rtype:
DataClass
- bonsai_ipcc.industry.chemical.sequence.tier1_e_hfc23(year=2006, region='GB', uncertainty='def')[source]
Tier 1 method HFC-23 emissions based on default IPCC emission factors (Equation 3.30).
Argument
- yearint
year under study
- regionstr
region under study
- uncertaintystr
‘analytical’, ‘monte_carlo’ or a property dimension, e.g. ‘def’
- returns:
VALUE – Inlcudes the results of each step of the sequence.
- rtype:
DataClass
- bonsai_ipcc.industry.chemical.sequence.tier1_fgas(year=2006, region='GB', product='hfc-32', uncertainty='def')[source]
Tier 1 method F-GAS emissions calculations. Starting with data input for parameter ef_default_k (production-related emissions of fluorinated greenhouse gas) and p_k (total production of fluorinated greenhouse gas k, kg)
Argument
- yearint
year under study
- regionstr
region under study
- productstr
type of fluorinated greenhouse gas
- uncertaintystr
‘analytical’, ‘monte_carlo’ or a property dimension, e.g. ‘def’
- returns:
VALUE – Inlcudes the results of each step of the sequence.
- rtype:
DataClass
- bonsai_ipcc.industry.chemical.sequence.tier2_co2(year=2006, region='GB', product='methanol', uncertainty='def')[source]
Tier 2 method CO2 Emissions.
Argument
- yearint
year under study
- regionstr
region under study
- productstr
type of petrochemical product
- uncertaintystr
‘analytical’, ‘monte_carlo’ or a property dimension, e.g. ‘def’
- returns:
VALUE – Inlcudes the results of each step of the sequence.
- rtype:
DataClass
- bonsai_ipcc.industry.chemical.sequence.tier2_e_hfc23(year=2006, region='GB', uncertainty='def')[source]
Tier 2 method HFC-23 emissions based on calculated emission factors via carbon or fluorine balance eficiency methods (Equation 3.31).
Argument
- yearint
year under study
- regionstr
region under study
- uncertaintystr
‘analytical’, ‘monte_carlo’ or a property dimension, e.g. ‘def’
- returns:
VALUE – Includes the results of each step of the sequence.
- rtype:
DataClass
- bonsai_ipcc.industry.chemical.sequence.tier3_fgas(year: int = 2006, region: str = 'a specific plant', fgas: str = 'pfc-14', uncertainty: str = 'def')[source]
Tier 3 direct calculation of production related emissions for fluorinated greenhouse gases.
Based on data input for parameter c_ij (concentration of F-GAS ‘k’ in the gas stream vented from process stream ‘j’ at plant ‘i’) and f_ij (mass flow of the gas stream for F-GAS ‘k’ from process stream ‘j’ at plant ‘i’).
- Parameters:
- Returns:
VALUE – Total production-related emissions for the given product and region in the specified year.
- Return type: