diff --git a/core/src/config.jl b/core/src/config.jl index 0ae043004..3f7c40b46 100644 --- a/core/src/config.jl +++ b/core/src/config.jl @@ -101,7 +101,7 @@ const nodetypes = collect(keys(nodekinds)) dtmax::Union{Float64, Nothing} = nothing force_dtmin::Bool = false abstol::Float64 = 1e-6 - reltol::Float64 = 1e-5 + reltol::Float64 = 1e-7 water_balance_abstol::Float64 = 1e-3 water_balance_reltol::Float64 = 1e-2 maxiters::Int = 1e9 diff --git a/core/test/docs.toml b/core/test/docs.toml index 39b7b2894..6bc747671 100644 --- a/core/test/docs.toml +++ b/core/test/docs.toml @@ -32,7 +32,7 @@ dtmin = 0.0 # optional, default 0.0 dtmax = 0.0 # optional, default length of simulation force_dtmin = false # optional, default false abstol = 1e-6 # optional, default 1e-6 -reltol = 1e-5 # optional, default 1e-5 +reltol = 1e-7 # optional, default 1e-7 water_balance_abstol = 1e-3 # optional, default 1e-3 water_balance_reltol = 1e-2 # optional, default 1e-2 maxiters = 1e9 # optional, default 1e9 diff --git a/docs/concept/equations.qmd b/docs/concept/equations.qmd index fdd88df4d..69fbbc3e9 100644 --- a/docs/concept/equations.qmd +++ b/docs/concept/equations.qmd @@ -157,8 +157,8 @@ For more a more in-depth discussion of numerical computations see [Numerical con There are many things that can influence the calculations times, for instance: -- [Solver tolerance](https://diffeq.sciml.ai/stable/basics/faq/#What-does-tolerance-mean-and-how-much-error-should-I-expect): - By default we use absolute and relative tolerances of `1e-6` and `1e-5` respectively. +- [Solver tolerance](https://docs.sciml.ai/DiffEqDocs/stable/basics/faq/#What-does-tolerance-mean-and-how-much-error-should-I-expect): + By default we use absolute and relative tolerances of `1e-6` and `1e-7` respectively. - [ODE solvers](https://diffeq.sciml.ai/stable/solvers/ode_solve/): The `QNDF` method we use is robust to oscillations and massive stiffness, however other solvers should be tried as well. - Forcing: Every time new forcing data is injected into the model, it needs to pause. diff --git a/python/ribasim/ribasim/config.py b/python/ribasim/ribasim/config.py index 690c77c73..45d39cd9c 100644 --- a/python/ribasim/ribasim/config.py +++ b/python/ribasim/ribasim/config.py @@ -101,7 +101,7 @@ class Solver(ChildModel): abstol : float The absolute tolerance for adaptive timestepping (Optional, defaults to 1e-6) reltol : float - The relative tolerance for adaptive timestepping (Optional, defaults to 1e-5) + The relative tolerance for adaptive timestepping (Optional, defaults to 1e-7) maxiters : int The total number of linear iterations over the whole simulation. (Defaults to 1e9, only needs to be increased for extremely long simulations) sparse : bool