<div>Hi,</div>
<div> </div>
<div>I have tested my code again, using the checks suggested by Barry. Using KSPGetConvergedReason shows that it has converged. Changing the tol from 1.e-5 to -6 or -7 or even -4 eliminated the explosion of value at that particular time step.
</div>
<div> </div>
<div> </div>
<div>However, that is expected since the values are now different. Moreover, for other linear solver package, it does not happen at this particular time step as well.</div>
<div> </div>
<div>Another strange thing is that suppose the explosion of value happen at t=50. If I store my all my relevent values at t=40 into files and restart my simulation from t=40(instead of t=1) by reading the stored values from the files, the explosion will now not happen at t=50. Hence it seems very random too....
<br> </div><br><br>
<div><span class="gmail_quote">On 12/7/06, <b class="gmail_sendername">Barry Smith</b> <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>Ben,<br><br> First make sure that the residual has actually gotten<br>to the tolerance you want. PETSc KSP does NOT stop if the
<br>linear system has not converged; you should call KSPGetConvergedReason()<br>after each solve to make sure it has converged (as a quick check<br>you can run with -ksp_converged_reason.)<br><br>Next try decreasing the KSP tolerance factor a great deal. Does
<br>1) the solution you get for your physics problem look the same for small<br> time (after a few time-steps they will start to drift).<br>2) the residual blow up at the same time, or later?<br><br> Barry<br><br><br>On Thu, 7 Dec 2006, Ben Tay wrote:
<br><br>> Hi,<br>><br>> I have been using a few different Krylov linear solver package such as<br>> nspcg,sparsekit and now petsc to solve the linear eqns for my NS solver<br>> momentum and poisson eqn. For moving bodies simulation, while solving the
<br>> poisson eqn, sometimes the result suddenly changes drastically, although the<br>> iterations seems to have converged e.g. at the previous time step,<br>> everything is fine, but at the next time step, the velocity suddenly
<br>> explodes from 2-3 to 20-30+.<br>><br>> The strange thing is that this deviation happens at different time step for<br>> different linear solver package ie for nspcg, it happens at time=20 but for<br>> petsc, it happens at time=40. It seems "random" in this sense. Changing the
<br>> type of solver such as gmres or bcgs does not change the time of deviation.<br>><br>> Does anyone know why this is happening? Is it a characteristic of krylov<br>> solver to happen once in a while? It does not happen in the stationary body
<br>> simulation though.<br>><br><br></blockquote></div><br>