Skip to content

Commit

Permalink
Merge pull request #36 from SINTEF/hotfix/wtw-co2-calculation
Browse files Browse the repository at this point in the history
fuel eu maritime factor updated and bug fixed
  • Loading branch information
kevinksyTRD authored Jan 6, 2025
2 parents 2bf5002 + e766fb2 commit 685157b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion feems/feems/fuel.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class FuelOrigin(Enum):

_FUEL_CLASS_FUEL_EU_MARITIME_MAPPING = {
FuelOrigin.FOSSIL: "Fossil",
FuelOrigin.BIO: "Bio",
FuelOrigin.BIO: "BIO",
FuelOrigin.RENEWABLE_NON_BIO: "RFNBO",
}

Expand Down
11 changes: 6 additions & 5 deletions feems/feems/package_data/fuel_eu_fuel_table.csv
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,19 @@ Fossil,LNG,0.0491,18.5,Fuel Cells,2.75,0,0,0,56.00814664,2.75,74.50814664
Fossil,LPG (Butane),0.046,7.8,ALL ICEs,3.03,0,0,0,65.86956522,3.03,73.66956522
Fossil,LPG (Propane),0.046,7.8,ALL ICEs,3,0,0,0,65.2173913,3,73.0173913
Fossil,H2,0.12,132,Fuel Cells,0,0,0,0,0,0,132
Fossil,H2,0.12,132,ICE,0,0,0,0,0,0,132
Fossil,H2,0.12,132,ALL ICEs,0,0,0,0,0,0,132
Fossil,NH3,0.0186,121,Fuel Cells,0,0,0,0,0,0,121
Fossil,NH3,0.0186,121,ICE,0,0,0,0,0,0,121
Fossil,Methanol,0.0199,31.3,ALL ICEs,1.375,0.00005,0.00018,0,71.85376884,1.42989,103.1537688
BIO,Methanol,0.0199,-58.35376884,ALL ICEs,1.375,0.00005,0.00018,0,71.85376884,1.42989,13.5
BIO,Ethanol,0.0268,-33.2,ALL ICEs,1.913,0,0,0,71.38059701,1.913,38.18059701
BIO,Diesel,0.044,-26.1,ALL ICEs,2.834,0.00005,0.00018,0,77.65833333,2.88889,51.55833333
BIO,HVO,0.05,-20.7,ALL ICEs,3.115,0.00005,0.00018,0,72.04295455,3.16989,51.34295455
BIO,Diesel,0.0372,-26.1,ALL ICEs,2.834,0.00005,0.00018,0,77.65833333,2.88889,51.55833333
BIO,HVO,0.044,-20.7,ALL ICEs,3.115,0.00005,0.00018,0,72.04295455,3.16989,51.34295455
BIO,LNG,0.05,-38.9,LNG otto (medium speed),2.75,0,0.00011,3.1,69.4302764,3.47151382,30.5302764
BIO,LNG,0.05,-38.9,LNG diesel (slow speed),2.75,0,0.00011,1.7,63.2094548,3.16047274,24.3094548
BIO,LNG,0.05,-38.9,LNG diesel (slow speed),2.75,0,0.00011,0.2,56.5442888,2.82721444,17.6442888
BIO,LNG,0.05,-38.9,LBSI,2.75,0,0.00011,2.6,55.6556,2.78278,16.7556
BIO,LNG,0.05,-38.9,Fuel Cells,2.75,0,0,0,71.85376884,1.42989,13.5
BIO,LNG,0.05,-38.9,LBSI,2.75,0,0.00011,2.6,67.2085544,3.36042772,28.3085544
BIO,LNG,0.05,-38.9,Fuel Cells,2.75,0,0,0,55,2.75,16.1
BIO,Other,,,ALL ICEs,3.115,0.00005,0.00018,0,,,
BIO,H2,0.12,0,Fuel Cells,0,0,0,0,0,0,0
BIO,H2,0.12,0,ALL ICEs,0,0,0,0,0,0,0
Expand Down
23 changes: 14 additions & 9 deletions feems/feems/package_data/fuel_imo_table.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,29 @@ Base,MEPC.308(73) 2018 Guidelines on the method of calculation of the attained E
fuel_class,pathway_name,LCV,CO2_WtT,Cf_CO2,Cf_CH4,Cf_N2O,C_slip
,,MJ/g,gCO2eq/MJ,gCO2/gFuel,gCO2/gFuel,gCO2/gFuel,Percent
Fossil,HFO,0.0402,0,3.114,0,0,0
Fossil,LFO,0.0402,0,3.114,0,0,0
Fossil,LFO,0.0402,0,3.151,0,0,0
Fossil,LSFO (Crude),0.0405,0,3.151,0,0,0
Fossil,LSFO (Blend),0.0405,0,3.151,0,0,0
Fossil,ULSFO,0.0405,0,3.114,0,0,0
Fossil,VLSFO,0.041,0,3.206,0,0,0
Fossil,Diesel,0.0427,0,3.206,0,0,0
Fossil,LNG,0.048,0,2.75,0,0,0
Fossil,LPG (Butane),0.0457,0,3.03,0,0,0
Fossil,LPG (Propane),0.0463,0,3,0,0,0
Fossil,H2,0.12,0,0,0,0,0
Fossil,NH3,0.0186,0,0,0,0,0
Fossil,Methanol,0.0199,0,1.375,0,0,0
BIO,Ethanol,0.027,0,1.913,0,0,0
BIO,Diesel,0.044,0,2.834,0,0,0
BIO,Methanol,0.0199,0,0.701,0,0,0
BIO,Ethanol,0.027,0,0.976,0,0,0
BIO,Diesel,0.044,0,1.448,0,0,0
BIO,HVO,,0,3.115,0,0,0
BIO,LNG,0.05,0,2.75,0,0,0
BIO,LNG,0.05,0,1.405,0,0,0
BIO,Other,,0,3.115,0,0,0
BIO,H2,0.12,0,0,0,0,0
RFNBO,Diesel,0.0427,0,3.206,0,0,0
RFNBO,Methanol,0.0199,0,1.375,0,0,0
RFNBO,LNG,0.0491,0,2.75,0,0,0
RFNBO,Diesel,0.0427,0,0,0,0,0
RFNBO,Methanol,0.0199,0,0,0,0,0
RFNBO,LNG,0.0491,0,0,0,0,0
RFNBO,H2,0.12,0,0,0,0,0
RFNBO,NH3,0.0186,0,0,0,0,0
RFNBO,LPG (Butane),0.0457,0,3.03,0,0,0
RFNBO,LPG (Propane),0.0463,0,3,0,0,0
RFNBO,LPG (Butane),0.0457,0,0,0,0,0
RFNBO,LPG (Propane),0.0463,0,0,0,0,0
2 changes: 1 addition & 1 deletion feems/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "feems"
version = "0.10.10"
version = "0.10.11"
description = ""
authors = ["Kevin Koosup Yum <kevinkoosup.yum@sintef.no>"]
readme = "readme.md"
Expand Down
5 changes: 3 additions & 2 deletions feems/tests/test_fuel.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import random
from typing import List
import logging

import numpy as np
import pytest
Expand Down Expand Up @@ -46,7 +47,7 @@ def test_fuel_class():
(1 - 3.1 / 100) * (2.75 + 0.00011 * _GWP100_N2O) + 3.1 / 100 * _GWP100_CH4
)

for specified_by in [FuelSpecifiedBy.IMO, FuelSpecifiedBy.FUEL_EU_MARITIME]:
for specified_by in [FuelSpecifiedBy.FUEL_EU_MARITIME]:
print(f"Fuel specified by {specified_by.name}")
print(
"fuel_name\tghg_wtt [gCO2eq/gFuel]\tghg_ttw[gCO2/gFuel]\tghg_wtw[gCO2eq/gFuel]\tghg_wtw[gCO2eq/mj]\tlhv[MJ/kg]\torigin"
Expand All @@ -61,7 +62,7 @@ def test_fuel_class():
fuel_specified_by=specified_by,
)
except ValueError as e:
print(e)
logging.error(e)
continue
for fuel_kind_by_consumer in fuel.ghg_emission_factor_tank_to_wake:
name = fuel.fuel_type.name
Expand Down

0 comments on commit 685157b

Please sign in to comment.