r/CFD • u/DavideOsas • 7d ago
I don't understand what I'm doing wrong
1 - wrong convergence repeating itself for the longest time on many attempts
2 - I don't recall having changed anything apart from the mesh and it converged in a far more acceptable way
3 - working mesh is not very thick
4 - happy that - for some reason - now the model DID converge properly, I've cranked up the mesh up to 196 000 and for some reason the flow changed again
5 - This is the new mesh, with levels 1, 2 and 3 around points of interest to me
I have troubles so I will add short context and then jump to what I've done.
I've only received 6 hours of explaination on CFD as a fraction of a broader more theory-oriented class on environmental fluid mechanics. This isn't criticism, I'm happy for this little project because from a zero experience standpoint this is amazing to me; still, I have to make a report on the project and I wanted it to be as good as possible.
What I've done different from the lesson is making the mesh much thicker around the buildings, because I was recently invited to make the simulation larger than it originally was, so that the atmosphere could behave better. Apparently, building to mesh dimension-ratio matters, so I've made it much taller and longer.
I've run into the following issues; the numbers refer to the images:
- For the longest time and for many attempts, what usually happens is that I get a solution but it's obviously wrong: basically the atmosphere is impacting the building but the lower portion is stuck recirculating in the bottom while the upper side speeds up in proximity to the roofs. I do recall this: while these ("wrong") simulations where running - I couldn't see Uy residual appearing on the graph. That was my indicator that I was taking the wrong turn.
- I swear to God I don't recall ever changing anything about the boundary conditions. At a certain point, while fiddling with the meshes, I saw Uy appear as a residual. After letting the calculation converge the result was what's shown. I have reason to believe this is also wrong: even tho it would feel correct to have the flow come down to the ground, since no gravity is involved in this how would that happen in the simulation? (I feel very stupid for this because it feels both right and wrong in my head).
- Image shows the first working(-ish) mesh since everything I had tried before this one was resulting in either errors (and I would change boundary conditions) or improper flows similar to picture 1.
- Since the mesh had worked I chose to finally try to make it as thick as simflow would allow. I've used 196 000 of 200 000 nodes, refining the mesh around details I assumed more important. THE RESULT CHANGED AGAIN? What's crazy to me is that now it feels even more correct than before, because in class, with a much smaller and less refined mesh, it looked exactly like this, and it was done by a professor.
- Last image is the final mesh and that which I will be using for a bunch of other tests that will be the basis for my report.
So the concluding issue is this: I have no experience to understand and be perfectly in control of the simulation, and that is both frutstrating and scary. Frustrating, because they run on a 2015 i7 that takes a lot of time both making iterations for more refined meshes AND solving the model on them. "Scary", because the first time it properly converged (picture 2) IT ACTUALLY FELT RIGHT, Before I would discover that a following attempt would look even more correct.
Navigating the internet I've discovered that there's a whole new subject around mesh analysis that I didn't know about. I can't go too deep into all of these, for I'm taking 5 classes this semester, but to make a good report I feel underequipped.
Let me know what you think. I'm really scared the issue might be in front of my eyes.
7
u/foxbat_s 7d ago
Do you know how a correct solution is supposed to look like ? Do you know the solution has converged? Have you checked the residuals ?
It would be worth running a benchmark case for buildings (idk which one as I do aerospace cfd) and check if your meshing strategy and simulation setup is correct and then apply it for your case. Add this benchmark to your report it will give more credibility to your cfd conclusions
6
u/TheodorH999 7d ago
As a Prof once told me, before trying to solve "a" problem, make sure you're very clear on what you exactly want to find out/uncover. Break down the overarching problem into sub problems and don't try to leap towards the end result to quickly. While inflation layers, numerical approaches and residuals are all fine to think about, setup the most simplified version of your problem first and then slowly make your way to the final sim. As far as I can tell you don't specify clearly what you want to solve for. Is it pollutant deposition/diffusion that you are interested in? What are the ambient conditions of your domain (wind velocities) and is a 2D study good enough for a first fundamental understanding of the software you're using. Are you interested in wake dynamics? After you have settled those questions think about boundary conditions first. Your domain is rectangular so a crude approximation is a pipe flow. You said yourself that you made the domain larger at the top, what changes because of that and are your expectations met? Is a different boundary condition necessary maybe?
3
u/CrocMundi 7d ago
Your mesh may not have adequate refinement in several aspects depending on the sorts of results you need to get out of your simulation runs and the level of accuracy you need.
This is just general advice though coming from someone who does primarily aerospace and hydrodynamic CFD work, so be sure to check with your advisor as u/Matteo_ElCartel already recommended.
Good luck!
2
u/Weary-Crow-3774 7d ago
Schrap corners are always dificut since real solutions are not steady state some solvers wil become unstable or try to mask the problem
0
u/Matteo_ElCartel 7d ago edited 7d ago
Talk to your advisor