• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Flow
  3. Diverging simulation (Nan)

Stats

  • State Verified Answer
  • Replies 1
  • Subscribers 6
  • Views 4853
  • Members are here 0
More Content

Diverging simulation (Nan)

Colinda
Colinda over 3 years ago

My simulation is diverging: the residual plots go up in the monitor and the simulation ends with a Not-a-Number.

How to find the cause?

  • Cancel
  • Sign in to reply
Parents
  • Colinda
    +1 Colinda over 3 years ago

    Always verify after a simulation:
    • boundary conditions at inlet(s), outlet(s) and on solid walls
    • whether backflow exists at inlet(s)/outlet(s)
    • velocity vectors on relevant cut planes in the domain
    • Y+: in line with turbulence model ?
    • µt/µ: maximum value and within a cut
    • Cartesian plots perpendicular to walls: boundary layers well captured?
    • physics of flow solution close to stagnation points, separation areas and in wakes

    In case of divergence the cause could be:
    • Poor mesh quality: the mesh should not have negative, concave or twisted cells. Make sure the mesh quality is adequate (Show mesh quality statistic).
    • Incorrect boundary condition.
    • Unrealistic initial condition?
    • Inappropriate turbulence model (without wall functions Y+ <5 and at least 6 layers at y+ < 10).
    • Reduce the CFL number.
    Look also at quantities like pressure and temperature in the domain: minimum or maximum values may be quite unphysical. For example you might have temperatures locally as low as 100 K while the physics of the application don't explain such values.
    If the simulation diverged and gives NaN, it may not be possible anymore to look at it in the results analysis. In such case I run the simulation again but with a number of iterations such that the simulation will stop before the NaN.

    If the case is not diverging but not well converging either:
    • Unsteady flow features? The residual of a steady simulation will stop reducing after some time and show (periodic) oscillations. – It is very important to define probes at relevant locations (e.g. wake) to confirm the oscillations.
    • Too high expansion ratios in the boundary layer can lead to force oscillations, reduced stability and inaccuracy. – Check that the expansion ratio in the boundary layer is below 1.2.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
Reply
  • Colinda
    +1 Colinda over 3 years ago

    Always verify after a simulation:
    • boundary conditions at inlet(s), outlet(s) and on solid walls
    • whether backflow exists at inlet(s)/outlet(s)
    • velocity vectors on relevant cut planes in the domain
    • Y+: in line with turbulence model ?
    • µt/µ: maximum value and within a cut
    • Cartesian plots perpendicular to walls: boundary layers well captured?
    • physics of flow solution close to stagnation points, separation areas and in wakes

    In case of divergence the cause could be:
    • Poor mesh quality: the mesh should not have negative, concave or twisted cells. Make sure the mesh quality is adequate (Show mesh quality statistic).
    • Incorrect boundary condition.
    • Unrealistic initial condition?
    • Inappropriate turbulence model (without wall functions Y+ <5 and at least 6 layers at y+ < 10).
    • Reduce the CFL number.
    Look also at quantities like pressure and temperature in the domain: minimum or maximum values may be quite unphysical. For example you might have temperatures locally as low as 100 K while the physics of the application don't explain such values.
    If the simulation diverged and gives NaN, it may not be possible anymore to look at it in the results analysis. In such case I run the simulation again but with a number of iterations such that the simulation will stop before the NaN.

    If the case is not diverging but not well converging either:
    • Unsteady flow features? The residual of a steady simulation will stop reducing after some time and show (periodic) oscillations. – It is very important to define probes at relevant locations (e.g. wake) to confirm the oscillations.
    • Too high expansion ratios in the boundary layer can lead to force oscillations, reduced stability and inaccuracy. – Check that the expansion ratio in the boundary layer is below 1.2.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
Children
No Data
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information