r/CFD • • 5h ago

Me seeing my simulations 1st iteration being worse than the previous simulation

Post image
7 Upvotes

r/CFD • • 8h ago

Deterministic simulation testing from distributed systems: does it have a place in CFD solver development?

3 Upvotes

Okay so I’m still pretty new to the solver side of CFD, but I came across this article and it kind of blew my mind: https://martinfowler.com/articles/deterministic-simulation-testing.html

It’s actually about distributed systems, not CFD at all, but the idea is that you make your program run exactly the same way every single time, down to the last bit. So if a bug shows up once, you can replay it perfectly and step through it instead of crossing your fingers that it happens again.

What got me thinking was learning that floating-point addition isn’t associative?? Like (a + b) + c can give a slightly different answer than a + (b + c). I had no idea. And apparently in parallel solvers the order things get added up can change from run to run depending on which threads or processes finish first. So in theory the exact same case could give you slightly different residuals each time you run it. That’s wild to me.

From what I understand, getting rid of that would mean forcing the additions to always happen in the same order, seeding anything random, and avoiding compiler optimizations that reorder math. Which I’m guessing makes things slower?

So I have a bunch of questions for people who actually write solvers:

  • Is this something you actually run into in practice, or is it mostly a theoretical thing?
  • Does anyone go out of their way to make their runs bit-for-bit reproducible, or is “close enough” fine?
  • If results change depending on the order of additions, does that mean something’s wrong with the setup itself?

Sorry if these are dumb questions, just found this really interesting and wanted to hear from people who know way more than me!


r/CFD • • 2h ago

hi guys, need help enhancing quality

Thumbnail reddit.com
2 Upvotes

r/CFD • • 20h ago

How would i model a radiator for a car assembley so it would not need 128gb of ram to run accuratley?

1 Upvotes

I do not need to model heat transfer though it would be useful. I am planning on designing a fully custom body for a project car and i need to reduce the drag from cooling. I can probably approximate cooling ability by measuring mass flow rate.

The Cd would not be accurate if i do not include one.

My pc only has 16gb of ram and i missed my opprotunity to upgrade back in 2023 when i got it.

I have the choice between solidworks flow sim (most experience using but not as accurate) and ansys (hardly any experience but is accurate) i dont know which uses ram more efficiently, but i do know that solideorks flow sim numbers are useless in assembley files and crashed when i tried to run the formula student car as one part file.

My only hope with this project is that making the entire project myself eliminates all the jank associated with the formula team files