dolfinx-tutorial icon indicating copy to clipboard operation
dolfinx-tutorial copied to clipboard

Corrections on the N-S code

Open QLRO opened this issue 2 years ago • 5 comments

Dear Dokken,

Thank you for writing this excellent tutorial!

I would like to point out a few minor mistakes in your implementation. In particular, density rho is missing in several places. While this does not affect the results in your example since you have set rho=1, it may cause problems in general case.

I made the quick edits using github web interface. The same issue exists in the other N-S example too (also the theory part and the py files). I apologize for not having enough time to change them all locally.

P. S. For the DFG 2D-3 benchmark, I have not been not able to reproduce the entire 8s results by either simply increasing to 12800 steps over 8s or with lower dt (currently trying 1/3200). Have you been able to reproduce the entire 8s results? If yes, what settings did you use?

Best,

QLRO avatar Sep 09 '22 10:09 QLRO

I have some free time this weekend. I am happy to help you make the edits if it is ok.

QLRO avatar Sep 09 '22 11:09 QLRO

@QLRO I observe that there are some stability issues after ~3.7 seconds. This is probably down to the mesh being to coarse (as the mesh depends on gmsh and its version, it might have slightly changed in the last two years). I will push a fix for this.

Some general comments to your PR:

  1. Make sure that it is consistent everywhere.
  2. Use jupytext to also update the .py file in the repo (this should happen automatically).

jorgensd avatar Sep 09 '22 12:09 jorgensd

I think that's everything I can find. Please have a look at the changes and let me know if I missed anything. Thanks!

QLRO avatar Sep 10 '22 09:09 QLRO

Stability of the method has been improved in: https://github.com/jorgensd/dolfinx-tutorial/pull/99

jorgensd avatar Sep 10 '22 14:09 jorgensd

Dear Dokken,

Great! Thank you for your hard work!

I have updated both the notebook and the py file of the benchmark example to your improved code. Please see if there are any issues.

Best,

QLRO avatar Sep 10 '22 15:09 QLRO