code-saturne / code_saturne

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

Issue with restart #48

Closed rfj82982 closed 4 years ago

rfj82982 commented 4 years ago

I have found a couple of issues with restarting a simulations that might be related (this why the single post). The two issues are:

  1. Inconsistency of the velocity field when restarting a simulation with a different turbulence model. The problem occurs when switching from LES Smagorinsky to Dynamic and vice-versa;
  2. Inconsistent pressure field in the first iteration after restart.

For the 1st issue here the logs:

   field                  minimum         maximum        set mean    spatial mean
-  --------------  --------------  --------------  --------------  --------------
v  Velocity[X]           -0.66583          1.3167         0.90516          1.0001
v  Velocity[Y]           -0.66219         0.66219     -1.6971e-08      4.3483e-11
v  Velocity[Z]        -1.5525e-09      1.0827e-09      6.6371e-12      1.3426e-14
v  Pressure              -0.48921         0.54451       -0.042022       0.0017844
v  Temperature                300          448.51          309.54          300.04
** VARIABLES INITIALIZATION
    ------------------------

 -----------------------------------------
  Variable          Min. value  Max. value
 -----------------------------------------                   
  Velocity         -0.6213E+00  0.1385E+01
  Velocity         -0.5745E+00  0.3782E+01
  Velocity         -0.3153E+01  0.2419E+00
  Pressure         -0.4892E+00  0.5445E+00
  Temperature       0.3000E+03  0.4485E+03

As you can see the velocity is clearly wrong particularly in the Z direction. Whereas pressure and Temperature seems OK. However, here comes the second issue which is quite clear for the following pictures (in this case the restart is without any change):

At the second iteration after the restart the pressure field return to the correct state (i.e. like the one without restart) as in the picture below. However this can be just a happy coincidence.

ErrorRestart_Pressure_T+2

The release commit is 68d99b804d44290373227c2b4eb85336542e6404.

Thanks for your help

Stefano

YvanFournier commented 4 years ago

Hello Stefano,

Does the pressure issue occur also when not changing LES model ? Could you post the full restart log (at least until the end of iteration 1002) ? Since version 6.0 can also log/postprocess values before time stepping (i.e. just the values read), this may explain a part of the differences (but there may be a more complex issue also).

We will try to reproduce this in a standard test case.

rfj82982 commented 4 years ago

Hi Yvan the issue with the pressure occurs in a simple restart without changing anything between the two simulations. Here in attachment the logs files (both setup and ron_solver.log) for 3 cases:

  1. Full simulations without restart and 1010 iterations (named 01FullCasewith1010its);
  2. Initial simulation with 1000 iterations (named 01InitCasewith1000its)
  3. Restart simulations from (2) doing 10 iterations and completing the full period with a total of 1010 iterations (named 02RestartCasewith1010its)

LogFilesRestartWithSameModel.tar.gz

The archive with the full simulations is about 75 MB (with also the mesh). Do you want me to send it?

Thanks

Stefano

YvanFournier commented 4 years ago

Hello,

No, given the large size of the full archive, we'll try to reproduce it on our side and avoid the file transfer.

Thanks

erwanlecoupanec commented 4 years ago

Hello,

For the issue with the pressure, can you send an archive of the data settings, so that we can rerun it. I didn't reproduce the bug for now on a simple bundle case.

Thanks for the report

rfj82982 commented 4 years ago

Hi Erwan thanks for the update and sorry for the delay. I had been away and only today i manage to test again the problem. I have updated my repository and i did the test with commit 0ec10500b84cfd1fe8d87e2cf398818ec9ee58f6. Yes the problem with the restart using a different model has been solved as you can see below

However, the problem with the pressure at restart is still there with the first time step. This problem occurs no matter what is the turbulence model of the restart. I'll send you a link where to download the case.

Thanks for your help

Stefano

erwanlecoupanec commented 4 years ago

Hello Stefano,

I took a second look at your logs that you provided above for the pressure jump issue that you encounter. Apparently you have disabled the writing / reading of the auxiliary restart file, and this might (actually 100% sure, since mass fluxes are stored in this auxiliary restart file) provoke a non completely smooth restart (and you have a warning in the run_solver.log saying so). The solver has to recompute mass fluxes in your case, therefore the pressure step is not the same in the restart and in the original full run.

Disabling this option in the GUI (it is enabled by default) can happen. Could you retry your test with this option enabled (ileaux=1 if no GUI) ?

Thanks, Erwan

YvanFournier commented 4 years ago

Activating ileaux = 1 (use auxiliary restart file) solves the issue (so the second part of this issue was awrong alert).