code-saturne / code_saturne

code_saturne public mirror
https://www.code-saturne.org
GNU General Public License v2.0
223 stars 82 forks source link

Calculation of wall_dist does not converge on first time steps (even after a restart) (Code_Saturne 5.1.4) #2

Closed RomainCamy closed 5 years ago

RomainCamy commented 6 years ago

On a 225M cells grid with no quality problem according to the listing, the ~25 first time steps show the warning message that the calculation of wall_dist does not converge. After the message disappears and will only reappear at the beginning of the next restart. listing.txt

MartinFerrand commented 6 years ago

Has discussed, commit 15713e4 rewrite the dimensionless wall distance as a field, so that we can easily change some options. We have to change the default option of solving as well. A rewrite of the convective flux also may help in term of robustness

RomainCamy commented 6 years ago

OK. The commits 15713e4 and more recents {cc82934, 36bf24f, 65761f1} limit the calculation time but still the max number of iteration is reached and overall the calculation time is bigger on my test case by a factor ~1.5 (for each complete time step) compared to a simple modification of epsilo = 1.e-5. This is unexpected, isn't it ? listing-with-lasts-commits.txt listing-with-epsilo-1e-5.txt

YvanFournier commented 5 years ago

Since this distance only has a significant effect close to the wall, solving to a high precision is probably not important here. We just need an approximate value, so we could probably reduce the required precision to 10-3 or even 10-2.

As the equation solved is a pure convection equation, in this case it would make sense to initialize the distance with a "far-wall" value, so even with only a few iterations (which should propagate information from the boundaries inwards using Jacobi or Gauss-Seidel), the obtained distance is good enough for its use in the turbulence model.

MartinFerrand commented 5 years ago

Commit adbfdba changes the way the dimensionless wall distance is computed in LES (iturb=40). The steady equation is solved once (no need of over iterations). In case of restart, do not start with a big value. By default now, the linear solver precision is 1.d-5 now.

MartinFerrand commented 5 years ago

Commit 2f2bad8 fix the last issue concerning cells with exactly zero on the diagonal (cells "in the center" of the domain). The gain in term of CPU has been drastically improved.