- 03 Dec 2024
- 7 Minutes to read
- Print
Improving model stability
- Updated on 03 Dec 2024
- 7 Minutes to read
- Print
One of the most commonly asked questions to our support team is what to do if a model displays instabilities and will not run. Following an instability, the error message may report that a section has run dry or the parameter Dflood has been exceeded - often the location is not where the problem actually lies! This is because the instability can oscillate up and down the channel before creating the model failure. What to do to stabilise your model can involve a multitude of techniques; a modeller needs to diagnose the problem and take steps to remedy it, whilst ensuring the model remains physically realistic to the site and appropriate to the scenario being modelled. Whilst by no means extensive, this article provides five tips and tricks for resolving instability issues within 1D river networks. Please see the user manual for more details on these methods and remain especially vigilant of the potential consequences any adjustments will have on your model.
- Be methodical when building your model
When building a new model, build your 1D network using cross-sections only, i.e. without any structures. Check the model runs successfully, and generates a good, stable set of initial conditions before adding structures. Similarly, add one structure at a time and check the model runs successfully before proceeding to the next. Simplifying your river network as much as possible, splitting it into smaller sections, and dealing with tributaries separately are all recommended. Once you have checked through each section of your model and corrected any issues causing instabilities, combine your model one section at a time. A spill unit should be used prior to the confluence in a tributary channel to adjust the bed elevation. Each time you join a section together, run your model again to ensure it will still run. When dealing with a complex model, controlling structures are essential, so try to simplify a series of structures where not all of them are needed by removing the ones that have no impact on the model results and are not in the area of interest
Figure 1: The initial conditions table in the ‘Network’ panel. A good set of initial conditions should be generated at each stage of the model build.
- Use the best data available
Using the best possible survey data is always important. Plotting a long-section of your river network can help reveal whether there are any errors in your cross section and structure data that could lead to instabilities. For example, if there are steep decreases in gradient over short distances that are not captured by a structure, then it may be that there is missing information in the survey data (i.e. a weir). Poor conveyance is another common cause of instabilities. This is particularly the case where there is a decrease in conveyance with an increase in stage. The cross section plotting tool gives the modeller a quick reference to check that conveyance increases monotonically and smoothly with stage. A decrease in conveyance as the water level goes out-of-bank may be rectified by adding a panel marker at bank level. After selecting your model nodes, the ‘Tabulate Cross Section Properties’ tool can also be used to show conveyance alongside other cross-section properties for a range of water levels, namely depth, area, top width and wetted perimeter. You can then plot the conveyance for multiple cross sections in one plot by selecting the ‘River section property plots’ tab and plotting conveyance on the X axis and stage on the Y axis.
Figure 2: The Flood Modeller ‘Tabulate Cross Section Property’ tool. This is located in the ‘Model Review Tools’ section of the Toolbox, alongside the ‘1D Health Check’ tool.
- Investigate
If your model becomes unstable and fails, there are many places you can look to help diagnose the source of the problem. The .zzd model log file will provide warning messages when a model has poor convergence and starts to become unstable. When this happens, the model will output a series of diagnostics that can be used to help find where your model is becoming unstable.
Time – the time of poor convergence
QRATIO – Maximum difference in discharge between iterations and location where this occurs
HRATIO – Maximum difference in stage between iterations and location where this occurs
MAX DQ – Maximum change in discharge between this and the last timestep and location where this occurs
MAX DH – Maximum change in stage between this and the last timestep and location where this occurs
The QRATIO and HRATIO are compared against the htol and qtol parameters to identify whether the change in discharge and stage between iterations satisfies the tolerances allowed. If the QRATIO and HRATIO values exceed the tolerance, then the location where this is reported will be a good place to start examining in further detail. [Note: The maximum DQ and DH outputs can be helpful too, however they are not themselves indicative of instability as there can be legitimate reasons why there would be large changes in flow and stage in successive timesteps.]. A good modelling practice is to run a ‘1D Model Health Check’ located in the Toolbox under ‘Model Review Tools’. This tool analyses your active river network and produces a report listing any potential problems found within the model that may lead to instabilities during simulations. The results are displayed in a new window and are helpful for highlighting areas where input data should be checked. Plotting stage, flow and the Froude number can also identify whether there are oscillations at particular locations which would indicate instability. It can also be helpful to rerun your model and save your output at much smaller intervals, for example at each timestep) to help identify the exact start of the instability. Comparing this start time to your input data might indicate the cause of the instability
Figure 3: A long section plot. Check-boxes allow for simple selection of the various parameters available for plotting.
- Do what you’re told! (by the error message)
The error message provides suggestions which can be tried immediately. If Dflood has been exceeded, increasing the value from the default of 3m may resolve instabilities to allow you to investigate further. After changing Dflood to allow a model to complete, use the results to improve the model, allowing Dflood to be reduced again in your final production model (a high Dflood value should not be a permanent solution). If the channel is running dry, try to overcome this by increasing the minimum flow. Low flows are often the cause of instabilities, particularly through steeper sections of your model. Alternative approaches to increasing the minimum flow include adding a dummy inflow upstream of the problematic area and then an abstraction downstream, allowing the flows to be increased locally only. Differences in bed levels can also be the cause of instabilities at low flow. For models including periods of low flows, it is recommended to add the 'Automated Preissmann Slot for River Sections'. This adds a triangular slot in the base of all river sections in the model to aid stability.
Figure 4: The 1D simulation window. Automated Preissmann slots are available on the ‘Options’ tab.
- Behind the scenes...
Think about what the instability message means mathematically - something is changing too suddenly. This could be because the space between consecutive sections is too large, there is a significant change in geometry, or due to steep channels. Where additional surveyed data is not available, it is often possible to overcome these issues by adding interpolates or replicates into your model. Running a model in the 1D steady state direct mode can help identify locations where interpolates or replicates are required. In the .zzd file, the text will identify the locations where the engine added extra sections to help find a solution and will provide a recommendation to the user of the location and number of additional sections to add. If the model identifies a location where there are a large number of additional sections required, then it is recommended to explore this part of the model in more detail to check for any errors in the data or missing survey information. Do not hesitate to lower your time step if you feel minimum time step is too large. If your model is particularly complex, it might be that the model requires additional iterations to allow it to find a stable solution. Note that we recommend that this is set to a prime number (as this will further aid stability). The alpha parameter is an under-relaxation parameter that determines the weighting of the result towards the previous iteration. A lower value uses more information from the previous iteration which can help the model reach a solution in some models. The theta parameter is a Preismann box weighting factor. A value of 1 gives a fully implicit numerical scheme. Reducing this parameter can also help to improve model instabilities. It is important to note that the user should explore other approaches to understand the cause of the instability before adjusting these parameters.
Figure 5: The ‘Advanced Parameters’ tab within the 1D simulation window. This tab is not shown by default and therefore must be selected in the ‘View’ > ‘Tabs’ menu.
We hope these tips and tricks help you further understand how to deal with instability within your models. Further details on dealing with instability, and all other error messages, are provided in the Flood Modeller user manual, or simply by pushing the F1 key from anywhere within the interface.