Error happens when setting ns. init_iter = 0 in the 2D lid_driven case.
ruohai0925 opened this issue · 4 comments
Hello all,
Like the title, if the initialization process for setting pressure is ignored in lid_driven case, error happens:
"0::Assertion `old_data != 0' failed, file "../../../amrex/Src/Amr/AMReX_StateData.H", line 234 !!!
0::SIGABRT !!!"
It seems that a state data is not filled. Maybe better to specify init_iter should be larger than 0.
Some further questions: is the multilevel initialization process really necessary and important? What if one just set old and new pressure as 0 and let the codes run. Maybe the initialization process will reduce the convergence time for level and composite solvers, but I am not sure.
Jordan
Seems like an easy-to-fix bug. If you think think initial iterations don't do anything important (and the bug is fixed), you can easily confirm :) Generally, you could generate an impulsive start to the flow if the pressure gradient suddenly shows up during the first step. It is not often the case that this is what you would want, as the initial flow would not satisfy any reasonable initial condition that satisfies the equations for incompressible flow. Certainly, it would have bad convergence properties. That said, you may want this anyway...thus, the switch, which we ought to fix.
I can reproduce, BTW. Looking into it...
I pushed a simple fix to the development
branch for this. Please re-open if the fix breaks anything else. Thanks for reporting!
Got it! I prefer to use the initialization while writing the codes.
Thanks for your explanation.