Interactive dashboard + Python analysis toolkit for a diesel engine performance and emissions study using biodiesel, magnetic fuel conditioning, nano-additives, and hydrogen enrichment.
Institution: Kafr El-Sheikh University, Faculty of Engineering Supervisors: Dr. Magda Elfakharany, Prof. Dr. Fawzy Abo Taleb Author: Mohamed Ahmed
The dashboard now includes a live, rotatable 3D single-cylinder diesel engine simulation built with Three.js, matching the actual lab rig described in the project (single-cylinder, 4-stroke, air-cooled, 6 kVA generator at 1500 RPM). It includes interactive sliders tied to the exact variables measured in the book:
- Engine load power (kW)
- Biodiesel blend (%)
- Magnetic fuel-conditioning current (A)
- Air speed Va (cm/s) — feeds the book's mass-flow formula ṁa = ρ·(π/4)·D²·Va
- Fuel heating value (kJ/kg)
Adjusting these sliders updates the piston speed, exhaust plume intensity (visualizing the NOx trade-off), and live efficiency/NOx estimates in real time.
Open index.html in your browser, or enable GitHub Pages on this repo
(Settings → Pages → deploy from main branch, root folder) to get a live shareable link.
A low-cost lab test rig (Arduino + ultrasonic fuel-level sensor + gas analyzer) was built to measure a 6 kVA diesel generator's performance and emissions under five fuel configurations:
- Pure Diesel (B0) — baseline
- 20% Biodiesel blend (B20), produced from waste sunflower oil via transesterification
- B20 + Magnetic fuel conditioning
- B20 + Magnetic conditioning + Nano-additive
- B20 + H2 enrichment (via PEM electrolyzer) + 7% Kerosene (to offset rising NOx)
Key finding: B20 with magnetic conditioning and nano-additives achieved the highest thermal efficiency (37.7%) at full load, a ~10% relative improvement over pure diesel (34.4%).
diesel-engine-alternative-fuels/
├── index.html # Interactive dashboard (Chart.js)
├── diesel_engine_analysis.py # Python analysis & plotting script
├── data/
│ ├── performance_data.csv # Power, air/fuel flow, efficiency by blend
│ └── emissions_data.csv # CO2, CO, NOx, CH4 by blend & load
├── assets/
│ └── efficiency_comparison.gif # Animated efficiency curves
└── README.md
git clone https://github.com/YOUR_GITHUB_USERNAME/diesel-engine-alternative-fuels.git
cd diesel-engine-alternative-fuels
open index.html # or double-click the filepip install pandas matplotlib
python diesel_engine_analysis.pyThis regenerates efficiency and emissions charts in output_charts/ and prints
efficiency-gain statistics and example Air/Fuel ratio calculations to the console.
- Fuel flow measurement: ultrasonic sensor tracks fuel-tank level drop over time, converted to mass flow rate
- Air flow measurement: anemometer + Arduino computes mass flow via
ṁ = ρ × (π/4)D² × V - Efficiency:
η = P_engine / (ṁ_fuel × Heating Value) - Hydrogen production: PEM electrolyzer (2H₂O → O₂ + 4H⁺ + 4e⁻ at anode; 4H⁺ + 4e⁻ → 2H₂ at cathode)
- Emissions: measured via gas analyzer (CO₂, CO, NOx, CH₄, SO₂, H₂S)
| Fuel Configuration | Efficiency (%) | Notes |
|---|---|---|
| Diesel (B0) | 34.4 | Baseline |
| B20 | 33.8 | Slight drop due to lower heating value |
| B20 + Magnetic | 37.7 | Fuel conditioning improves atomization |
| B20 + Magnetic + Nano | 37.7 | Matches magnetic-only at this load point |
- Python (Pandas, Matplotlib, Pillow) — data processing & GIF generation
- HTML/CSS/JavaScript — interactive dashboard
- Chart.js — live interactive charts
- Three.js — real-time 3D engine visualization (pistons, crankshaft, flywheel animation)
- Arduino — original lab data acquisition hardware
This project is shared for educational and portfolio purposes.
Mohamed Ahmed — M.Sc. Hydrogen Technology, TH Rosenheim LinkedIn · mohamedrifat38@gmail.com
