/************************************************************************************ * Copyright (C) 2008 by Politehnica University of Bucharest and Rutgers University * All rights reserved. * Refer to LICENSE for terms and conditions of use. ***********************************************************************************/ package vnsim.vehicular.emissions; /** * Class for estimation of fuel consumption and emissions of Carbon Monoxide (CO), * Hydrocarbons (HC), Notrogen Oxides (NOx) and Carbon Dioxide (CO2) * * @author Victor Gradinescu * */ public class EmissionsUtil { // average idle fuel consumption for light vehicles(LV) [mL/s] public static final double IDLE_FC = 1350.0 / 3600.0 ; // average idle CO emission for light vehicles [g/s] public static final double IDLE_CO = 50.0 / 3600.0; // average idle HC emission for light vehicles [g/s] public static final double IDLE_HC = 8.0 / 3600.0; // average idle NOx emission for light vehicles [g/s] public static final double IDLE_NOx = 2.0 / 3600.0; // average CO2 emission rate per unit of fuel consumed (LV) [g/mL] public static final double CO2_RATE = 2.5; // efficiency parameter (in relation to the energy of the engine) // fuel [mL/kJ], emissions [g/kJ] public static final double beta1F = 0.0900; public static final double beta1CO = 0.0150; public static final double beta1HC = 0; public static final double beta1NOx = 0.0010; // efficiency parameter (in relation to the product of inertia energy and acceleration) // only for positive acceleration // fuel [mL/kJ], emissions [g/kJ] public static final double beta2F = 0.0300; public static final double beta2CO = 0.0250; public static final double beta2HC = 0.0004; public static final double beta2NOx = 0.0002; // average vehicle mass [kg] public static final double Mv = 1400; //Tyre rolling resistance factor public static final double ROLLRESCOEF = 0.06;//0.1; //Aero. drag coef (wind factor 1.2) public static final double AIRRESCOEF = 0.3;//0.54; //frontal vehicle area [m^2] public static final double FRONTAL_AREA = 2.1; //air density [kg/m^3] public static final double AIRDENSITY = 1.29; public static final double g = 9.81; // [m/s^2] static double rollresforce = 500;//ROLLRESCOEF * Mv * g; static double airDragForceCoef = 0.5 * AIRRESCOEF * FRONTAL_AREA * AIRDENSITY; // value of fuel consumed during the specified time interval [mL] public static EmissionsResults estimateFuelConsumption(double speed, double acceleration, double seconds){ double v = speed / 3.6; // [m/s] double a = acceleration / (3.6 * 3600); // [m/s^2] double dt = seconds; double fc, co, hc, nox; // System.out.println("v = "+v+"\na = "+a); double airDragForce = airDragForceCoef * v * v; // total tractive force Rt double Rt = Mv * a + rollresforce + airDragForce; Rt /= 1000; // System.out.println(Rt + " " + airDragForce + " " +rollresforce); if (Rt <= 0){ fc = IDLE_FC * dt; co = IDLE_CO * dt; hc = IDLE_HC * dt; nox = IDLE_NOx * dt; }else{ double term3 = 0; if (a > 0) term3 = Mv * a * a * v / 1000; fc = (IDLE_FC + beta1F * Rt * v + beta2F * term3) * dt; co = (IDLE_CO + beta1CO * Rt * v + beta2CO * term3) * dt; hc = (IDLE_HC + beta1HC * Rt * v + beta2HC * term3) * dt; nox = (IDLE_NOx + beta1NOx * Rt * v + beta2NOx * term3) * dt; } return new EmissionsResults(fc, co, CO2_RATE * fc, hc, nox); } public static void main(String args[]){ double dt = 1; 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}; 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}; for (int i = 0; i < 30; i++){ EmissionsResults er = estimateFuelConsumption(v[i], a[i]* (3.6 * 3600),dt); System.out.println(i+" "+ er.fc * (3600.0 / dt) / 1000); } // EmissionsResults er = estimateFuelConsumption(100, 0 * (3.6 * 3600),dt); // System.out.println(er.fc); } }