11 ms·
Simulating an Entire Car Engine (yes, it makes noise) [video]
- _fat_santa 4y agoThat's so cool. The guy made the repo private but I hope he makes it public again. It would be really interesting to see the code behind this. And looking at the other repos, I would bet its written in C++
- isaacimagine 4y agoI cloned a copy of the repo a week ago; might be possible to find a fork? (I didn't fork it, though.) It's a pretty standard cpp codebase: might be windows-only, but I haven't gotten around to building it yet.
- jcbcn 4y agowhat was the repo called?
- isaacimagine 4y ago
- quasarj 4y agoThank you, was hoping someone had a copy. Strange decision to suddenly close it, but whatever. The internet never forgets!
- analognoise 4y agoGod I love HN. Thanks.
- jcbcn 4y agoThank you!
- dang 4y agoI appreciate the curiosity, but it's probably not great for us as a community to be un-privating people's private repos.
- ASalazarMX 4y agoAlthough I find strange the change of heart, this is the reason the author made the repo private, according to his pinned comment in the video: > UPDATE: I've received way more interest in this project and the codebase than I anticipated and I've made it temporarily closed-source. I may release it publicly again but I really want to make sure that my work isn't used without crediting me. Thanks for understanding bros! Maybe it's too soon to start distributing copies.
- pushqrdx 4y agocan you please upload the clone including the git history? or did you download a zip off of github (not git clone)?
- bitwize 4y agoThe thing that got me into computing was watching an engine simulation my dad, a mechanical engineer, wrote in BASIC. He wanted to get some numbers on the mechanical advantages of various crank designs, so he only simulated the piston, crank, and crankshaft. And it chugged at about 1 fps on a TRS-80 Model II. But still, seeing that piston and crank arm move made me realize computers are capable of truly wondrous things. And if that was the Lv 1, this is the Lv 99.
- PebblesRox 4y agoHere’s another great ICE simulation that walks you through how everything works. It’s interactive! https://news.ycombinator.com/item?id=26991300 https://news.ycombinator.com/item?id=26991300
- Scene_Cast2 4y agoSounds amazing, would love for something like this for racing sims (CPUs these days have more cores than good uses for those cores...) For the gotchas - I'd guess that the exhaust manifolds would make a huge difference in terms of sound, and they seem hard to simulate. For example, engineers tune the individual per-cylinder exhaust distance - this way, the exhaust fumes from each individual cylinder align nicely once the exhaust from each cylinder merge into the final exhaust pipe. Otherwise, if, for example, the firing pattern is 1-5-..., then the air from cylinder 1 might arrive to the exhaust pipe at the same time as air from cylinder 5, given high RPMs and limited speed of sound. And the fluid dynamics of the cylinders are something that is extremely critical to modern cars, too. And I'd guess that this is where things like misfires can be simulated. Disclaimer - this is all based on my highly unsophisticated mental model,
- Neil44 4y agoI understand they time the exhaust primary lengths so that the next cylinder to open does so into low pressure, to get the most stale gas out of the cylinder possible enabling the most fresh gas possible to come back in later. However since the speed of the pressure waves is somewhat fixed and the speed of the engine cycles vary greatly the lengths chosen only work over a narrow rpm band. Where you decide to put this band during the design phase depends on what you’re optimising the engine for.
- collimator 4y agoThat's like what I heard.
- sakopov 4y agoI think it's the length of the headers that contributes to the sound (I'm sure in combination with other components). I know the boxer engine in Subaru WRX/Impreza STI models has unequal length headers which allowed exhaust fumes to exit in a staggered pattern producing the iconic Subaru rumble.
- Tempest1981 4y ago
- jmpman 4y agoQuite incredible. I’d like to see engine vibration in the X,Y,Z axis, to optimize engines for a quadcopter APU.
- Cupertino95014 4y agoMaybe someone can find this YT video: it was a guy on the back of a Vespa or some small scooter, carrying a boombox that made the sound of a giant Harley.
- detaro 4y agoI only know the trombone one: https://www.youtube.com/watch?v=s5IKthNYhVY https://www.youtube.com/watch?v=s5IKthNYhVY
- buescher 4y agoThat's very impressive. I hope he writes it up. I'd like to see the bibliography.
- modeless 4y ago80,000 Hz rigid body simulation! That's amazing. Seems like the only output of the simulation that's used in sound generation is the graph of exhaust pressure. He's adding white noise to the output. I wonder if it would be possible to replace the white noise by reading the vibrations of the various rigid bodies directly out of the simulation.
- goldenkey 4y agoThey are rigid, so they wouldn't vibrate, no elasticity/100% dampening, would they?
- modeless 4y agoThey won't deform but they still move and collide and that could be used to generate sound. Deformations could also be modeled by splitting parts into pieces connected by compliant joints.
- tekknik 4y agoThe sound from an engine doesn’t come from it rattling, tolerances in modern engines are very tight. Sound comes from the explosions.
- modeless 4y agoI'm sure people are interested in simulating more than modern engines with this.
- Too 4y agoDue to inertia of the piston and minor velocity difference of moving up vs down in a cranking geometry, an ICE will be unbalanced and generate vibrations. Called primary and secondary balance. This has nothing to do with tolerance, but yeah I’m not talking about rattling either, just vibrations. Unless you have a V8, where all this unbalance is cancelled out by opposing movement on the other side of the engine.
- deleted 4y ago[deleted]
- nabla9 4y agoCar manufacturers might buy this for their EV's when they want their car make engine sounds.
- jamestimmins 4y agoMy hope is that's why he made the repo private. Would be cool if he found some meaningful commercial value in this.
- Ciantic 4y agoIt all depends on what license he put on the initial release. Others here have copies. But once you've released it with OSI license that is it, I think you can't just reverse it.
- jamestimmins 4y agoMakes sense. But it's likely that the overlap between people who have it and the people who would pay for it is fairly small, if he managed to pull it down quickly.
- facorreia 4y agoI recently learned that many car brands already simulate noise of less efficient engines to "satisfy buyer needs". https://motorandwheels.com/cars-with-active-sound-design/ https://motorandwheels.com/cars-with-active-sound-design/
- iancmceachern 4y agoIt's the saddest thing to me about the state of many cars today. They play engine noises on the speakers inside the car. What is this nonsense, who wants to live in the matrix? I chose the red pill. I jubilantly drive a stick shift car with a radio that has a cd player and buttons. Not a single touchscreen in the car. It has an engine, I hear it the organic way, through the transmission of vibrations from its operation straight to my ear holes. Not through a computer that plays a sound sample based on the position of a sensor on the throttle.
- freemint 4y agoI wonder that time integrator is used for what must be a DAE system and if a better integrator could cut those numbers of step required down by a lot.
- dizzant 4y agoHe discusses the engine in a previous video. The integrator is RK4 with fixed step size (no error adjustment) and constraints are maintained by reaction forces. Numerical instability in that type of system comes primarily from energy added to maintain the constraints.
- freemint 4y agoThanks, that explains the instability and small step size. I really wish people would stop teaching RK4, not only exists there a slightly tuned set of coefficients which much better one called Tsit5 but in this case an explicit ODE solver of such high order just asks for trouble with what is effectively an Differential Algebraic Equation due to the constraints and fixed step size is ... an easy choice for implementation but it can really require very small steps if there is stiffness-esque behaviour anywhere.
- ChrisRackauckas 4y agoIndeed the systems used for real engine design generally make use of the differential-algebraic equation form in order to have conservation and preserve the rigid body properties. But to do this accurately, you usually arrive at an Index-2 DAE, so you then have to use Pantelides algorithm to do an index reduction before hitting it with an integrator like DASSL. So it takes an order of magnitude of work to hit that extra accuracy and efficiency. But if you don't have Dymola or ModelingToolkit.jl hanging around, this at least decent. Agreed RK4 is a weird thing for people to default to: with almost no work you can at least do better than RK4 at least with Dormand-Price, Tsit5, or SSP methods.
- freemint 4y ago
- mandeepj 4y agoGreat job. If my car had that instrument panel - and I'd love to have it - then it'd look like a cockpit :-). Amazing stuff.
- dark-star 4y agoanyone grabbed the code before the repo went private? I'd really like to play around with this a bit :)
- goldenkey 4y agohttps://envs.sh/QI_.zip https://envs.sh/QI_.zip credit to /u/isaacimagine https://news.ycombinator.com/item?id=32370989 https://news.ycombinator.com/item?id=32370989
- teddyh 4y ago> The code is open source on my GitHub, the link to that is in the description Description: > Engine Simulator Codebase [Temporarily Private] My most generous guess is that he got hit by a patent claim. I can’t think of any other reasonable reason for him to take back the code but keep the video up.
- ASalazarMX 4y agoPinned comment from the author: > UPDATE: I've received way more interest in this project and the codebase than I anticipated and I've made it temporarily closed-source. I may release it publicly again but I really want to make sure that my work isn't used without crediting me. Thanks for understanding bros!
- teddyh 4y agoEven the BSD and MIT licenses requires credit to be given to the author. If he wants to exercise maximum caution, he should put AGPLv3 on it. He can always change it at any time later, since he’s the sole copyright holder.
- saturn5k 4y agoFor engine nerds, you should check out Automation - The Car Company Tycoon Game [1]. It is basically a car builder simulator where you go through every aspect of developing a car - chassis design, suspension, engine.. I spent hours tuning and building exotic engines. 6 liter turbo inline 3? 1 liter NA V12? Only your imagination is the limit. [1] https://www.youtube.com/watch?v=xQpfvliszx4 https://www.youtube.com/watch?v=xQpfvliszx4 Bonus: You can export your vehicles directly in BeamNG.drive and test them on the track.
- tra3 4y agoAre engine simulations true to life? Will I be able to learn something about engines by playing with this?
- webkike 4y agoI haven’t played it but probably no and definitely yes
- nimbius 4y agoyou'll absolutely learn about engines in the game, although a solid knowledge of basics is a better start. internal combustion, displacement, and timing is maybe a good 20 minute refresher before the engines part. you'll also figure out why things like a v12 Honda civic don't pan out ;) (looking at you dodge hellcat.)
- zbird 4y agoVery nice work, need more posts like this.
- zbird 4y agoI think it would be interesting to simulate the audio of a fuel engine in EVs and be able to customize the output. Otherwise they sound a bit too boring.