Difference between revisions of "HPC Adaptive Timestepping"
Chris Huxley (talk | contribs) |
|||
Line 44: | Line 44: | ||
=HPC 1D Timesteping= | =HPC 1D Timesteping= | ||
HPC links with the 1D solver, ESTRY. When run with HPC (instead of Classic) ESTRY has been reconfigured to automatically act as an adaptive/varying timestep solution, and can step at different multiples of steps to the HPC 2D solver. Both 1D and 2D solutions are always synchronising at the 2D target timestep, or a multiple of the 2D target timestep if the 1D timestep is sufficiently greater for the 2D to perform more than one step. If the 1D limiting timestep is less than half the 2D target timestep, the 1D proceeds in two or more steps eventually synchronising with the 2D timestep. Where there is not a one to one synchronisation of the 1D and 2D timesteps, a usually negligible mass error may occur and can be checked by reviewing the CME% values shown on the Console Window, the .tlf file or the _MB.csv file in the same manner as Classic. | HPC links with the 1D solver, ESTRY. When run with HPC (instead of Classic) ESTRY has been reconfigured to automatically act as an adaptive/varying timestep solution, and can step at different multiples of steps to the HPC 2D solver. Both 1D and 2D solutions are always synchronising at the 2D target timestep, or a multiple of the 2D target timestep if the 1D timestep is sufficiently greater for the 2D to perform more than one step. If the 1D limiting timestep is less than half the 2D target timestep, the 1D proceeds in two or more steps eventually synchronising with the 2D timestep. Where there is not a one to one synchronisation of the 1D and 2D timesteps, a usually negligible mass error may occur and can be checked by reviewing the CME% values shown on the Console Window, the .tlf file or the _MB.csv file in the same manner as Classic. | ||
− | The ESTRY 1D <font color="blue"><tt>Timestep </tt></font> for a HPC 1D/2D linked model is the maximum limiting timestep the 1D solver can use. | + | The ESTRY 1D <font color="blue"><tt>Timestep </tt></font> for a HPC 1D/2D linked model is the maximum limiting timestep the 1D solver can use.<br> |
+ | [[File:1d2ddt.png|800px]] |
Revision as of 08:53, 29 October 2019
Introduction
The HPC solver, by default, uses adaptive timestepping to progress through the simulation. The timestep is adjusted so that it complies with the mathematical stability criteria of a 2D SWE explicit solution. In contrast, TUFLOW Classic, being an implicit solution, is not numerically bound by these criteria, and can progress through the simulation using a fixed timestep. Due to the underlying solution scheme, HPC typically uses a smaller timestep than Classic. the following sections outline how TUFLOW HPC automatically selects its adaptive timestep.
HPC 2D Timestep
TUFLOW HPC uses adaptive timestepping to maintain stability. There are three primary processes that determine the maximum timestep that an explicit solution to the Shallow Water Equations can use:
- Courant Number, Nu
- Wave Celerity Number, Nc
- Diffusion Number, Nd
The method TUFLOW HPC uses to calculate a timestep and achieve unconditional stability is as follows:
- The Timestep command included in the TUFLOW Control File (TCF) is only used for the first calculation timestep. The specified value should be consistent with what would be appropriate for a TUFLOW Classic model (i.e. 1/2 to 1/5 the 2D cell size). Internally, TUFLOW HPC divides this value by 10 to apply a value that is suitable for an explicit solution scheme. All subsequent calculations are completed using the adaptive timestep approach outlined in the following bulletpoints.
- The HPC timestep is calculated using the hydraulic conditions from the end of the previous timestep.
- If the hydraulic conditions have changed significantly it is possible for one or more of the Nu, Nc, Nd control number criteria to be violated at one or more locations within the model. For example, a sudden change in rainfall from one timestep to the next (which occurs with stepped rainfall boundaries) would potentially cause a violation. The HPC solver, by default, treats a 20% exceedance of a control number as a violation and will implement a repeat timestep feature. HPC uses a repeat timestep feature to maintain unconditional stability. The repeat timestep feature involves retaining the complete hydraulic solution from the previous (good) timestep. Should a control number anywhere within the model be exceeded by more than 20%, the solution reverts to the retained timestep, the timestep is reduced and then repeated.
- Each timestep is also tested for the occurrence of NaNs. A NaN is “Not a Number” and occurs due to undefined mathematical calculations such as a divide by zero or square root of a negative number. The occurrence of a NaN is also indicative of a sudden instability. Should a NaN occur, the repeat timestep feature is implemented.
- Should a timestep need to be repeated more than ten times consecutively, the solution stops.
- The simulation will also stop if the default minimum permissible timestep of 0.1 seconds has been reached. This value can be manually adjusted using Timestep Minimum.
Repeated timesteps are displayed to the Console Window and the number of them for a time interval are provided in the nRS_NaNs and nRS_HCNs columns in the _HPC.csv file output in the results folder. They are also reported to the _messages layer.
Repeated timesteps are an indication the 2D HPC solution is numerically “on-the-edge”. Models that have a high number of repeated timesteps should be sensitivity tested by reducing the control number limits using Control Number Factor. For example, repeat the simulation using Control Number Factor== 0.8 and compare the results. If there are acceptably immeasurable changes in the results, then running at the default control number limits can be considered satisfactory.
NOTE: Models that require an excessively small 2D timestep to remain stable are symptomatic of models with input topography or boundary condition errors. Please refer to [Tutorial_Module03 | Tutorial Module 03] for discussion on this topic.
HPC 1D Timesteping
HPC links with the 1D solver, ESTRY. When run with HPC (instead of Classic) ESTRY has been reconfigured to automatically act as an adaptive/varying timestep solution, and can step at different multiples of steps to the HPC 2D solver. Both 1D and 2D solutions are always synchronising at the 2D target timestep, or a multiple of the 2D target timestep if the 1D timestep is sufficiently greater for the 2D to perform more than one step. If the 1D limiting timestep is less than half the 2D target timestep, the 1D proceeds in two or more steps eventually synchronising with the 2D timestep. Where there is not a one to one synchronisation of the 1D and 2D timesteps, a usually negligible mass error may occur and can be checked by reviewing the CME% values shown on the Console Window, the .tlf file or the _MB.csv file in the same manner as Classic.
The ESTRY 1D Timestep for a HPC 1D/2D linked model is the maximum limiting timestep the 1D solver can use.