News for hackers. Stuff that matters.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by saturn5k on Saturday August 06, 2022 @04:17PM (#32371226)
For 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

Bonus: You can export your vehicles directly in BeamNG.drive and test them on the track.

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by nimbius on Saturday August 06, 2022 @05:15PM (#32371647)
I work on engines for a living as a master diesel tech, and this post just gave me a second job. you've ruined my entire weekend with this absolutely enthralling and amazing game.

I hope you step on a Lego.

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by DiabloD3 on Saturday August 06, 2022 @06:11PM (#32372032)
At least he didn't recommend Factorio. 5000 hours and climbing...
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by DocJade on Saturday August 06, 2022 @11:01PM (#32373497)
I’m almost 1 month clean of Cracktorio, and I genuinely crave the problem solving aspect of it every single day.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by c0nsumer on Saturday August 06, 2022 @06:32PM (#32372214)
This was weird... I work in IT for a big car company, and regularly have to help with software for automating tests like this. Seeing a simplified, gamified version of it is fascinating.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by tra3 on Saturday August 06, 2022 @04:29PM (#32371329)
Are engine simulations true to life? Will I be able to learn something about engines by playing with this?
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by nimbius on Saturday August 06, 2022 @06:02PM (#32371977)
you'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.)

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by amelius on Saturday August 06, 2022 @07:05PM (#32372396)
With the rise of EVs, the knowledge will become obsolete very quickly, though.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by aliswe on Saturday August 06, 2022 @07:19PM (#32372482)
"very quickly" is wishful thinking, nothing else. which is fine, by the way, just not real.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by russelg on Saturday August 06, 2022 @07:11PM (#32372438)
As long as those engines are still working (and laws aren't put in place to ban them), then there will be a demand for that knowledge.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by 1-6 on Saturday August 06, 2022 @08:39PM (#32372845)
I think all EV companies should be all over this simulator as some of the ‘fake noises’ they generate over the audio system doesn’t sound nearly as good as this.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by tomcam on Saturday August 06, 2022 @10:43PM (#32373416)
I’ll settle for a 6.8 liter v10 Civic Si. I’m not picky
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by webkike on Saturday August 06, 2022 @05:06PM (#32371588)
I haven’t played it but probably no and definitely yes
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by Scene_Cast2 on Saturday August 06, 2022 @10:58AM (#32368680)
Sounds 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,

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by Neil44 on Saturday August 06, 2022 @11:43AM (#32369074)
I 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.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by collimator on Saturday August 06, 2022 @01:24PM (#32369916)
That's like what I heard.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by sakopov on Saturday August 06, 2022 @12:26PM (#32369450)
I 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.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by Tempest1981 on Saturday August 06, 2022 @01:45PM (#32370088)
Is this "curly exhaust" idea a new thing?

"Why are the 2023 Acura Integra's Exhausts Are Shaped Like Curly Fries?"

https://www.integratalk.com/threads/why-are-the-2023-acura-i...

Excerpt:

By snaking the exhaust piping into that circular route, Honda is lengthening the exhaust pathway, lowering the resonance frequency without using a traditional muffler . Honda engineers tell us that the design as first installed in the Si also emphasizes the 300Hz to 600Hz frequencies "to deliver a more aggressive sound." Skipping the muffler, Honda also was able to achieve that sound with a 27-percent increase in exhaust flow.

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by olivermarks on Saturday August 06, 2022 @02:16PM (#32370345)
It's very common for aftermarket exhaust headers to be a spaghetti of equal length curved tubes into a collector for better flow. Lots of videos on this discussing specific engine types and goals. I'm assuming Acura are taking this approach further down the exhaust system as well?
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by ericbarrett on Saturday August 06, 2022 @03:36PM (#32370899)
I imagine fluid modelling with all the variables needed to meet manufacturing requirements (material, space constraints, across RPM ranges, etc.) and the speed to allow an engineer to iterate the design—keeping up with integration requirements—hasn't been practical until recently.

I bet this saves the money, too; a muffler is an extra component you need to source and/or build. Bending some extra pipe seems a lot cheaper.

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by tekknik on Sunday August 07, 2022 @07:52AM (#32375768)
> I bet this saves the money, too; a muffler is an extra component you need to source and/or build. Bending some extra pipe seems a lot cheaper.

Now hold on, extra length on the exhaust manifold / headers are not going to reduce sound so much you don’t need a muffler. And the muffler is far from the most expensive part in the exhaust system, which would be the catalytic converter.

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by Gordonjcp on Saturday August 06, 2022 @02:50PM (#32370578)
The aircooled flat-four in the Citroën GSA had a grapefruit-sized resonance chamber on one exhaust manifold to match up the exhaust pulse timings between the left and right bank. It also revved to about 8000rpm, which was hilarious away from the traffic lights.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by bitwize on Saturday August 06, 2022 @10:50AM (#32368601)
The 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.

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by PebblesRox on Saturday August 06, 2022 @03:20PM (#32370802)
Here’s another great ICE simulation that walks you through how everything works. It’s interactive!

https://news.ycombinator.com/item?id=26991300

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by modeless on Saturday August 06, 2022 @12:04PM (#32369236)
80,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.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by goldenkey on Saturday August 06, 2022 @05:47PM (#32371857)
They are rigid, so they wouldn't vibrate, no elasticity/100% dampening, would they?
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by modeless on Saturday August 06, 2022 @06:54PM (#32372324)
They 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.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by tekknik on Sunday August 07, 2022 @07:53AM (#32375774)
The sound from an engine doesn’t come from it rattling, tolerances in modern engines are very tight. Sound comes from the explosions.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by Too on Monday August 08, 2022 @04:10AM (#32383353)
Due 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.

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by tekknik on Monday August 08, 2022 @09:02AM (#32384901)
It’s more to do with crankshaft design than piston count. Either way, engines have had dampeners / balancers on them since before either of us were born. So again, the sound is coming from the explosions, not the vibrations.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by modeless on Sunday August 07, 2022 @10:35AM (#32376790)
I'm sure people are interested in simulating more than modern engines with this.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by matt-attack on Tuesday August 09, 2022 @10:34AM (#32398582)
What about valve clatter? I’m positive you can hear that.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by aliswe on Saturday August 06, 2022 @07:21PM (#32372496)
rigid means they are not jointed, i think, not that they necessarily dont vibrate...
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by teddyh on Saturday August 06, 2022 @04:16PM (#32371219)
> 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.

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by ASalazarMX on Saturday August 06, 2022 @04:41PM (#32371413)
Pinned 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!

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by teddyh on Saturday August 06, 2022 @05:36PM (#32371777)
Even 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.

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by nabla9 on Saturday August 06, 2022 @12:14PM (#32369325)
Car manufacturers might buy this for their EV's when they want their car make engine sounds.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by facorreia on Saturday August 06, 2022 @02:27PM (#32370419)
I 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/

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by iancmceachern on Saturday August 06, 2022 @03:18PM (#32370794)
It'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.

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by technothrasher on Saturday August 06, 2022 @05:26PM (#32371721)
> I jubilantly drive a stick shift car with a radio that has a cd player and buttons

Oooh, look at you with your fancy radio! My car doesn't even have a synchro on first gear, and you've got a cd player. I bet you've got luxury roll up windows instead of side curtains, and signal lights instead of trafficators, huh? ;)

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by tonmoy on Saturday August 06, 2022 @05:02PM (#32371566)
This in nothing new. If you are in the US, do you think salmon is naturally that pink? Do you think cheddar is so yellow? Do you think vacuum cleaners need to make so much noise? Answer to all of these questions is no and the only reason they are done is to trick the consumer.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by iancmceachern on Saturday August 06, 2022 @05:20PM (#32371679)
Excellent point. It is absolutely not new. I also avoid those things except salmon, its pinkness doesn't really enhance my personal enjoyment so I'm not hung up on that one. It's easy to buy natural, traditionally made food. Once you go away from factory food you can't really go back.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by copperx on Saturday August 06, 2022 @11:59PM (#32373784)
Are there mods to silence vacuum cleaners? I wouldn't be surprised if the noise were amplified through a speaker inside the vacuum cleaner itself.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by iancmceachern on Sunday August 07, 2022 @12:53AM (#32374005)
You can buy some brands that focus on quietness. Typically they are canister or shop vacations style, and geared toward professionals. Those backpack vacuums you always see housekeeping in hotels use, the dual stage ship vacuums like the Vacmaster VF408
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by spockz on Saturday August 06, 2022 @03:42PM (#32370950)
In Volkswagen cars this is called “SoundAktor” and it is completely bonkers, at least in my GTE. Especially in gte mode when touching the pedal it is a bit quicker to rev, which means it revs from 1800rpm to max 3000, but it sounds like going from 1800 all the way to 6000. Or going on electric engine only and in some speeds a rumbling sound comes out of the speakers.

Needless to say I disabled it.

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by copperx on Sunday August 07, 2022 @12:01AM (#32373793)
Maybe if the sound were more accurate, like in the linked simulation, fewer people would disable it?
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by spockz on Monday August 08, 2022 @06:43AM (#32384048)
But then what is the point of having a higher end car with sound isolation for relaxed Highway driving only to add the engine noise again? I would indeed notice/mind it less if the sound were accurate.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by sttic on Monday August 08, 2022 @10:51AM (#32386116)
I get that some people like to hear engine sounds selectively but what gets me is why would the car manufacturers spend time and money to make a bad emulation when they could mic up the engine block/exhaust, add some EQ to beef it up if necessary and play it in the cabin? ..on second thought it's probably because adding extra wires and brackets being work/cost added to each car in assembly vs digital gimmick shipped as part of the head unit that requires no additional work per unit since it already has access to CAN bus for RPM etc. imo they should realize the old adage still holds, if it's worth doing it's worth doing well.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by jamestimmins on Saturday August 06, 2022 @01:40PM (#32370047)
My hope is that's why he made the repo private. Would be cool if he found some meaningful commercial value in this.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by Ciantic on Saturday August 06, 2022 @04:26PM (#32371292)
It 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.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by jamestimmins on Saturday August 06, 2022 @07:11PM (#32372437)
Makes 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.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by freemint on Saturday August 06, 2022 @01:21PM (#32369889)
I 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.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by dizzant on Saturday August 06, 2022 @02:25PM (#32370406)
He 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.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by freemint on Saturday August 06, 2022 @03:26PM (#32370843)
Thanks, 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.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by ChrisRackauckas on Saturday August 06, 2022 @10:47PM (#32373443)
Indeed 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.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by freemint on Sunday August 07, 2022 @06:59AM (#32375506)
Would an implicit ODE solver (Euler or higher order) where the constraint solve is included in the implicit step be helpful?
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by _fat_santa on Saturday August 06, 2022 @10:21AM (#32368331)
That'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++
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by isaacimagine on Saturday August 06, 2022 @02:39PM (#32370510)
I 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.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by ASalazarMX on Saturday August 06, 2022 @04:43PM (#32371428)
Although 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.

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by pushqrdx on Monday August 08, 2022 @01:50PM (#32388715)
can you please upload the clone including the git history? or did you download a zip off of github (not git clone)?
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by jcbcn on Saturday August 06, 2022 @03:13PM (#32370749)
what was the repo called?
[dead]
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by dang on Sunday August 07, 2022 @11:26PM (#32382155)
I appreciate the curiosity, but it's probably not great for us as a community to be un-privating people's private repos.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by jcbcn on Sunday August 07, 2022 @07:21PM (#32380888)
Thank you!
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by quasarj on Saturday August 06, 2022 @03:53PM (#32371022)
Thank you, was hoping someone had a copy. Strange decision to suddenly close it, but whatever. The internet never forgets!
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by analognoise on Saturday August 06, 2022 @08:10PM (#32372714)
God I love HN.

Thanks.

Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by buescher on Saturday August 06, 2022 @11:45AM (#32369093)
That's very impressive. I hope he writes it up. I'd like to see the bibliography.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by zbird on Saturday August 06, 2022 @07:24PM (#32372515)
I 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.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by mandeepj on Saturday August 06, 2022 @02:09PM (#32370284)
Great job. If my car had that instrument panel - and I'd love to have it - then it'd look like a cockpit :-). Amazing stuff.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by zbird on Saturday August 06, 2022 @07:17PM (#32372473)
Very nice work, need more posts like this.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by jmpman on Saturday August 06, 2022 @11:08AM (#32368762)
Quite incredible. I’d like to see engine vibration in the X,Y,Z axis, to optimize engines for a quadcopter APU.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by dark-star on Saturday August 06, 2022 @02:38PM (#32370502)
anyone grabbed the code before the repo went private? I'd really like to play around with this a bit :)
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by goldenkey on Saturday August 06, 2022 @05:51PM (#32371890)
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by Cupertino95014 on Saturday August 06, 2022 @11:50AM (#32369131)
Maybe 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.
Re:Simulating an Entire Car Engine (yes, it makes noise) [vi... by detaro on Saturday August 06, 2022 @01:50PM (#32370132)
I only know the trombone one: https://www.youtube.com/watch?v=s5IKthNYhVY