forked from pollemission/pollemission
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_compute.py
99 lines (85 loc) · 4.31 KB
/
example_compute.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Copyright (C) 2015, ENPC, INRIA
# Author(s): Ruiwei Chen, Vivien Mallet
#
# This file is part of a program for the computation of air pollutant
# emissions.
#
# This file is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this file. If not, see http://www.gnu.org/licenses/.
# This example file shows how to compute the emissions.
import copert
c = copert.Copert("input/PC_parameter.csv", "input/LDV_parameter.csv",
"input/HDV_parameter.csv", "input/Moto_parameter.csv")
# Example for calculating hot emission (g/veh) of CO.
print c.Emission(pollutant = c.pollutant_CO,
speed = 40., # in km/h
distance = 0.5, # in km
vehicle_type = c.vehicle_type_passenger_car,
engine_type = c.engine_type_gasoline,
copert_class = c.class_ECE_15_00_or_01,
engine_capacity = c.engine_capacity_1p4_to_2, # in l
ambient_temperature = 20.0)
# Prints the hot emission factor (g/veh/km) of gasoline passenger car for CO.
print c.HEFGasolinePassengerCar(pollutant = c.pollutant_CO,
speed = 60., # in km/h
copert_class = c.class_Euro_5,
engine_capacity = c.engine_capacity_0p8_to_1p4) # in l
# Another way to compute the same is to call 'Emission' (g/veh) with unitary
# distance.
print c.Emission(pollutant = c.pollutant_CO,
speed = 60., # in km/h
distance = 1., # in km
vehicle_type = c.vehicle_type_passenger_car,
engine_type = c.engine_type_gasoline,
copert_class = c.class_Euro_3,
engine_capacity = c.engine_capacity_0p8_to_1p4, # in l
ambient_temperature = 25.) # in C deg
# Prints the hot emission factor (g/veh/km) of gasoline and diesel light
# commercial vehicles for CO.
## Gasoline light commercial vehicles
print c.HEFLightCommercialVehicle(pollutant = c.pollutant_CO,
speed = 50.,
engine_type = c.engine_type_gasoline,
copert_class = c.class_Euro_5)
## Diesel light commercial vehicles
print c.HEFLightCommercialVehicle(pollutant = c.pollutant_CO,
speed = 50.,
engine_type = c.engine_type_diesel,
copert_class = c.class_Euro_5)
# Prints the hot emission factor (g/veh/km) of gasoline and diesel heavy duty
# vehicles (HDVs) and buses for CO.
## for HDV
print c.HEFHeavyDutyVehicle(speed = 30,
vehicle_category = c.vehicle_type_heavy_duty_vehicle,
hdv_type = c.hdv_type_rigid_14_20,
hdv_copert_class = c.class_hdv_Euro_III,
pollutant = c.pollutant_CO,
load = c.hdv_load_50,
slope = c.slope_4)
## for buses
print c.HEFHeavyDutyVehicle(speed = 30,
vehicle_category = c.vehicle_type_bus,
hdv_type = c.bus_type_urban_more_18,
hdv_copert_class = c.class_hdv_Euro_III,
pollutant = c.pollutant_CO,
load = c.hdv_load_50,
slope = c.slope_4)
# Prints the emission factor for mopeds and motorcycles.
print c.EFMoped(speed = 50,
pollutant = c.pollutant_CO,
engine_type = c.engine_type_moped_two_stroke_less_50,
copert_class = c.class_Euro_3)
print c.EFMotorcycle(speed = 50,
pollutant = c.pollutant_CO,
engine_type = c.engine_type_moto_four_stroke_more_750,
copert_class = c.class_Euro_3)