Message 10045

TUFLOW FV
Available since version: 2026.2.0
ERROR 10045 - depth has gone negative at cell <2d_cell_id>

Description

During a depth update step, the net outward flux at a 2D cell would result in a negative water depth. Only the first cell where this occurs is reported. This indicates a numerical stability issue in which the outgoing flux exceeds the available water volume at that cell.

Suggestions

The simulation time at which the error occurs may help to diagnose the issue. If the error occurs early in the simulation or at initialisation, it is likely a model configuration, initial condition or boundary condition mismatch. If the error occurs later during the simulation and the model configuration appears correct, the region surrounding the offending 2D cell warrants further investigation for instabilities.

Common causes of instabilty include a timestep that is too large for the mesh resolution or flow conditions, very shallow cells with high velocities, poor mesh quality near the affected cell and abrupt changes in bed topography or boundary conditions.

While the error will be reported at the first cell that goes negative, the root case may originate from a different cell, typically close by. To track where instability begins, it may be useful to add a secondary output block with high temporal resolution at a time just prior to when the error occurs. For example, if the model crashes at 02/12/2008 21:15:36:

Output == NetCDF 
    Suffix == CHK                             ! For checking
    Output Parameters == h, v                 ! Water level, velocity
    Start Output == 02/12/2008 21:15:00       ! Time close to the error occurrence
    Final Output == 02/12/2008 21:17:00       ! Time immediately after the crash, mainly for safety so the model cannot continue writing high temporal resolution output ! CARE SHOULD BE EXERCISED TO AVOID LARGE FILE OUTPUT SIZE
    Output Interval == 1                      ! (s) High temporal resolution output to help track initial cell where instability starts and propagation
End Output

This block writes water level and velocity at 1 second intervals (0 will use the model timestep if higher temporal resolution is required) in a narrow window around the error. Stepping through the output in time allows identification of the initial cell where instability begins and its propagation path.

The command Write Restart At Time == can also be useful to start a follow-up run close to the time of the error.

If investigations do not uncover any model or mesh setup issues, the user can experiment with the CFL == and Timesteps Limit == commands. Refer to the computation timestep section of the TUFLOW FV User Manual for further guidance on timestep selection.