Hack Your Engine Virtually

It is no secret that we like simulating circuits before we build something and there are plenty of great tools for that. But what about those of us who work on cars? Well, you might try engine-sim which is a real-time internal combustion engine simulation. Honestly, the program freely admits that it isn’t accurate enough to do engineering or engine tuning. But on the plus side, it has audio output and is at least good as an educational tool to show an engine running and how different parameters might affect it. You can see a video of the tool below.

[Ange-Yaghi] mentions that the code was primarily to power the YoutTube demo. However, the Readme hints that it might be better — or at least different — and collaboration to make it better is welcome.

  We know firsthand that a simulator doesn’t have to be totally accurate to give you a feel for how things work. After all, most simulations for electronics don’t always model things like wire resistance and parasitic effects. We’ll leave it to the more engine savvy to tell us if this simulator is close enough to be useful.

The keyboard commands let you toggle the ignition, change gearing using a clutch, and change the throttle. We’d love to see a screen of data like this for our actual car engine and maybe using one of those Bluetooth dongles, you could get close.

We remember a clock that was also an engine simulator, of sorts. If your simulation dreams center more on electronics, there are plenty of choices there.

21 thoughts on “Hack Your Engine Virtually

  1. I think this is great for learning some basics, well done to the author. However if you want to do any real engineering you’d be best sticking with Ricardo’s software or similar, which can do literally the entire powertrain including 1D, 2D and 3D dynamics, audio etc. Ricardo is ridiculously capable

  2. I liked the video.
    I hope the simulator continues to be improved to the point that someday I could load in the data for an engine I have,
    e.g. 1950 Ford 8RT or Honda V-Itec? and test various inputs such as injector pulse width or MAF at various temperatures,
    exhaust systems….
    Or inject actual engine data (CAN bus)
    But as it is right now, it is a great idea and an effort worthy of applause.

    1. never going to be possible, at least not without doing some serious 3d mapping of the combustion chamber, intake runners, exhaust, so many variables, mainly around airflow, it just won’t work.

    2. At a school I went to for automotive, they had software that did much more fine tuning to the engine and had much more accurate power output and data. You could also start from almost nearly any engine that was available up to the last few years as I chose to use a specific 2.5l v6 I wanted for my Mazda. We each had to hit specific hp and torque numbers for a class project using fine tuning of the engine we chose. Really neat stuff to play with and could help you simulate a build before you did one pretty accurately.

  3. Subarus with CVT have a software emulation of a manual transmission that you shift with paddles on the steering wheel like a Ferrari or a Saab. I decided to equip mine with an imaginary clutch pedal. The imaginary clutch works really well, and will probably never need repair or adjustment, unlike the one on my old Saab. It was only a couple of years ago that I decided to upgrade my ride and get rid of the imaginary manual choke, it was still working fine but I decided it was time for a change.

    Honestly if this sounds weird to you then what do you think of the mustang that makes fake engine noises???

    Might be fun to tweak the gear ratios on the Subaru.

      1. Oh yes I just blindly do the things that people on the internet tell me to do, because of course they have clearly done their homework and I don’t bother to do any at all.

        The current resale price of my vehicle indicates that the market disagrees with you, and the market has literally a million times more credibility than you do.

  4. Man… if this could be adapted based on known engine specs and baseline performance curves. It would open up all kinds of doors for legacy engines and alternative fuels.

    I know the 4 cycle IC engines are becoming dinosaurs as more EV options come online, but to hobbyist gear heads who don’t have a family legacy of wrenching this could be an awesome tool. I’ve got a 1988 IDI 7.3L diesel. Its a straight mechanical engine, no ECU, no sensors, just analog thermometers and pressure gauges. No ODB port to diagnose problems and I sometimes lose a weekend chasing down gremlins the previous owner left behind.

    Having a simulator like this where I could set output parameters and work the equation backwards, or test out ideas “on the bench” without disabling my primary work truck would be nice. I’m not enough of a programmer to even know where to start, but the math for things like compression, cam lobe shape, bore stroke, and gear ratios has to be established. Installing part X in stock engine Y should increase performance within a set range.

  5. Nice!

    I am just watching another video where there is a misfire on some cylinders because of gummed up injectors. I don’t hear that. It’d be nice to model things like misfire or half fuel on certain cylinders and other shenanigans and use as training material!

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.