Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FuelEU Maritime data updated #35

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM "mcr.microsoft.com/devcontainers/python:3.12"

RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v24.4/protoc-24.4-linux-x86_64.zip \
&& unzip protoc-24.4-linux-x86_64.zip -d protoc \
&& mv protoc/bin/protoc /usr/local/bin/protoc \
&& mv protoc/include/* /usr/local/include/ \
&& rm -rf protoc protoc-24.4-linux-x86_64.zip
Empty file added .devcontainer/devcontainer.env
Empty file.
12 changes: 4 additions & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
"dockerComposeFile": "docker-compose.yml",
"workspaceFolder": "/workspaces/FEEMS",
"service": "app"
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.10-buster",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install --user -r requirements_dev.txt"

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
}
14 changes: 14 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "3.8"

services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile

volumes:
- ../..:/workspaces:cached
env_file: devcontainer.env

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
12 changes: 6 additions & 6 deletions feems/feems/components_model/component_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ def __init__(
uid: Optional[str] = None,
):
super(BasicComponent, self).__init__(
name=name,
type_=type_,
power_type=power_type,
rated_power=rated_power,
rated_speed=rated_speed,
uid=uid
name=name,
type_=type_,
power_type=power_type,
rated_power=rated_power,
rated_speed=rated_speed,
uid=uid,
)
if file_name is not None:
df = pd.read_csv(file_name, index_col=0)
Expand Down
14 changes: 7 additions & 7 deletions feems/feems/components_model/component_electric.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,10 @@ def __init__(
uid: Optional[str] = None,
):
super(SerialSystemElectric, self).__init__(
type_=type_,
power_type=power_type,
name=name,
components=components,
type_=type_,
power_type=power_type,
name=name,
components=components,
rated_power=rated_power,
rated_speed=rated_speed,
uid=uid,
Expand Down Expand Up @@ -910,9 +910,9 @@ class ShorePowerConnection(ElectricComponent):
"""

def __init__(
self,
name: str,
rated_power: Power_kW,
self,
name: str,
rated_power: Power_kW,
switchboard_id: SwbId = SwbId(0),
uid: Optional[str] = None,
):
Expand Down
2 changes: 1 addition & 1 deletion feems/feems/components_model/component_mechanical.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def __init__(
uid: Optional[str] = None,
):
super(MechanicalPropulsionComponent, self).__init__(
type_=type_,
type_=type_,
power_type=power_type,
name=name,
rated_power=rated_power,
Expand Down
24 changes: 24 additions & 0 deletions feems/feems/fuel.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class TypeFuel(Enum):
ETHANOL = 7
METHANOL = 8
LFO = 9
LSFO_CRUDE = 10
LSFO_BLEND = 11
ULSFO = 12
VLSFO = 13


@unique
Expand Down Expand Up @@ -81,6 +85,10 @@ class FuelOrigin(Enum):
TypeFuel.ETHANOL: "Ethanol",
TypeFuel.METHANOL: "Methanol",
TypeFuel.LFO: "LFO",
TypeFuel.LSFO_CRUDE: "LSFO (Crude)",
TypeFuel.LSFO_BLEND: "LSFO (Blend)",
TypeFuel.ULSFO: "ULSFO",
TypeFuel.VLSFO: "VLSFO",
}


Expand Down Expand Up @@ -357,6 +365,22 @@ def get_prescribed_factors(
)


def get_ghg_factors_for_fuel_eu_maritime(
fuel_type: TypeFuel,
origin: FuelOrigin,
fuel_consumer_class: FuelConsumerClassFuelEUMaritime,
) -> PrescribedFactors:
"""Get the GHG emission factors for fuel specified by EU Maritime Fuel"""
fuel_class = _FUEL_CLASS_FUEL_EU_MARITIME_MAPPING[origin]
fuel_type_eu = _FUEL_TYPE_FUEL_EU_MARITIME_MAPPING[fuel_type]
fuel_consumer_class_str = _FUEL_CONSUMER_CLASS_FUEL_EU_MARITIME_MAPPING[
fuel_consumer_class
]
return _DF_GHG_FACTORS_DICTIONARY["eu"].query(
f"pathway_name == '{fuel_type_eu}' and fuel_class == '{fuel_class}' and fuel_consumer_unit_class == '{fuel_consumer_class_str}'"
)


@dataclass
class FuelByMassFraction:
fuels: List[Fuel] = field(default_factory=list)
Expand Down
112 changes: 56 additions & 56 deletions feems/feems/package_data/fuel_eu_fuel_table.csv
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
Table starts at,9,,,,,,,
Header at,10,,,,,,,
unit at,11,,,,,,,
Values start at,12,,,,,,,
Data sources,,,,,,,,
Base,FuelEU Maritime,,,,,,,
Bio fuel,Directive (EU) 2018/2001 of the European Parliament and of the Council of 11 December 2018 on the promotion of the use of energy from renewable sources,,,,,,,
RFNBO,JEC Well-to-Tank report v5,,,,,,,
1,2,3,4,5,6,7,8,9
fuel_class,pathway_name,LCV,CO2_WtT,fuel_consumer_unit_class,Cf_CO2,Cf_CH4,Cf_N2O,C_slip
,,MJ/g,gCO2eq/MJ,,gCO2/gFuel,gCH4/gFuel,gN2O/gFuel,%
Fossil,HFO,0.0405,13.5,ALL ICEs,3.114,0.00005,0.00018,0
Fossil,LSFO (Crude),0.0405,13.2,ALL ICEs,3.151,0.00005,0.00018,0
Fossil,LSFO (Blend),0.0405,13.7,ALL ICEs,3.151,0.00005,0.00018,0
Fossil,ULSFO,0.0405,13.2,ALL ICEs,3.114,0.00005,0.00018,0
Fossil,LFO,0.041,13.2,ALL ICEs,3.151,0.00005,0.00018,0
Fossil,Diesel,0.0427,14.4,ALL ICEs,3.206,0.00005,0.00018,0
Fossil,LNG,0.0491,18.5,LNG otto (medium speed),2.75,0,0.00011,3.1
Fossil,LNG,0.0491,18.5,LNG otto (slow speed),2.75,0,0.00011,1.7
Fossil,LNG,0.0491,18.5,LNG diesel (slow speed),2.75,0,0.00011,0.2
Fossil,LNG,0.0491,18.5,LBSI,2.75,0,0.00011,2.6
Fossil,LNG,0.0491,18.5,Fuel Cells,2.75,0,0.00011,0
Fossil,LPG (Butane),0.046,7.8,ALL ICEs,3.03,0,0,0
Fossil,LPG (Propane),0.046,7.8,ALL ICEs,3,0,0,0
Fossil,H2,0.12,132,Fuel Cells,0,0,0,0
Fossil,H2,0.12,132,ICE,0,0,0,0
Fossil,NH3,0.0186,121,Fuel Cells,0,0,0,0
Fossil,NH3,0.0186,121,ICE,0,0,0,0
Fossil,Methanol,0.0199,31.3,ALL ICEs,1.375,0.00005,0.00018,0
BIO,Ethanol,0.0268,-33.2,ALL ICEs,1.913,0,0,0
BIO,Diesel,0.044,-26.1,ALL ICEs,2.834,0.00005,0.00018,0
BIO,HVO,0.05,-20.7,ALL ICEs,3.115,0.00005,0.00018,0
BIO,LNG,0.05,-38.9,LNG otto (medium speed),2.75,0,0.00011,3.1
BIO,LNG,0.05,-38.9,LNG diesel (slow speed),2.75,0,0.00011,1.7
BIO,LNG,0.05,-38.9,LNG diesel (slow speed),2.75,0,0.00011,0.2
BIO,LNG,0.05,-38.9,LBSI,2.75,0,0.00011,2.6
BIO,LNG,0.02,-58.4,ALL ICEs,1.375,0.00005,0.00018,0
BIO,LNG,0.0491,18.5,Fuel Cells,2.75,0,0.00011,0
BIO,Other,,,ALL ICEs,3.115,0.00005,0.00018,0
BIO,H2,0.12,,Fuel Cells,0,0,0,0
BIO,H2,0.12,,ALL ICEs,0,0,0,0
RFNBO,Diesel,0.0427,0.9,ALL ICEs,3.206,0.00005,0.00018,0
RFNBO,Methanol,0.0199,1.78,ALL ICEs,1.375,0.00005,0.00018,0
RFNBO,LNG,0.0491,6.7,LNG otto (medium speed),2.75,0,0.00011,3.1
RFNBO,LNG,0.0491,6.7,LNG otto (slow speed),2.75,0,0.00011,1.7
RFNBO,LNG,0.0491,6.7,LNG diesel (slow speed),2.75,0,0.00011,0.2
RFNBO,LNG,0.0491,6.7,LBSI,2.75,0,0.00011,2.6
RFNBO,LNG,0.0491,6.7,Fuel Cells,2.75,0,0.00011,0
RFNBO,H2,0.12,3.6,Fuel Cells,0,0,0,0
RFNBO,H2,0.12,3.6,ALL ICEs,0,0,0,0
RFNBO,NH3,0.0186,10,Fuel Cells,0,0,0,0
RFNBO,NH3,0.0186,10,ALL ICEs,0,0,0,0
RFNBO,LPG (Butane),0.046,0,ALL ICEs,,,,
RFNBO,LPG (Propane),0.046,0,ALL ICEs,,,,
RFNBO,DME,,1.7,ALL ICEs,,,,
Electricity,Electricity,,70.55555556,On-shore power supply,0,0,0,0
Table starts at,9,,,,,,,,,,
Header at,10,,,,,,,,,,
unit at,11,,,,,,,,,,
Values start at,12,,,,,,,,,,
Data sources,,,,,,,,,,,
Base,FuelEU Maritime,,,,,,,,,,
Bio fuel,Directive (EU) 2018/2001 of the European Parliament and of the Council of 11 December 2018 on the promotion of the use of energy from renewable sources,,,,,,,,,,
RFNBO,JEC Well-to-Tank report v5,,,,,,,,,,
1,2,3,4,5,6,7,8,9,10,11,12
fuel_class,pathway_name,LCV,CO2_WtT,fuel_consumer_unit_class,Cf_CO2,Cf_CH4,Cf_N2O,C_slip,TtW_energy,TtW_mass,WTW_energy
,,MJ/g,gCO2eq/MJ,,gCO2/gFuel,gCH4/gFuel,gN2O/gFuel,%,gCO2eq/MJ,gCO2eq/gFuel,gCO2eq/MJ
Fossil,HFO,0.0405,13.5,ALL ICEs,3.114,0.00005,0.00018,0,78.24419753,3.16889,91.74419753
Fossil,LSFO (Crude),0.0405,13.2,ALL ICEs,3.151,0.00005,0.00018,0,79.15777778,3.20589,92.35777778
Fossil,LSFO (Blend),0.0405,13.7,ALL ICEs,3.151,0.00005,0.00018,0,79.15777778,3.20589,92.85777778
Fossil,ULSFO,0.0405,13.2,ALL ICEs,3.114,0.00005,0.00018,0,78.24419753,3.16889,91.44419753
Fossil,VLSFO,0.041,13.2,ALL ICEs,3.206,0.00005,0.00018,0,79.53390244,3.26089,92.73390244
Fossil,LFO,0.041,13.2,ALL ICEs,3.151,0.00005,0.00018,0,78.19243902,3.20589,91.39243902
Fossil,Diesel,0.0427,14.4,ALL ICEs,3.206,0.00005,0.00018,0,76.36744731,3.26089,90.76744731
Fossil,LNG,0.0491,18.5,LNG otto (medium speed),2.75,0,0.00011,3.1,70.70292912,3.47151382,89.20292912
Fossil,LNG,0.0491,18.5,LNG otto (slow speed),2.75,0,0.00011,1.7,64.36808024,3.16047274,82.86808024
Fossil,LNG,0.0491,18.5,LNG diesel (slow speed),2.75,0,0.00011,0.2,57.58074216,2.82721444,76.08074216
Fossil,LNG,0.0491,18.5,LBSI,2.75,0,0.00011,2.6,68.4404831,3.36042772,86.9404831
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,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,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,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,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
RFNBO,Diesel,0.0427,-47.6,ALL ICEs,3.206,0.00005,0.00018,0,76.36744731,3.26089,28.76744731
RFNBO,Methanol,0.0199,-67.1,ALL ICEs,1.375,0.00005,0.00018,0,71.85376884,1.42989,4.753768844
RFNBO,LNG,0.0491,-26.6,LNG otto (medium speed),2.75,0,0.00011,3.1,70.70292912,3.47151382,44.10292912
RFNBO,LNG,0.0491,-26.6,LNG otto (slow speed),2.75,0,0.00011,1.7,64.36808024,3.16047274,37.76808024
RFNBO,LNG,0.0491,-26.6,LNG diesel (slow speed),2.75,0,0.00011,0.2,57.58074216,2.82721444,30.98074216
RFNBO,LNG,0.0491,-26.6,LBSI,2.75,0,0.00011,2.6,56.67576375,2.78278,41.8404831
RFNBO,LNG,0.0491,-26.6,Fuel Cells,2.75,0,0,0,56.00814664,2.75,29.40814664
RFNBO,H2,0.12,3.6,Fuel Cells,0,0,0,0,0,0,3.6
RFNBO,H2,0.12,3.6,ALL ICEs,0,0,0,0,0,0,3.6
RFNBO,NH3,0.0186,0,Fuel Cells,0,0,0,0,0,0,0
RFNBO,NH3,0.0186,0,ALL ICEs,0,0,0,0,0,0,0
RFNBO,LPG (Butane),0.046,0,ALL ICEs,,,,,,,
RFNBO,LPG (Propane),0.046,0,ALL ICEs,,,,,,,
RFNBO,DME,,1.7,ALL ICEs,,,,,,,
Electricity,Electricity,,70.55555556,On-shore power supply,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.9"
version = "0.10.10"
description = ""
authors = ["Kevin Koosup Yum <kevinkoosup.yum@sintef.no>"]
readme = "readme.md"
Expand Down
Loading
Loading