Stop on Convergence
    • 29 Jul 2022
    • 2 Minutes to read

    Stop on Convergence


    Article summary

    The Stop on Convergence feature (included starting with version 3.6) is designed to reduce computation time when modelling pseudo steady-state models with boundary values that are fixed with respect to time.

    When performing a pseudo steady-state simulation, boundary conditions remain constant and the model will be simulated until the flow into the model equals the flow out of the model and the model volume remains steady.

    The Stop on Convergence feature allows the user to specify one or more convergence criteria and run the model with no fixed end time. This causes 2D solver to run the simulation until it has reached a pseudo steady-state condition at which point it gracefully exits the simulation.

    This option is enabled by adding the stop_on_convergence tag to the advanced_options tag as illustrated in the code snippet below.

    The Stop on Convergence option works as follows:

    The 2D solver will determine the domain volume at both t = now and at t = now - window_size at regular intervals where window_size is a user definable parameter. A volume difference is then calculated as follows:

    VolDiff = ABS( VolAtTNow - VolAtTMinusWindowSize )

    A volume difference tolerance is then calculated:

    VolTolerance = ABS( 0.01 * ConvergencePercentageTolerance * VolAtTNow )

    If VolDiff < VolTolerance then the model is deemed to have reached a pseudo steady-state and 2D solver will write out a set of results before exiting with a return value of 100 (successful completion).

    The volume is polled over a period of 18 minutes at three-minute intervals for each check. These values are hard-coded and cannot currently be changed by the user.

    Example:
    ...

    <advanced_options>

            ...

            <spatial_diagnostics>on</spatial_diagnostics>

            <correct_negative_depths/>

            <stop_on_convergence fail_on_non_convergence="true">

                   <volume_comparison_percentage>0.1</volume_comparison_percentage>

                    <total_inflow_comparison_percentage>0.1</total_inflow_comparison_percentage>

                    <smallest_inflow_comparison_percentage>0.1</smallest_inflow_comparison_percentage>

                    <minimum_run_time unit="minute">60</minimum_run_time>

                    <window_size unit="minutes">30</window_size>

            </stop_on_convergence>

    </advanced_options>

    ...

    XML file definition:

    The optional volume_comparison_percentage element specifies the percentage tolerance used to determine the volume tolerance described above. A typical value would be 0.1%.

    Alternatively, or additionally, the volume difference may be compared against the current hourly inflow rate by specifying a value for the total_inflow_comparison_percentage. In this case, the VolAtTNow term is replaced by the current boundary inflow (in m/hr) in the expression about for VolTolerance.

    Alternatively, or additionally, the volume difference may also be compared against the smallest peak inflow rate, over all inflow boundaries, by specifying a value for smallest_inflow_comparison_percentage. In this case, the VolAtTNow term is replaced by the minimum peak flow of all inflow boundaries (in m/hr) in the expression above for VolTolerance.

    All three tolerance values detailed above are individually optional, although at least one of them must be set.

    If the optional fail_on_non_convergence attribute is set to true, 2D solver will report has having failed (albeit 100% complete) if it reaches the simulation end time and the model is yet to converge. The default value of fail_on_non_convergence is true.

    The window_size tag specifies how far in the past 2D solver should be looking when comparing the current model volume with the previous. This must be greater than 18 minutes.

    The minimum_run_time tag specifies a minimum simulated time that 2D solver should run before starting to carry out the convergence checks. minimum_run_time must be greater than window_size + 18 minutes.


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.
    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence