Hope you guys enjoyed the video! I don't know if this covers everything that everyone wanted but I think it gets the most important points across. Some people asked what the impulse responses I used in the engines sound like and they don't sound like much, just short clicks. Also, the TH-cam video compression algorithm was not kind to this video which I knew might be an issue. I promise the fluid visualization looks a lot better in the original program lol. Let me know what you guys think! Also, some people have criticized the fact that I'm actually responding to "haters" or think that it makes me look unconfident. I don't agree. Giving/taking criticism is a 2-way process and I used their almost purposeful misunderstanding of my program to demonstrate some principles about it which helped the flow of the video. Maybe other TH-camrs ignore or pretend to not be affected by criticism at all. This is not me. I accept all criticism, I don't delete any comments and I actually take *action* if I receive good criticism from my viewers. If I get poorly thought out criticism though, I will respond to it because I am confident in what I've implemented and I think it's a worthwhile conversation to have. I don't think these Reddit experts were simply trolls trying to make me upset. They had a right to criticize or interpret my work, and I am simply correcting and informing them and I would never take away their right to comment on, disagree with, or criticize my work.
"Reddit Experts" I felt that. Nothing more frustrating than having something *you built* incorrectly explained to you by someone who's never even looked at the code.
When reddit first appeared there actually were experts there. Much like slashdot. But these days, mostly only knuckle draggers walk there as most intellects have long since left. Especially given the sociopolitical environment, large numbers of bo[o]ts, and the crazy moderators who exist for specific sociopolitical reasons. There are no experts on Reddit these days. Only those who pretend to be so, bolstered by a corrupt system design to control and manipulate people. Much of which applies to yatub too.
I kind of feel like such experts often are the ones who know just enough about the topic to notice the simplifications of it (or even just the deviations from the curriculum), but don't understand the reasons why it might not even matter. And I guess most of them also like to throw fancy terms left right and center to scare laymen away and feel superior.
13:00 If you want a turbulence noise with more solid theoretical grounding, you could instead calculate the vortex shedding frequency of each vessel from its diameter and bulk velocity. (Then, integrate instantaneous frequency to get phase, and use the phase to calculate the amplitude; OR just apply the frequency as a bandpass filter on your white noise.)
@@JuniorJunison Calculus isn't that high level (at least, it shouldn't be, it's not that scary and we should stop treating it as such on a societal level), it's just the foundation that all the engineering concepts start from.
@@JuniorJunison you need math to understand what a vortex is?. A fluid getting compressed creates a vortex if it has anywhere to escape while compressed, your kitchen sink makes a vortex, a seringe makes a vortex, toilets make a vortex. This is middleschool physics tier of knowledge.
Honestly as a mechanical engineering student having dealt with and dealing with fluid mechanics your comprehension and use of the formulas and concepts aren’t sacrilegious in any manner. You did what all of us engineers strive to do. Take a complicated concept and simplify and propagate it in a manner best suited for the project you are working on given the complexities of the material.
Former Mechanical Engineering grad student here, who got a Ph.D. in fluid mechanics with an advisor who specializes in internal combustion engines, so I may have a little bit of expertise to pass judgement on this. This is, no question, a simulation -- and one that is, IMO, very well done. As my advisor often said, "All models are wrong. Some models are useful." The trick is to choose the level of approximation (i.e., wrongness) that is appropriate for the answers that you want, and while this has a lot more approximation than the full 3-D fluid simulations that an engine company might use, you're also not needing their level of precision in the answers. This is useful for what you need, ergo it is a successful simulation. The one "big" thing that I note that would separate this from what some people might judgmentally think of as a "real" simulation is that you haven't tested it against experimental data except in a sort of broad sense of "these numbers are about the right magnitude". It would be interesting to compare the simulated exhaust velocities and such to actual ones to see how close the model actually is in computing those. That would also give you an ability to multiply some of your flow equations by experimentally-derived "correction factors" to account for the fact that the flow doesn't precisely match the simplified model -- for instance, perhaps typical cylinder geometry gets 95% as much scavenging as you calculate or something. But that's a refinement, and IMO there is nothing wrong with an "a priori" model like this. For simulating the turbulent noise, random noise is almost certainly the best choice. To be most accurate, you probably want to "color" the noise by having different average amplitudes at different frequencies rather than using plain white noise. I don't think there's a good way to calculate the coloring other than using parameters from an experimental recording -- which is basically what you're doing in a very rough way by a "does this sound about right?" adjustment, and given the small amount of difference it sounds like it makes, that amount of accuracy is entirely sufficient. I am also reminded of one of my dad's career successes in his Mechanical Engineering Ph.D. back in the 1960s. He was working on simulations of turbulent flow next to the walls in a nozzle, and the "most advanced" state of the art at the time was complex 2-D computations. He found that, by using a much simpler 1-D approach that used experimental data more heavily, he could produce notably more accurate results than the 2-D computations. So more-detailed does not always mean more accurate!
Thanks for sharing your knowledge! I would absolutely love to get some decent equipment and test the simulation against real data. In fact, it's something that I may actually do as the simulator develops. Part of the problem I had while writing the simulator is the lack of experimental data, or at least, experimental data that is easily accessible online. There's also a notable lack of experimental data on the more "non-essential" elements of engines. For instance, finding a research paper on "cam chop" seems to be pretty challenging and I wasn't able to find many satisfactory scientific explanations for that phenomenon. In any case, perhaps as more knowledgeable people such as yourself learn about the simulator and contribute their knowledge, those gaps can be rectified. Thanks for watching!
I am amazed at how complex yet understandable this all was, thank you for all of this fascinating stuff and glad you are getting some recognition for your work.
I really admire how you're able to explain how this works without it feeling dumbed down, and I'd absolutely love to see more. (Perhaps even make a SoME3 entry out of your engine simulator work when that rolls around next summer?)
now that i think about it, i'd be surprised if Grant never came across one of these engine sim videos. they'd for sure make for an interesting submission to SoME
I dont care how accurate this is or how good the engine manufacturers simulations are. This is so freggen cool. I love this project. If I picked up one thing from your impossible engine simulation. Its that part of the sound of an engine its that its not perfectly balanced. So if you can somehow include minor imperfections and/or insimilarities between cylinders in an engine. It would probably sound more lifelike. Keep it up 😎
Yeah, this is definitely getting into the realm of the physics and gas simulation engine being "too" perfect, whereas in real life there's piston seal leakage, gear teeth backlash, timing belt stretching/slipping, and all sorts of other nasty vibration that causes wear and tear with real-life engines.
@@MajatekYT but it will take long to implement that because consider like the materials that combined to become part of that engine. it can create the simulation engine perfectly like timing, gear, etc, but the rest of them do it in real life
The way you tried to make it sound more "real" or organic, is really similar to how sound designer do with synthesizers. Add randomness and noise then it won't be as digital and clean haha. Great video, never mind those people speaking things anonymously.
I really really doubt that we have the hardware to run such complex engine physics in racing games just yet. Keep in mind that most Racing simulators like Iracing, ACC etc, run their physics around 400-500HZ in order for hardware and netcode to be able to keep up. We still have a Loooooong way to go until such complex engine simulations can be used in a racing game.
@@JasonBeo True but this allows to get sound for engines way more accurate than before possible. Even if they aren't simulated in game, but pre recorded and played back. Or have a Model that sits somewhere in between.
@@JasonBeo it doesnt need to be the full sim itself, you can just use the sim to generate the sound and use the super clean samples to work on. I think someone already utilized this for an ac mod, I think I downloaded it but I forgot the name of the car, I can look it up if anyone is interested
For the EQ stages, there's a definite physical justification to boosting the high frequencies if you consider the way the thin walls of different exhaust components would couple interior and exterior pressures, blocking "DC"=exhaust leaks while allowing high frequency. And if you want, you can absolutely derive "realistic" frequency response curves from first principles by finding clever ways to treat everything as a damped spring-mass system (or an LCR circuit, since it's the same math). For a thin-wall exhaust tube, the mass term can come from the material's area density and the spring term from hoop stress calculations; for a solid engine block the mass term can come from volumetric density and the spring term from hertzian contact stress mechanics. For either, the damping term comes partly from mechanical properties and partly from the exterior surface area vibrating and getting pressure+cavitation drag.
Anyone else notice how his voice has sounded a lot higher and happier at the start of each vid? I think this is a big morale boost for him, keep it up folks! Keep it up AngeTheGreat!
This is one of the most superb videos I've watched on TH-cam, describing one of the most superb computer applications ever written by an individual (in my view). I could go on and on but instead I'll point out how you only spent a moment saying something that I believe is super important: your goal was to make something that sounds realistic but runs in real-time on consumer hardware - i.e. purpose + audience = application. I have an aeronautics background and have thought for many years about writing flight simulations (I created one back in 2006 and published it as first author on an AIAA meeting paper) -- the idea that "the more realistic I make this, the more people will find something to critique" can be debilitating. But ultimately, I see you've done something for enjoyment, because you thought it was cool -- I truly respect that, and to hell with them haters!
You know understanding the way an engine works is cool and all, but the fact that this man just made this level of simulaton perform as good as it does, is just something else entirally. Round of aplause for this chad that made this with his absolute dedication and knowledge of engines, coding, and physics.
Do I understand correctly that you're using EQ to boost the high frequency signal, to make it less muffled sounding? Have you tried adding harmonics for the high frequency sounds? For example with a saturation filter? As if the loud sounds vibrate other parts of the engine, with different kinds of sympathetic frequencies.
From a physical standpoint, this makes sense even without considering mechanical vibration, since acoustic propagation at these pressure levels is nonlinear: the waves travel faster in the high pressure zones than in the low pressure ones, causing gradient steepening and spectral enrichment. A simple setup to take it into account would be a variable delay filter, in which the delay depends on the signal itself.
Not sure if that would really give you a better result. If you work with high pressures, air acts more akin to a compressor, as you have some base inertia from your particles, and compressive properties where part of the acoustic energy is converted to heat due to friction or pressure differences in the air. So while you do get changes in dynamics from the air and elements around the engine, it wouldn't really saturate the sound, as the changes in dynamics happen on a larger timescale than 1 single cycle. Beyond that, the main issue that's being corrected here is the overall spectral shape of the sound, while keeping the waveform mostly intact. If you distort the signal, you won't really shift the spectral centre in any major way (this refers to the overall shape of a sound when viewed in a spectrogram). This is pretty important to how our ears perceive "dark" or "bright" in a sound, so an EQ would work better here. Last but not least, if you actually wanted to simulate the way the engine resonates by the sound, you would still use a convolution impulse for this. The harmonic frequencies you generate would be harmonic frequencies of the object that is being excited, not the signal that generates it. So having harmonic distortion on the engine rawr itself sounds somewhat unnatural (at least from my theorising and testing I just did).
Man pls don't listen anyone who says bad stuff this is insanely good and amazing job overall, as a fellow programmer I can appreciate a good real time simulation when I see one. And the sound is just unbelievable. you know what? it would make an insane FL plugin lol~
To me, the most amazing audio that comes out of your simulation is engine braking. I have not heard a better "sample" or simulation in any game on deceleration, as well as transient throttle inputs. Nothing comes close, and you hit the nail on the head when you mentioned that those are the things that we listen to and intricate details add to the realism. Thank you for the explanation!
Gosh, It is so beautiful. The code you write the sheer size of your project, and how you visualise that, it is just beautiful. I do also enjoy reinventing things and diving into the details of how stuff works, and then implementing it with code, bu I still cannot build something as big and complex as a 3d renderer. I really admire your work. Thank you for the videos!
I made a VST version of this core idea in 2012, but credit where credit is due, I did not build a full-on physics modeling engine, but rather condensed the conceptual functions of an ICE engine to work within the framework of a musical synthesizer. It's been interesting to watch the development here and the open-market uploads of various users' different engines, because I can see and hear the exact same issues I had to work through to get mine more accurate over the (admittedly quite long) time it took to develop into the fully-featured product I brought to market. Seeing this newfound interest (or perhaps just latent interest that I never tapped from lack of adequate advertising?) has made me consider picking up development again. Either way, impressive product so far for sure, and I hope you're able to further refine the model to get a more accurate response/sound out of this program than even what you already have.
See, I just love the fact that this was done -SPECIFICALLY- in the quest for realistic engine sounds. Not for like a full realistic engine simulation or anything, just to get the sounds right... but along the way it just morphed into that, and when you think about it of course it makes sense. What better way to generate a realistic engine sound from a handful of variables than to simulate the entire engine? Because all of it has an effect. Flat plane cranks sound far different than a cross plane. Cam lift duration will change how an engine sounds. The length of the headers, the firing order, all of it... and I'm thoroughly impressed at just how close and good it is, even in this form. Honestly can't wait to see how this tool evolves.
really REALLY Amazing!! But there's one thing to consider: The engine itself makes noise, the inside parts make sound too, the valvetrain, and such. Still, Amazing program! Edit: I never thought I would ever see anyone make an really accurate engine simulator. You made it. You're a legend. Congratulations!
Take it from someone who spent over 20 years in the auto OEM engine development business, with names most will recognize immediately, your simulation is f-ing ace! It's probably more than good enough to do some scoping work at a conceptual level for a real world engine development project if you were after a certain type of sound. It probably also generates a more accurate power and torque estimation than most garage dynos that people use for their modification willy waving. I salute you sir!
Maaan thats nuts, great job around the audio. Implementation of sounds for real engines is the most difficult task in game audio imho. Absolutely stunning. Thank you
As a non-expert in anything you've created for this program, I can honestly say you sir are 100% legit. Its the internet, there are people that will kiss your butt saying how this sim changed their life then switch accounts and make another comment about how your ancestors are ashamed and you should find a short pier and take a long fuck off it. Dont forget, the positive comments come from people who just happen to have the time and motivation to comment, vastly more people could very easily be geeking out over the two engine types videos (as I did yesterday, and I dont think I commented because I didnt really have anything to say at the time) but not commenting. Then there is the internet hate brigade that is always fired up to author a fresh dissertation on whatever they can reason as context for keeping your ego in check, and they love commenting back and forth to each other. And there is the volume boosting effect of the vocal minority and their vitriol, magnified by bandwagoners. The negative crowd ALWAYS seems louder and denser than the interested/positive commenters crowd, while most people at the very least are going "huh, cool" and on to the next video. Dont let those negative comments drag you down, especially when the view count to negative comments ratio is on the scale of mountain to mole hill. Rest assured, this is one internet weirdo whos pants have been efficiently blown off never to be seen again. Also, I know coding aint easy, even when you've done it for a while. Getting all that to run in essentially real time is no small feat. A quick glance at any app/game store will prove people have asked far more compensation for magnitudes less effort. From one nerd to another (I assume you identify as nerdy on some level, as we all should feel comfortable doing about the things we nerd on) Thank you. Thank you for your time, effort, sharing your interests and knowledge, for sharing what you have created with the internet at large. You and this project are a shining example of what the internet, as a community, is supposed to be about. Make something cool, share how you did it, and allowing/enabling others tweak and tween it to their whim without losing scope on your goal. Seriously, thank you.
The rest of your videos are so awesome, you totally deserve a lot of subscribers. I'm glad this small project has allowed your channel to grow so quickly :D
This is the stuff modern racing games need! The engine sounds like a Ferrari without even having samples! I love the idea that you can reproduce the engine sounds with just maths and physics.
I don't care at all about engines and their simulation, but your approach to generate sound is awesome as heck. Real-time procedural realistic audio generating has almost infinite potential and amount of use cases.
The showcase video already was very impressive and inspirational but this one is straight-up a true work of art. As an applied mathematics engineer I can only appreciate this accomplishment even more
This is the best video I have watched in ages. Concepts were explained with an effortless almost lazy clarity that just clicked. You are an inspiration, my good sir.
holy shit. I've been sort of learning the ins and outs of digital audio workstations for 20 plus years, but what you have shown here is something like the next generation of physically modeled synthesizers. astounding
Hey man, I have to say I am impressed with your work. Great stuff, truly. Keep it up. I am going to download and play with Engine Simulator for many hours! Cheers from a mechanical engineer, fluid dynamics simulation specialist, former Honda engine plant guy.
People on Reddit were doubting the veracity and authenticity of this simulator? Shows how much they (don't) know! It's clear that it's still not a "perfect" simulator, as far as the audio generated vs the genuine article that it is simulating, but it definitely is producing audio that has the same distinct characteristics of the actual motors and engines themselves. This engine simulator and the audio synthesizer are REALLY cool, and the sheer novelty and ingenuity are something to behold. I think the work done here was well worth it for the result produced, and AngeTheGreat accomplished what he set out to. If someone wants to go write an individual molecule or even macro-particle simulator that does the same thing, I challenge them to. At the end of the day, a simulator will never produce the same exact effects or results of the actual thing that's being simulated, that's why it's a SIMULATOR. I sorta feel like this video wasn't warranted, at least anywhere it acknowledges the jealous naysayers, though I did enjoy more breakdowns of the internals but I fear that their presentation was motivated out of frustration with the dingdongs with internet access, rather than by passion like the previous videos were. Nobody doing awesome stuff like this needs to be wasting their time or mental energy on recognizing the morons who will never do anything anywhere near as neato or interesting. Anybody can say anything on the internet, and as such morons will say moronic things, it's inevitable - there's no avoiding it, so you just gotta take it in stride and not let it affect you.
Fluid mechanics expert here. You’ve done a great job here. Computational fluid dynamics software is a real mess. It’s often crazy expensive and awkward to use or free and open source and even more awkward to use. The results are often garbage and require a lot of experience and expertise to be useful. For students the whole experience is painful. They struggle with the user hostile software and barely get something basic to work in the end. A tool as accessible and dynamic as yours would make an incredible teaching environment. Same for BeamNG. So in a sense this is revolutionary.
First off, I love it all! Everything from the visuals and explanation to the voice over, it's all on point! I feel like this video could only have been made by someone who really knows and loves his craft. This video also shows that a regular human really can learn almost anything. Thanks for teaching me something new and interesting, made my day a little bit better! : ) (Side note: 13:31 I 100% agree LOL) 12:55 From my experience, this noise is almost never truly "random" (but I think we both get that, moving on). Theoretically correct or not, this noise method is actually commonly used in music production when you are making a synth preset/sound etc. The reason behind this is almost the same as yours. The noise coming from an electronic synth can in a lot of cases sound too perfect, sterile and electronic. By adding noise into the mix you make the synth sound more natural and warm (in a way faking how an analog synthesizer would sound). I sometimes use this technique myself when making a preset. (there's obviously more to noise than this but it's the basics) 13:39 When I see this I wonder a few nerd things (sorry if this is a lot). 1st: What bit depth and buffer size is the program "playing" at if you know (both before the "upsampler" and at the finale output sound, if there is a difference)? 2nd: What noise is the "Noise Generator" generating? (Is it just regular white noise or something more complex?) 3rd: What "settings" are you using for your "low pass filter" (what frequency does it filter etc)? 4th: What compressor type is it (multi- or single band etc), and what "settings" are you using for it (if it operates like a regular compressor that is)? Again, thanks for the cool video, I love it, and thanks for reading this!
I love the way he describes all of the technical aspects as well as the physical aspects. I've had trouble understanding engines for the longest time. Subscription earned!
This is amazing, now put the output through that impulse converter a few times to simulate the engine bay and the room the car is in and you've got yourself a very convincing engine sound
I just think it's crazy that he just kind of popped this little thing out and was like "oh hey look at this cool little thing I did do you like watching it? Lol" and pretty much the entire online automotive community collectively exploded. (Me included) really cool project and I can only wait to see what you come up with next. Looking back at your other videos I've even enjoyed the other ones you were making before this.
Tons of thanks for the insight on how you achieved the sound! I'm interested in achieving realistic engine sounds digitally and your video definitely cleared the path
I simulated a guitar sound in a similar way, by physically modeling strings with particles and translating their vibration into a waveform. the most interesting takeaways are that it's particularly hard to pluck a string procedurally without introducing a sharp release sound that sounds like metallic clanking, but it's curiously easy to stimulate rock-like distortion by literally clamping the output signal.
Holy crap dude, I was already amazed enough about what you've been building and presenting and thén you casually started discussing the heat cycle in refrigeration using your model. And then it just kept getting better and better...
Hi Ange, can you make a video explaining how the physics engine works? When they start talking about projected Gauss siedel methods my eyes just glaze over. I've tried reading the Baraff papers but not easy to follow
I did make one already but it doesn't cover the Gauss Seidel method in detail. I believe Engine Simulator uses a gradient descent solver for the physics
Hah, this is pretty dang cool. I didn't really read the topic before i started and i was like: Hey, he seem to like audio stuff, took a hot minute until i understood that was the whole point haha. Sounds amazing!
This is awesome. I love tampering with engine design, but some things, we just don't have the time and funding to do. This solves that quite well! Thank you! I never really understood programming, so I will attempt to use the program. Wish me luck!
great video as always, a tip to reduce youtube artifacts on the particles (eg 6:10) is to upscale, render and upload to youtube in 4k. The compression algorithm is way less harsh with 4k video, even when you are playing it back on 1080p
I think using the ideal gas model was a smart idea for your air pump simulation, considering that atmospheric temperature and pressure is already well past the saturated vapor line on a T-v diagram, but since refrigerators operate so close to the saturated vapor line, and commonly transition into the liquid/vapor mixture dome, you won't get any meaningful/realistic behavior out of modeling refrigerants using the ideal gas model. Other than that, I am glad you spent the time going over how you condensed undergrad level engineering material into a nice and clean piece of software. Very good job. I bet you that car companies model their engines by solving the navier-stokes equations repeatedly for each cylinder, one degree of rotation at a time, for each each stroke, which probably takes hours for them to compute just a complete cycle of all cylinders. You are able to create meaningful and semi-realistic engine behavior in a matter of milliseconds of time. That is so freaking cool!
The refrigeration cycle shown in the simulation is not the same as the one used in typical vapor-compression systems. Refrigeration can be achieved without any changes of state, but is less efficient. What I show is gas-cycle refrigeration which is a rarely used but still viable method of refrigeration and does not use phase-changes or any special refrigerant (air being the refrigerant). Gas-cycle refrigeration systems are also slightly different from the one shown in the simulation and typically use an expansion chamber or turbine to reduce pressure as opposed to a nozzle but I wanted to keep the demo as simple as possible.
The best aspect in this is you seamlessly combined an engine simulator with an imbecile detector.. both work greate! and using the same code! you are a genious!
It's definitely not a scientific simulation. And even modern CFD simulations are not capable of capturing the full complexity of the turbulent flow and flame propagation (As far as I know of ). But it solves the problem it is intended for, which is what counts. To make things a bit more accurate you could treat the intake and exhaust manifolds using a simple PDE in time and position along the "tubing". In this manner, you could capture shocks, waves, and wave reflection at the in- and outlets. These are important as they can increase the volumetric efficiency of the engine. However, even that would be infeasible at 85k fps. So I think you got the best possible solution, given the problem you set out to solve
I was planning to look into that approach for the exhaust and intake, but whether or not it makes it into the simulation depends on performance of course
@@AngeTheGreat There are numerical schemes based on the method of characteristics for the hyperbolic PDE you need to solve, which are very efficient. Maybe it is doable, I'm looking forward to seeing what you come up with!
I have a suggestion regarding the sound design, which may or may not produce the "higher partials" you're expecting. At high acoustic pressure levels, sound propagation is nonlinear, meaning that higher-pressure zones travel faster than low-pressure zone. This causes them to "catch up", steepening the pressure gradient. If the tube is long enough, it may even lead to shock waves: these have been observed e.g. in trumpets using Schlieren imaging, and I suspect that some motors may produce them as well. My suggestion is therefore to implement a nonlinear filter simulating this effect: assuming that the waves only travel in one direction, it can be represented simply a variable-length delay, for which the delay length depends on the pressure level (i.e. on the signal itself). For more info the keywords are "weakly nonlinear acoustics". Cheers!
Also note that the pressure waves radiated by the end of a small tube into outer air can be quite different from the waves traveling inside the tube due to the impedance mismatch. This may explain your need for a high-frequency boost.
Thanks for taking the time to break down these concepts; I imagine it requires a fair amount of work What you've achieved in ingesting complex information, breaking that down into base principles and experimenting is very impressive. You deserve every success that comes from your methodology and so far the output speaks for itself I look forward to going through the code and learning a thing or two
I am a "expert in fluid dynamics" (In "" because I work with chemical reactions mostly) and I'd say it's pretty spot on what you did (for this use case of course). About the white noise thing, It's true there is some white noise irl but I IMAGINE it doesn't come directly from the turbulence, but from the interaction of the air molecules with the inperfect surfaces inside the engine, ie friction, probably most of it coming from parts like the manifolds flanges. The turbulence of course plays a role in it but it's not the full reason, but the way you implemented it does the job just fine, I also imagine simulating that would be a pain in the butt.
Can we all appreciate how the background for this program and the video is in dark mode? A lot of youtubers seem to not care about our nightly eyesight
are you kidding me? this is incredible. Holy ... :O I am in awe and in love, this is something I would love to do. I have to get to reading, hope I've got the time!
People don't realize how much of every single game, simulation and graphics implementation is total smoke & mirrors. Having to add so many disclaimers about your product feels extremely silly to me as an engineer who has written a ton of game, graphics and simulation code and knows how much total made up nonsense there is behind the curtains. In fact, this is one of the most accurate and impressive implementations I've ever seen. It's not perfect, but it's way ahead of the curve and amazing for a real-time application. Thanks for sharing this so kindly and candidly, and especially for giving the code away for free for everyone to learn from and help improve!
This is an amazing physics simulation! I did not expect this hater comments from "experts" you appear to have gotten. Given I am an electrical engineer so it is not my expertise, still, it is impressive both on the physics side of things as for the programming aspect.
Regarding the peculiarities of the sound of pipes and valves, you can read about the study of the simulation of wind instruments and organs. For example organteq does a good job of simulating the sound of organ pipes. An organ has pipes and valves. There is a lot of research that the creators of organteq rely on. There, the features of the movement of the air flow in the center of the flow and near the walls of the pipes are studied. The swirls on the valves are also investigated. And how it should sound. You may be able to find some additional information there to refine your simulation.
This is awesome work and you know it ! Don't pay attention to those "experts" that never contributed to anything useful in their lives ;) I'm hyped to see the version 2 !
Hope you guys enjoyed the video! I don't know if this covers everything that everyone wanted but I think it gets the most important points across. Some people asked what the impulse responses I used in the engines sound like and they don't sound like much, just short clicks. Also, the TH-cam video compression algorithm was not kind to this video which I knew might be an issue. I promise the fluid visualization looks a lot better in the original program lol. Let me know what you guys think!
Also, some people have criticized the fact that I'm actually responding to "haters" or think that it makes me look unconfident. I don't agree. Giving/taking criticism is a 2-way process and I used their almost purposeful misunderstanding of my program to demonstrate some principles about it which helped the flow of the video. Maybe other TH-camrs ignore or pretend to not be affected by criticism at all. This is not me. I accept all criticism, I don't delete any comments and I actually take *action* if I receive good criticism from my viewers. If I get poorly thought out criticism though, I will respond to it because I am confident in what I've implemented and I think it's a worthwhile conversation to have. I don't think these Reddit experts were simply trolls trying to make me upset. They had a right to criticize or interpret my work, and I am simply correcting and informing them and I would never take away their right to comment on, disagree with, or criticize my work.
When will we see collaboration with Trackmania?
@@iarmycombo5659 lmao best engine sounds what are you saying ;)
@@clemdemort9613 I've *heard* they aren't that great. (Pun very much intended)
@AngeTheGreat Is it possible to simulate various guns sound that way?
Great work! Could you please add the link to the other video where you discuss the rigid body simulation part to the description?
"Reddit Experts" I felt that. Nothing more frustrating than having something *you built* incorrectly explained to you by someone who's never even looked at the code.
They are the ultimate “trust me bro”
When reddit first appeared there actually were experts there. Much like slashdot. But these days, mostly only knuckle draggers walk there as most intellects have long since left. Especially given the sociopolitical environment, large numbers of bo[o]ts, and the crazy moderators who exist for specific sociopolitical reasons.
There are no experts on Reddit these days. Only those who pretend to be so, bolstered by a corrupt system design to control and manipulate people. Much of which applies to yatub too.
Making my point, yatub sin sored my previous comment which said nothing but truth.
I kind of feel like such experts often are the ones who know just enough about the topic to notice the simplifications of it (or even just the deviations from the curriculum), but don't understand the reasons why it might not even matter.
And I guess most of them also like to throw fancy terms left right and center to scare laymen away and feel superior.
@@jonsen2k it's reddit. It's definitely just for the sake of feeling superior
13:00 If you want a turbulence noise with more solid theoretical grounding, you could instead calculate the vortex shedding frequency of each vessel from its diameter and bulk velocity. (Then, integrate instantaneous frequency to get phase, and use the phase to calculate the amplitude; OR just apply the frequency as a bandpass filter on your white noise.)
Sounds pretty cool, I'll definitely have to look into that
This is one of those comments I read and understand nothing of.
@@RamenPoweredShitFactory mainly because it requires knowledge in high level math like calculus
@@JuniorJunison Calculus isn't that high level (at least, it shouldn't be, it's not that scary and we should stop treating it as such on a societal level), it's just the foundation that all the engineering concepts start from.
@@JuniorJunison you need math to understand what a vortex is?.
A fluid getting compressed creates a vortex if it has anywhere to escape while compressed, your kitchen sink makes a vortex, a seringe makes a vortex, toilets make a vortex. This is middleschool physics tier of knowledge.
Honestly as a mechanical engineering student having dealt with and dealing with fluid mechanics your comprehension and use of the formulas and concepts aren’t sacrilegious in any manner. You did what all of us engineers strive to do. Take a complicated concept and simplify and propagate it in a manner best suited for the project you are working on given the complexities of the material.
Yes, it is a very simple model and I would have approached it completely differently, but the results speak for themselves
@@fg8557 if it works, It works.
Former Mechanical Engineering grad student here, who got a Ph.D. in fluid mechanics with an advisor who specializes in internal combustion engines, so I may have a little bit of expertise to pass judgement on this. This is, no question, a simulation -- and one that is, IMO, very well done. As my advisor often said, "All models are wrong. Some models are useful." The trick is to choose the level of approximation (i.e., wrongness) that is appropriate for the answers that you want, and while this has a lot more approximation than the full 3-D fluid simulations that an engine company might use, you're also not needing their level of precision in the answers. This is useful for what you need, ergo it is a successful simulation.
The one "big" thing that I note that would separate this from what some people might judgmentally think of as a "real" simulation is that you haven't tested it against experimental data except in a sort of broad sense of "these numbers are about the right magnitude". It would be interesting to compare the simulated exhaust velocities and such to actual ones to see how close the model actually is in computing those. That would also give you an ability to multiply some of your flow equations by experimentally-derived "correction factors" to account for the fact that the flow doesn't precisely match the simplified model -- for instance, perhaps typical cylinder geometry gets 95% as much scavenging as you calculate or something. But that's a refinement, and IMO there is nothing wrong with an "a priori" model like this.
For simulating the turbulent noise, random noise is almost certainly the best choice. To be most accurate, you probably want to "color" the noise by having different average amplitudes at different frequencies rather than using plain white noise. I don't think there's a good way to calculate the coloring other than using parameters from an experimental recording -- which is basically what you're doing in a very rough way by a "does this sound about right?" adjustment, and given the small amount of difference it sounds like it makes, that amount of accuracy is entirely sufficient.
I am also reminded of one of my dad's career successes in his Mechanical Engineering Ph.D. back in the 1960s. He was working on simulations of turbulent flow next to the walls in a nozzle, and the "most advanced" state of the art at the time was complex 2-D computations. He found that, by using a much simpler 1-D approach that used experimental data more heavily, he could produce notably more accurate results than the 2-D computations. So more-detailed does not always mean more accurate!
Thanks for sharing your knowledge! I would absolutely love to get some decent equipment and test the simulation against real data. In fact, it's something that I may actually do as the simulator develops. Part of the problem I had while writing the simulator is the lack of experimental data, or at least, experimental data that is easily accessible online. There's also a notable lack of experimental data on the more "non-essential" elements of engines. For instance, finding a research paper on "cam chop" seems to be pretty challenging and I wasn't able to find many satisfactory scientific explanations for that phenomenon. In any case, perhaps as more knowledgeable people such as yourself learn about the simulator and contribute their knowledge, those gaps can be rectified. Thanks for watching!
I am amazed at how complex yet understandable this all was, thank you for all of this fascinating stuff and glad you are getting some recognition for your work.
Thanks! Glad you liked the video :)
Clicked to see cool animations...
...learned how a refrigerator works, epic!
I really admire how you're able to explain how this works without it feeling dumbed down, and I'd absolutely love to see more. (Perhaps even make a SoME3 entry out of your engine simulator work when that rolls around next summer?)
now that i think about it, i'd be surprised if Grant never came across one of these engine sim videos. they'd for sure make for an interesting submission to SoME
I dont care how accurate this is or how good the engine manufacturers simulations are. This is so freggen cool. I love this project.
If I picked up one thing from your impossible engine simulation. Its that part of the sound of an engine its that its not perfectly balanced.
So if you can somehow include minor imperfections and/or insimilarities between cylinders in an engine. It would probably sound more lifelike.
Keep it up 😎
i had this idea to purposely misalign the crankshaft. Instead of 180 for 4 cylinder, vary between 178 and 182 degrees.
Yeah, this is definitely getting into the realm of the physics and gas simulation engine being "too" perfect, whereas in real life there's piston seal leakage, gear teeth backlash, timing belt stretching/slipping, and all sorts of other nasty vibration that causes wear and tear with real-life engines.
@@MajatekYT but it will take long to implement that because consider like the materials that combined to become part of that engine. it can create the simulation engine perfectly like timing, gear, etc, but the rest of them do it in real life
The way you tried to make it sound more "real" or organic,
is really similar to how sound designer do with synthesizers.
Add randomness and noise then it won't be as digital and clean haha.
Great video, never mind those people speaking things anonymously.
This guys work will truly be the big breakthrough racing games need. Excited for the next step forward!
I really really doubt that we have the hardware to run such complex engine physics in racing games just yet. Keep in mind that most Racing simulators like Iracing, ACC etc, run their physics around 400-500HZ in order for hardware and netcode to be able to keep up. We still have a Loooooong way to go until such complex engine simulations can be used in a racing game.
@@JasonBeo True but this allows to get sound for engines way more accurate than before possible. Even if they aren't simulated in game, but pre recorded and played back.
Or have a Model that sits somewhere in between.
@@FlaxTheSeedOne It might work as a middleware that generates the sound true.
@@JasonBeo Like how NatualMotion's Euphoria improved ragdolls. We can dream.
@@JasonBeo it doesnt need to be the full sim itself, you can just use the sim to generate the sound and use the super clean samples to work on. I think someone already utilized this for an ac mod, I think I downloaded it but I forgot the name of the car, I can look it up if anyone is interested
For the EQ stages, there's a definite physical justification to boosting the high frequencies if you consider the way the thin walls of different exhaust components would couple interior and exterior pressures, blocking "DC"=exhaust leaks while allowing high frequency. And if you want, you can absolutely derive "realistic" frequency response curves from first principles by finding clever ways to treat everything as a damped spring-mass system (or an LCR circuit, since it's the same math).
For a thin-wall exhaust tube, the mass term can come from the material's area density and the spring term from hoop stress calculations; for a solid engine block the mass term can come from volumetric density and the spring term from hertzian contact stress mechanics. For either, the damping term comes partly from mechanical properties and partly from the exterior surface area vibrating and getting pressure+cavitation drag.
Anyone else notice how his voice has sounded a lot higher and happier at the start of each vid? I think this is a big morale boost for him, keep it up folks! Keep it up AngeTheGreat!
People: how does your program that makes vrom vrom noises works
Ange: *proceeds to do a university class on mechanical engineering*
Loved it
This is one of the most superb videos I've watched on TH-cam, describing one of the most superb computer applications ever written by an individual (in my view). I could go on and on but instead I'll point out how you only spent a moment saying something that I believe is super important: your goal was to make something that sounds realistic but runs in real-time on consumer hardware - i.e. purpose + audience = application. I have an aeronautics background and have thought for many years about writing flight simulations (I created one back in 2006 and published it as first author on an AIAA meeting paper) -- the idea that "the more realistic I make this, the more people will find something to critique" can be debilitating. But ultimately, I see you've done something for enjoyment, because you thought it was cool -- I truly respect that, and to hell with them haters!
You know understanding the way an engine works is cool and all, but the fact that this man just made this level of simulaton perform as good as it does, is just something else entirally. Round of aplause for this chad that made this with his absolute dedication and knowledge of engines, coding, and physics.
Do I understand correctly that you're using EQ to boost the high frequency signal, to make it less muffled sounding?
Have you tried adding harmonics for the high frequency sounds? For example with a saturation filter?
As if the loud sounds vibrate other parts of the engine, with different kinds of sympathetic frequencies.
He does have a clipper at the end
@@LarsWilms true, though I'm not sure that's the kind of saturation you would expect from an engine
From a physical standpoint, this makes sense even without considering mechanical vibration, since acoustic propagation at these pressure levels is nonlinear: the waves travel faster in the high pressure zones than in the low pressure ones, causing gradient steepening and spectral enrichment. A simple setup to take it into account would be a variable delay filter, in which the delay depends on the signal itself.
Not sure if that would really give you a better result.
If you work with high pressures, air acts more akin to a compressor, as you have some base inertia from your particles, and compressive properties where part of the acoustic energy is converted to heat due to friction or pressure differences in the air.
So while you do get changes in dynamics from the air and elements around the engine, it wouldn't really saturate the sound, as the changes in dynamics happen on a larger timescale than 1 single cycle.
Beyond that, the main issue that's being corrected here is the overall spectral shape of the sound, while keeping the waveform mostly intact.
If you distort the signal, you won't really shift the spectral centre in any major way (this refers to the overall shape of a sound when viewed in a spectrogram). This is pretty important to how our ears perceive "dark" or "bright" in a sound, so an EQ would work better here.
Last but not least, if you actually wanted to simulate the way the engine resonates by the sound, you would still use a convolution impulse for this. The harmonic frequencies you generate would be harmonic frequencies of the object that is being excited, not the signal that generates it.
So having harmonic distortion on the engine rawr itself sounds somewhat unnatural (at least from my theorising and testing I just did).
Saturation would help the "click" feel less digital for sure
Man pls don't listen anyone who says bad stuff this is insanely good and amazing job overall, as a fellow programmer I can appreciate a good real time simulation when I see one.
And the sound is just unbelievable.
you know what? it would make an insane FL plugin lol~
To me, the most amazing audio that comes out of your simulation is engine braking. I have not heard a better "sample" or simulation in any game on deceleration, as well as transient throttle inputs. Nothing comes close, and you hit the nail on the head when you mentioned that those are the things that we listen to and intricate details add to the realism.
Thank you for the explanation!
Gosh, It is so beautiful. The code you write the sheer size of your project, and how you visualise that, it is just beautiful. I do also enjoy reinventing things and diving into the details of how stuff works, and then implementing it with code, bu I still cannot build something as big and complex as a 3d renderer. I really admire your work. Thank you for the videos!
I made a VST version of this core idea in 2012, but credit where credit is due, I did not build a full-on physics modeling engine, but rather condensed the conceptual functions of an ICE engine to work within the framework of a musical synthesizer. It's been interesting to watch the development here and the open-market uploads of various users' different engines, because I can see and hear the exact same issues I had to work through to get mine more accurate over the (admittedly quite long) time it took to develop into the fully-featured product I brought to market. Seeing this newfound interest (or perhaps just latent interest that I never tapped from lack of adequate advertising?) has made me consider picking up development again. Either way, impressive product so far for sure, and I hope you're able to further refine the model to get a more accurate response/sound out of this program than even what you already have.
See, I just love the fact that this was done -SPECIFICALLY- in the quest for realistic engine sounds. Not for like a full realistic engine simulation or anything, just to get the sounds right... but along the way it just morphed into that, and when you think about it of course it makes sense. What better way to generate a realistic engine sound from a handful of variables than to simulate the entire engine? Because all of it has an effect. Flat plane cranks sound far different than a cross plane. Cam lift duration will change how an engine sounds. The length of the headers, the firing order, all of it... and I'm thoroughly impressed at just how close and good it is, even in this form. Honestly can't wait to see how this tool evolves.
really REALLY Amazing!! But there's one thing to consider: The engine itself makes noise, the inside parts make sound too, the valvetrain, and such. Still, Amazing program!
Edit: I never thought I would ever see anyone make an really accurate engine simulator. You made it. You're a legend. Congratulations!
Another sound when shifting the piston in dead spots.
Take it from someone who spent over 20 years in the auto OEM engine development business, with names most will recognize immediately, your simulation is f-ing ace! It's probably more than good enough to do some scoping work at a conceptual level for a real world engine development project if you were after a certain type of sound. It probably also generates a more accurate power and torque estimation than most garage dynos that people use for their modification willy waving. I salute you sir!
Bro accidentally started an entire trend/community out of pure curiosity
Maaan thats nuts, great job around the audio. Implementation of sounds for real engines is the most difficult task in game audio imho. Absolutely stunning. Thank you
As a non-expert in anything you've created for this program, I can honestly say you sir are 100% legit. Its the internet, there are people that will kiss your butt saying how this sim changed their life then switch accounts and make another comment about how your ancestors are ashamed and you should find a short pier and take a long fuck off it. Dont forget, the positive comments come from people who just happen to have the time and motivation to comment, vastly more people could very easily be geeking out over the two engine types videos (as I did yesterday, and I dont think I commented because I didnt really have anything to say at the time) but not commenting. Then there is the internet hate brigade that is always fired up to author a fresh dissertation on whatever they can reason as context for keeping your ego in check, and they love commenting back and forth to each other. And there is the volume boosting effect of the vocal minority and their vitriol, magnified by bandwagoners. The negative crowd ALWAYS seems louder and denser than the interested/positive commenters crowd, while most people at the very least are going "huh, cool" and on to the next video. Dont let those negative comments drag you down, especially when the view count to negative comments ratio is on the scale of mountain to mole hill. Rest assured, this is one internet weirdo whos pants have been efficiently blown off never to be seen again.
Also, I know coding aint easy, even when you've done it for a while. Getting all that to run in essentially real time is no small feat. A quick glance at any app/game store will prove people have asked far more compensation for magnitudes less effort. From one nerd to another (I assume you identify as nerdy on some level, as we all should feel comfortable doing about the things we nerd on) Thank you. Thank you for your time, effort, sharing your interests and knowledge, for sharing what you have created with the internet at large. You and this project are a shining example of what the internet, as a community, is supposed to be about. Make something cool, share how you did it, and allowing/enabling others tweak and tween it to their whim without losing scope on your goal.
Seriously, thank you.
Damn, think I could watch 5 hours of this guy talking about mechanics and software. This engine is awesome, never seen a tool so simple work so well
The rest of your videos are so awesome, you totally deserve a lot of subscribers. I'm glad this small project has allowed your channel to grow so quickly :D
This is probably the coolest thing (from a programmer's view) that I have seen the last 10 years!
This is the stuff modern racing games need! The engine sounds like a Ferrari without even having samples!
I love the idea that you can reproduce the engine sounds with just maths and physics.
I don't care at all about engines and their simulation, but your approach to generate sound is awesome as heck. Real-time procedural realistic audio generating has almost infinite potential and amount of use cases.
The showcase video already was very impressive and inspirational but this one is straight-up a true work of art. As an applied mathematics engineer I can only appreciate this accomplishment even more
This is the best video I have watched in ages. Concepts were explained with an effortless almost lazy clarity that just clicked. You are an inspiration, my good sir.
holy shit. I've been sort of learning the ins and outs of digital audio workstations for 20 plus years, but what you have shown here is something like the next generation of physically modeled synthesizers. astounding
Lovely, this is exactly what the first video had me yearning for. Great work!
Hey man, I have to say I am impressed with your work. Great stuff, truly. Keep it up. I am going to download and play with Engine Simulator for many hours!
Cheers from a mechanical engineer, fluid dynamics simulation specialist, former Honda engine plant guy.
People on Reddit were doubting the veracity and authenticity of this simulator? Shows how much they (don't) know! It's clear that it's still not a "perfect" simulator, as far as the audio generated vs the genuine article that it is simulating, but it definitely is producing audio that has the same distinct characteristics of the actual motors and engines themselves. This engine simulator and the audio synthesizer are REALLY cool, and the sheer novelty and ingenuity are something to behold. I think the work done here was well worth it for the result produced, and AngeTheGreat accomplished what he set out to. If someone wants to go write an individual molecule or even macro-particle simulator that does the same thing, I challenge them to. At the end of the day, a simulator will never produce the same exact effects or results of the actual thing that's being simulated, that's why it's a SIMULATOR. I sorta feel like this video wasn't warranted, at least anywhere it acknowledges the jealous naysayers, though I did enjoy more breakdowns of the internals but I fear that their presentation was motivated out of frustration with the dingdongs with internet access, rather than by passion like the previous videos were. Nobody doing awesome stuff like this needs to be wasting their time or mental energy on recognizing the morons who will never do anything anywhere near as neato or interesting. Anybody can say anything on the internet, and as such morons will say moronic things, it's inevitable - there's no avoiding it, so you just gotta take it in stride and not let it affect you.
Fluid mechanics expert here. You’ve done a great job here. Computational fluid dynamics software is a real mess. It’s often crazy expensive and awkward to use or free and open source and even more awkward to use. The results are often garbage and require a lot of experience and expertise to be useful. For students the whole experience is painful. They struggle with the user hostile software and barely get something basic to work in the end.
A tool as accessible and dynamic as yours would make an incredible teaching environment. Same for BeamNG.
So in a sense this is revolutionary.
First off, I love it all! Everything from the visuals and explanation to the voice over, it's all on point! I feel like this video could only have been made by someone who really knows and loves his craft. This video also shows that a regular human really can learn almost anything. Thanks for teaching me something new and interesting, made my day a little bit better! : ) (Side note: 13:31 I 100% agree LOL)
12:55 From my experience, this noise is almost never truly "random" (but I think we both get that, moving on). Theoretically correct or not, this noise method is actually commonly used in music production when you are making a synth preset/sound etc. The reason behind this is almost the same as yours. The noise coming from an electronic synth can in a lot of cases sound too perfect, sterile and electronic. By adding noise into the mix you make the synth sound more natural and warm (in a way faking how an analog synthesizer would sound). I sometimes use this technique myself when making a preset. (there's obviously more to noise than this but it's the basics)
13:39 When I see this I wonder a few nerd things (sorry if this is a lot).
1st: What bit depth and buffer size is the program "playing" at if you know (both before the "upsampler" and at the finale output sound, if there is a difference)?
2nd: What noise is the "Noise Generator" generating? (Is it just regular white noise or something more complex?)
3rd: What "settings" are you using for your "low pass filter" (what frequency does it filter etc)?
4th: What compressor type is it (multi- or single band etc), and what "settings" are you using for it (if it operates like a regular compressor that is)?
Again, thanks for the cool video, I love it, and thanks for reading this!
I love the way he describes all of the technical aspects as well as the physical aspects.
I've had trouble understanding engines for the longest time.
Subscription earned!
man, ange. you're like a teacher or something. im literally taking notes while watching this so i can understand this simulator.
this one 20 minute video has taught me more than the half a year ive spent at college
you went from a causal c++ enjoyer to being a on motortrend. that’s impressive
This is amazing, now put the output through that impulse converter a few times to simulate the engine bay and the room the car is in and you've got yourself a very convincing engine sound
I just think it's crazy that he just kind of popped this little thing out and was like "oh hey look at this cool little thing I did do you like watching it? Lol" and pretty much the entire online automotive community collectively exploded. (Me included) really cool project and I can only wait to see what you come up with next. Looking back at your other videos I've even enjoyed the other ones you were making before this.
Way more interesting than expected.
This is the coolest shit, it's what I'd dreamt of making when I was younger and first got into automotive engineering stuff. You're doing god's work
Tons of thanks for the insight on how you achieved the sound! I'm interested in achieving realistic engine sounds digitally and your video definitely cleared the path
Amazing stuff dude! Love the more technical breakdown
I simulated a guitar sound in a similar way, by physically modeling strings with particles and translating their vibration into a waveform.
the most interesting takeaways are that it's particularly hard to pluck a string procedurally without introducing a sharp release sound that sounds like metallic clanking, but it's curiously easy to stimulate rock-like distortion by literally clamping the output signal.
Lol I can never figure out how to type out these but you truly are one of the best creators on TH-cam in my opinion
Thanks man, appreciate it 🙏
Holy crap dude, I was already amazed enough about what you've been building and presenting and thén you casually started discussing the heat cycle in refrigeration using your model. And then it just kept getting better and better...
Actually pretty informative, I have a new understanding of how air moves. Thank you!
Every new video blows my mind. Hoping to use your simulator in Unity some day.
Ang, how many hours does your day have? 36?
By the way, the fact that this video feels like an animated termodynamics course is mind-blowing.
Doesn't it, though? I'm sending it to my thermodynamics professor so he can get some ideas from it. :)
That recorded and posted tag underneath the sub count is neat. Very clever
Lol you making the bonehead engine sounds is basically me on serum/phaseplant (vst) some days. Love that you share this knowledge
Hi Ange, can you make a video explaining how the physics engine works? When they start talking about projected Gauss siedel methods my eyes just glaze over. I've tried reading the Baraff papers but not easy to follow
I did make one already but it doesn't cover the Gauss Seidel method in detail. I believe Engine Simulator uses a gradient descent solver for the physics
Fascinating! I came here because I'm searching for audio simulation. Really cool.
Hah, this is pretty dang cool. I didn't really read the topic before i started and i was like: Hey, he seem to like audio stuff, took a hot minute until i understood that was the whole point haha. Sounds amazing!
This is awesome. I love tampering with engine design, but some things, we just don't have the time and funding to do. This solves that quite well! Thank you! I never really understood programming, so I will attempt to use the program. Wish me luck!
The Sanford and Son reference was not lost on me. Good chuckle. Great vid!
Haha it's one of my favorite moments in the show!
I absolutely love the sounds, I'd love to see a mod for assetto corsa that uses sounds like these, cause all the default ones are pretty outdated
I'd love to see a future where you can export your custom engines to BeamNG swap em into a car a let em rip.
The future for racing games is looking pretty bright
great video as always, a tip to reduce youtube artifacts on the particles (eg 6:10) is to upscale, render and upload to youtube in 4k. The compression algorithm is way less harsh with 4k video, even when you are playing it back on 1080p
Good to know, thanks!
I think using the ideal gas model was a smart idea for your air pump simulation, considering that atmospheric temperature and pressure is already well past the saturated vapor line on a T-v diagram, but since refrigerators operate so close to the saturated vapor line, and commonly transition into the liquid/vapor mixture dome, you won't get any meaningful/realistic behavior out of modeling refrigerants using the ideal gas model. Other than that, I am glad you spent the time going over how you condensed undergrad level engineering material into a nice and clean piece of software. Very good job.
I bet you that car companies model their engines by solving the navier-stokes equations repeatedly for each cylinder, one degree of rotation at a time, for each each stroke, which probably takes hours for them to compute just a complete cycle of all cylinders. You are able to create meaningful and semi-realistic engine behavior in a matter of milliseconds of time. That is so freaking cool!
The refrigeration cycle shown in the simulation is not the same as the one used in typical vapor-compression systems. Refrigeration can be achieved without any changes of state, but is less efficient. What I show is gas-cycle refrigeration which is a rarely used but still viable method of refrigeration and does not use phase-changes or any special refrigerant (air being the refrigerant). Gas-cycle refrigeration systems are also slightly different from the one shown in the simulation and typically use an expansion chamber or turbine to reduce pressure as opposed to a nozzle but I wanted to keep the demo as simple as possible.
The best aspect in this is you seamlessly combined an engine simulator with an imbecile detector.. both work greate! and using the same code! you are a genious!
How you explained convolution was amazing!!!
Thanks for this amazing video, ill definitely be watching it a few times lol
God damn this thing is cool. The UI is awesome, delightful to behold. Well done!!!
the problem is very interesting and the solution is very well applied. I loved your project and am waiting for future updates.
this is beyond beautiful. perfect or not... it sounds amazing.
It's definitely not a scientific simulation. And even modern CFD simulations are not capable of capturing the full complexity of the turbulent flow and flame propagation (As far as I know of ). But it solves the problem it is intended for, which is what counts.
To make things a bit more accurate you could treat the intake and exhaust manifolds using a simple PDE in time and position along the "tubing". In this manner, you could capture shocks, waves, and wave reflection at the in- and outlets. These are important as they can increase the volumetric efficiency of the engine.
However, even that would be infeasible at 85k fps. So I think you got the best possible solution, given the problem you set out to solve
I was planning to look into that approach for the exhaust and intake, but whether or not it makes it into the simulation depends on performance of course
@@AngeTheGreat There are numerical schemes based on the method of characteristics for the hyperbolic PDE you need to solve, which are very efficient. Maybe it is doable, I'm looking forward to seeing what you come up with!
I'd loose my job for sure because I'll simply sit and mess with this for days. Awesome!!
This is just amazing, thanks for sharing your work in such a manner, great explanation of simulations in general and yours specifically.
I genuinely think that you are a bit of a genius for creating this
This video is great, dude! I started watching expecting most of the content to go over my head, but your explanations are very easy to understand.
ok f*rry
I have a suggestion regarding the sound design, which may or may not produce the "higher partials" you're expecting. At high acoustic pressure levels, sound propagation is nonlinear, meaning that higher-pressure zones travel faster than low-pressure zone. This causes them to "catch up", steepening the pressure gradient. If the tube is long enough, it may even lead to shock waves: these have been observed e.g. in trumpets using Schlieren imaging, and I suspect that some motors may produce them as well.
My suggestion is therefore to implement a nonlinear filter simulating this effect: assuming that the waves only travel in one direction, it can be represented simply a variable-length delay, for which the delay length depends on the pressure level (i.e. on the signal itself).
For more info the keywords are "weakly nonlinear acoustics".
Cheers!
Also note that the pressure waves radiated by the end of a small tube into outer air can be quite different from the waves traveling inside the tube due to the impedance mismatch. This may explain your need for a high-frequency boost.
This is actually a very interesting point and I'll definitely look into this. Thanks for sharing, really appreciate it!
The IN. BUFFER IN EVERY ENGINE IS CRAZY from 101.3 to 850.9!!
I'm in no way able to understand the maths exposed here, but the sound is fucking delicious! Awesome work mate.
Thanks for taking the time to break down these concepts; I imagine it requires a fair amount of work
What you've achieved in ingesting complex information, breaking that down into base principles and experimenting is very impressive. You deserve every success that comes from your methodology and so far the output speaks for itself
I look forward to going through the code and learning a thing or two
Jesus Christ, I think you've created something incredible here. Amazing work ! and thanks for sharing it with the world.
OH! I just noticed my name in the credits! WOW! Also I'm definitely pre-ordering fridge simulator!!
Now this is the sort of programming I like
I am a "expert in fluid dynamics" (In "" because I work with chemical reactions mostly) and I'd say it's pretty spot on what you did (for this use case of course). About the white noise thing, It's true there is some white noise irl but I IMAGINE it doesn't come directly from the turbulence, but from the interaction of the air molecules with the inperfect surfaces inside the engine, ie friction, probably most of it coming from parts like the manifolds flanges. The turbulence of course plays a role in it but it's not the full reason, but the way you implemented it does the job just fine, I also imagine simulating that would be a pain in the butt.
Hi, this is a comment complaining about the use of imperial units in your videos!
Can we all appreciate how the background for this program and the video is in dark mode? A lot of youtubers seem to not care about our nightly eyesight
are you kidding me? this is incredible. Holy ... :O I am in awe and in love, this is something I would love to do. I have to get to reading, hope I've got the time!
FLUID simulation. For ENGINE audio.
You are out of this world, holy crap
People don't realize how much of every single game, simulation and graphics implementation is total smoke & mirrors. Having to add so many disclaimers about your product feels extremely silly to me as an engineer who has written a ton of game, graphics and simulation code and knows how much total made up nonsense there is behind the curtains. In fact, this is one of the most accurate and impressive implementations I've ever seen. It's not perfect, but it's way ahead of the curve and amazing for a real-time application. Thanks for sharing this so kindly and candidly, and especially for giving the code away for free for everyone to learn from and help improve!
Also.. it's just damn beautiful. Love the style!
this is awesome for any high speed dsp stuff; amazing work
This project is awesome, I really appreciate your work on this!
Way to go man, definitely deserves recognition.
This is an amazing physics simulation! I did not expect this hater comments from "experts" you appear to have gotten.
Given I am an electrical engineer so it is not my expertise, still, it is impressive both on the physics side of things as for the programming aspect.
First time seeing this and its absolutely fascinating, great job :)
This is insanely interesting. I am so glad I’ve found your channel
Regarding the peculiarities of the sound of pipes and valves, you can read about the study of the simulation of wind instruments and organs. For example organteq does a good job of simulating the sound of organ pipes. An organ has pipes and valves. There is a lot of research that the creators of organteq rely on. There, the features of the movement of the air flow in the center of the flow and near the walls of the pipes are studied. The swirls on the valves are also investigated. And how it should sound. You may be able to find some additional information there to refine your simulation.
Super impressive! This video must have taken ages to put together!
This is awesome work and you know it ! Don't pay attention to those "experts" that never contributed to anything useful in their lives ;) I'm hyped to see the version 2 !