Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔧 Diesel Engine Alternative Fuels Research

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

Python Pandas Matplotlib Chart.js Three.js

🆕 3D Interactive Engine Model

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.

🌐 Live Demo

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.

Efficiency comparison animation

📖 Project Summary

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:

  1. Pure Diesel (B0) — baseline
  2. 20% Biodiesel blend (B20), produced from waste sunflower oil via transesterification
  3. B20 + Magnetic fuel conditioning
  4. B20 + Magnetic conditioning + Nano-additive
  5. 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%).

📂 Repository Structure

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

🚀 Quick Start

View the interactive dashboard

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 file

Run the Python analysis

pip install pandas matplotlib
python diesel_engine_analysis.py

This regenerates efficiency and emissions charts in output_charts/ and prints efficiency-gain statistics and example Air/Fuel ratio calculations to the console.

🧪 Methodology Highlights

  • 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)

📊 Sample Results (Full Load, 4.5 kW)

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

🛠️ Built With

  • 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

📄 License

This project is shared for educational and portfolio purposes.

📫 Contact

Mohamed Ahmed — M.Sc. Hydrogen Technology, TH Rosenheim LinkedIn · mohamedrifat38@gmail.com

About

dashboard analyzing diesel engine performance and emissions across biodiesel, magnetic conditioning, nano-additive, and H2-enriched fuel blends.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages