pecos-hybrid / SU2

SU2 Suite
http://su2.stanford.edu
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Linear solver fails to solve turbulence equations with SMR91 #18

Closed clarkpede closed 6 years ago

clarkpede commented 6 years ago

While I've fixed the problems with the EDIRK LIMEX timestepping routine, I don't know what's going wrong with the SMR91 timestepping scheme.

I've created a test case that can be used to reproduce the error. It's a 2D channel flow, with v2-f. The restart file is a converged steady state field. Timestepping works for Euler implicit or RK LIMEX EDIRK schemes, but not for SMR91.

Additionally, Valgrind is complaining about the use of unitialized values when using the SMR91 timestepping, but not when using any other timestepping. This points to a larger problem, rather than just an ill-posed linear system. The unitialized values are somewhere in the CNSVariable objects in the CVariable** node data structure of the CNSSolver object. Because of how Valgrind tracks unitialized values, Valgrind only complains about them in the linear solver for the turbulence solve. But that doesn't mean that that is where the unitialized values should have been set. I'm attaching the Valgrind log, if you care to see it. Personally, I don't find Valgrind logs particularly useful for tracking down unitialized values.

I'm currently working off a new branch, pecos-rk-fixes.

Steps to reproduce / test case

  1. Put the grid, the restart file (interp_00000.dat) and the cfg file in the same directory.
  2. Run SU2_CFD timestepping.cfg (no need for parallel execution).
  3. The linear solver should fail to converge on the first timestep.
  4. Switch the TIME_DISCRE_FLOW option in timestepping.cfg to EULER_IMPLICIT or RUNGE-KUTTA_LIMEX_EDIRK.
  5. Run SU2_CFD timestepping.cfg again. This time, the linear solver should converge.

Let me know if you have any problems reproducing the error.

valgrind.log SMR91.tar.gz

trevilo commented 6 years ago

The behavior is caused by not properly setting nRKStep. Should be resolved by 45fc7e0.

clarkpede commented 6 years ago

I just confirmed the fix. Thanks!