source: proiecte/ptvs/src/vnsim/vehicular/emissions/EmissionsUtil.java @ 31

Last change on this file since 31 was 31, checked in by (none), 14 years ago
File size: 4.1 KB
Line 
1/************************************************************************************
2 * Copyright (C) 2008 by Politehnica University of Bucharest and Rutgers University
3 * All rights reserved.
4 * Refer to LICENSE for terms and conditions of use.
5 ***********************************************************************************/
6package vnsim.vehicular.emissions;
7/**
8 * Class for estimation of fuel consumption and emissions of Carbon Monoxide (CO),
9 * Hydrocarbons (HC), Notrogen Oxides (NOx) and Carbon Dioxide (CO2)
10 *
11 * @author Victor Gradinescu
12 *
13 */
14public class EmissionsUtil {
15
16        // average idle fuel consumption for light vehicles(LV) [mL/s]
17        public static final double IDLE_FC = 1350.0 / 3600.0 ; 
18        // average idle CO emission for light vehicles [g/s]
19        public static final double IDLE_CO = 50.0 / 3600.0; 
20        // average idle HC emission for light vehicles [g/s]
21        public static final double IDLE_HC = 8.0 / 3600.0;
22        // average idle NOx emission for light vehicles [g/s]
23        public static final double IDLE_NOx = 2.0 / 3600.0;
24        // average CO2 emission rate per unit of fuel consumed (LV) [g/mL]
25        public static final double CO2_RATE = 2.5;
26        // efficiency parameter (in relation to the energy of the engine)
27        // fuel [mL/kJ], emissions [g/kJ]
28        public static final double beta1F = 0.0900;
29        public static final double beta1CO = 0.0150;
30        public static final double beta1HC = 0;
31        public static final double beta1NOx = 0.0010;
32        // efficiency parameter (in relation to the product of inertia energy and acceleration)
33        // only for positive acceleration
34        // fuel [mL/kJ], emissions [g/kJ]
35        public static final double beta2F = 0.0300;
36        public static final double beta2CO = 0.0250;
37        public static final double beta2HC = 0.0004;
38        public static final double beta2NOx = 0.0002;
39       
40        // average vehicle mass [kg]
41        public static final double Mv = 1400;
42        //Tyre rolling resistance factor
43        public static final double ROLLRESCOEF = 0.06;//0.1;
44        //Aero. drag coef (wind factor 1.2)
45        public static final double AIRRESCOEF = 0.3;//0.54;
46        //frontal vehicle area [m^2]
47        public static final double FRONTAL_AREA = 2.1;
48        //air density [kg/m^3]
49        public static final double AIRDENSITY = 1.29;
50       
51        public static final double g = 9.81; // [m/s^2]
52       
53        static double rollresforce = 500;//ROLLRESCOEF * Mv * g; 
54
55        static double airDragForceCoef =  0.5 * AIRRESCOEF * FRONTAL_AREA * AIRDENSITY; 
56       
57        // value of fuel consumed during the specified time interval [mL]
58        public static EmissionsResults estimateFuelConsumption(double speed, double acceleration, double seconds){
59                double v = speed / 3.6; // [m/s]
60                double a = acceleration / (3.6 * 3600); // [m/s^2]
61                double dt = seconds;
62                double fc, co, hc, nox;
63//              System.out.println("v = "+v+"\na = "+a);
64                double airDragForce = airDragForceCoef * v * v; 
65                // total tractive force Rt
66                double Rt = Mv * a + rollresforce + airDragForce;
67                Rt /= 1000;
68//              System.out.println(Rt + " " + airDragForce + " " +rollresforce);
69               
70                if (Rt <= 0){
71                        fc = IDLE_FC * dt;
72                        co = IDLE_CO * dt;
73                        hc = IDLE_HC  * dt;
74                        nox = IDLE_NOx * dt;
75                }else{
76                        double term3 = 0;
77                        if (> 0)
78                                term3 = Mv * a * a * v / 1000;
79                       
80                        fc = (IDLE_FC + beta1F * Rt * v + beta2F * term3) * dt;
81                        co = (IDLE_CO + beta1CO * Rt * v + beta2CO * term3) * dt;
82                        hc = (IDLE_HC + beta1HC * Rt * v + beta2HC * term3) * dt;
83                        nox = (IDLE_NOx + beta1NOx * Rt * v + beta2NOx * term3) * dt;
84                }
85                return new EmissionsResults(fc, co, CO2_RATE * fc, hc, nox);
86        }
87       
88        public static void main(String args[]){
89                double dt = 1;
90                double v[] = {70, 70, 70, 69, 66, 62, 56, 49, 38, 27, 15, 6, 0, 0, 2, 7, 16, 25, 35, 44, 53, 60, 65, 68, 70, 70, 70, 70, 70, 70};
91                double a[] = {0, 0, 0, -0.5, -1, -1.5, -2, -2.5, -3, -3.4, -3.2, -2.1, -0.3, 0, 1, 2, 2.6, 3, 2.8, 2.6, 2.1, 1.6, 1.1, 0.7, 0.3, 0, 0, 0, 0, 0};
92                for (int i = 0; i < 30; i++){
93                        EmissionsResults er = estimateFuelConsumption(v[i], a[i]* (3.6 * 3600),dt);
94                        System.out.println(i+" "+ er.fc * (3600.0 / dt) / 1000);
95                }
96//              EmissionsResults er = estimateFuelConsumption(100, 0 * (3.6 * 3600),dt);
97//              System.out.println(er.fc);
98        }
99
100}
101
Note: See TracBrowser for help on using the repository browser.