Skip to content

Commit

Permalink
Correct distance calculations to calculate hot pollutant emissions
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Sep 4, 2023
1 parent f1ff1d2 commit c5f0fae
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion carculator_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"ExportInventory",
"VehicleInputParameters",
)
__version__ = (1, 0, 8)
__version__ = (1, 0, 9)

from pathlib import Path

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,17 +301,17 @@ ICEV-p,3,Particulate matters 2.5,0.001747005
ICEV-p,4,Particulate matters 2.5,0.000915532
ICEV-p,5,Particulate matters 2.5,0.001035399
ICEV-p,6,Particulate matters 2.5,0.000483016
ICEV-p,6.1,Particulate matters 2.5,0.000165737
ICEV-p,6.3,Particulate matters 2.5,0.000549115
ICEV-p,6.2,Particulate matters 2.5,0.0004489
ICEV-p,6.1,Particulate matters 2.5,0.0006
ICEV-p,6.2,Particulate matters 2.5,0.000549115
ICEV-p,6.3,Particulate matters 2.5,0.0006
ICEV-p,7,Particulate matters 2.5,0.000143099
ICEV-d,1,Particulate matters 2.5,0.044551854
ICEV-d,2,Particulate matters 2.5,0.030457491
ICEV-d,3,Particulate matters 2.5,0.01689492
ICEV-d,4,Particulate matters 2.5,0.01545938
ICEV-d,5,Particulate matters 2.5,0.000914321
ICEV-d,6.1,Particulate matters 2.5,0.00027642
ICEV-d,6,Particulate matters 2.5,0.000309991
ICEV-d,6.1,Particulate matters 2.5,0.00027642
ICEV-d,6.2,Particulate matters 2.5,0.000245139
ICEV-d,6.3,Particulate matters 2.5,0.000228196
ICEV-d,7,Particulate matters 2.5,0.000221361
Expand Down
6 changes: 3 additions & 3 deletions carculator_utils/hot_emissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def get_hot_emissions(
year=lifetime_km.coords["year"].values,
)

distance = self.velocity.sum(dim="second") / 1000
distance = self.velocity.sum(dim="second") / 3600

# Emissions for each second of the driving cycle equal:
# a * energy consumption
Expand All @@ -250,7 +250,7 @@ def get_hot_emissions(
},
)

# bit of a manual calibration for N2O and NH3
# a bit of a manual calibration for N2O and NH3
# as they do not correlate with fuel consumption

if self.vehicle_type == "car":
Expand Down Expand Up @@ -430,7 +430,7 @@ def get_hot_emissions(
"component",
)

emissions.loc[dict(component=engine_wear.coords["component"].values)] = (
emissions.loc[dict(component=engine_wear.coords["component"].values)] += (
energy_consumption * engine_wear
).values

Expand Down
Binary file modified dev/Input data.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def package_files(directory):

setup(
name="carculator_utils",
version="1.0.8",
version="1.0.9",
packages=packages,
author="Romain Sacchi <romain.sacchi@psi.ch>",
python_requires=">=3.9",
Expand Down

0 comments on commit c5f0fae

Please sign in to comment.