= Why is my HPC model getting unstable right at the beginning? And why are my control numbers lower than they could be? =
If there are no wet cells at the beginning of the simulation, the adaptive timestep can get quite big. There might possibly be some NaNs in the model as well. Once the flow increases rapidly, instabilities can develop, which leads to oscillations in variables that grow over time, eventually leading to NaNs in the solution. Two situations can occur:
* The solver can't reduce the big timestep to a sufficiently small timestep within the ten default trials, the simulation gets unstable which stopsand the model is stopped with an error.
* The solver is able to reduce the timestep to a sufficient timestep within the ten default trials and the simulation continues running. This however comes with a price of slower run time:
** If a wave celerity or courant control number exceed its target by up to 20% or diffusion number by 10%, the step is still accepted, but the next timestep is factored down by the same percentage.
** Currently if a control number exceed its target by up to 20%, the step is still accepted but the next timestep is factored down by the same percentage. If there are NaNs or control number exceeds its target by more than 20% or 10% respectively, the step is rejected, the timestep is cut to half, a repeat step is performed and the control number will be cut to 90% of the previous value. The control number is then allowed to increase only by 0.001% per timestep. It will take 10,000 timesteps to creep back up to the original value if there are no other reduced timesteps, keeping the model running slower than it could.
The below suggestions can be implemented to eliminate the instability and/or the decrease in control numbers:
* Specify initial water level for the whole model with <font color="blue"><tt>Set IWL"</tt></font> command or locally with <font color="blue"><tt>Read GIS IWL"</tt></font> command. The wet cells can limit the adaptive timestep through the [[HPC_Adaptive_Timestepping#HPC_2D_Timestep | Shallow Wave Celerity Number]], and prevent the HPC solver from using big timesteps.
* Use <font color="blue"><tt>Timestep Maximum"</tt></font> command to cap the maximum timestep to not get too high.
<br>
|