mdolab / adflow

ADflow is a finite volume RANS solver tailored for gradient-based aerodynamic design optimization.
Other
230 stars 100 forks source link

Zipper mesh bug #4

Open anilyil opened 5 years ago

anilyil commented 5 years ago

Fix the bug causing the gradients to be off when using zipper meshes.

anilyil commented 5 years ago

See the branch anilyil:zipper_fix for the changes.

anilyil commented 5 years ago

A pdf file detailing the efforts can be found here: 2019-03-12_zipper_debug.pdf

shamsheersc19 commented 4 years ago

@anilyil Any updates on this?

anilyil commented 4 years ago

Not yet, I would say once we have complex ANK working (issue #55), we can tackle this bug again. From where we left off, we think the bug is mostly solved, but we may have other bugs remaining in the zipper code.

sseraj commented 3 years ago

Now that #130 is merged, maybe we can fully resolve this bug. What's left to do here @anilyil? I can help with this.

Also mentioning #12 for easier reference.

anilyil commented 3 years ago

So last we left off is we think we fixed "a" bug that came up when there were multiple zipper meshes in a case, and I think Gaetan also understood why the bug was there and how the fix was fixing it etc. There may be other issues remaining in the code, but I haven't ran into many. One thing I have been seeing with zipper meshes is the fact that some adjoints consistently stall very early on, and I think Sandy mentioned at some point that they were related to the RHS (the zipper computations dont change the partial R / partial state matrix). Maybe we can look into why GMRES is stalling out like that; whether its a numerical accuracy issue or there is something we need to fix with the linear solvers.

I don't think this is a priority and I think efforts are better spent towards the overset/collar mesh tutorials since that know-how is rare in the lab these days.

If you do want to work on this, I think we can come up with a simpler test case like @joanibal has been doing for his stuff to debug any remaining issues. I think one of the issues with the previous tests is that the zipper mesh ends up being so small compared to the rest of the mesh, the inaccuracy due to the bugs get lost in the mix. We can possibly create an overset mesh that results in a significantly larger zipper mesh area. Then we can use complex solvers to fully converge the complex parts (and now we know how they work better too), and we can be more confident about the accuracy of the comparisons etc. Let me know what you think.

sseraj commented 3 years ago

Thanks for the added info. That sounds like a good plan. I'll prioritize the overset/collar mesh tutorials and then come back to this afterwards.