I have solved a PDE with an analytical equation. Through operator splitting I divided the PDE into one PDE and one ODE, using a sequential approach.Finally for different $dt$, I got euclidian norm of the difference:Euclidian norm$dt_1$  $error_1$$dt_2$  $error_2$$dt_3$  $error_3$I would like to know the order of my numerical scheme, is this possible?I have seen the following formula:$$ (p+1)_\text{estimated} = \frac{\log_{10}(error_1) - \log_{10}(error_2) }{ \log_{10}(dt_1) - \log_{10}(dt_2) } $$
how to estimate convergence orders? what about this formula?
numerical analysis;numerics;error estimation
The idea of estimating the order of numerical scheme is following. If you have only one discretization parameter, say $dt$, you start with an assumption that the error have the following character $e = C (dt)^p$ where $e$ is your preferred ``global'' error when comparing numerical solution with exact solution e.g. at a fixed time $T$ (i.e. you need different number of time steps with different $dt$). If you expect such behavior of your error then $p$ expresses the order of method.Consequently$$e_1 = C (dt_1)^p \,, \quad e_2 = C (dt_2)^p \,.$$Then you make a simplification (an approximation) that $C$ is identical in both cases that is not true in general, but for enough small $dt$ this approximation is reasonable. Doing simple algebraic computations you obtain$$\frac{e_2}{e_1} = \left(\frac{dt_2}{dt_1}\right)^p$$that you can express as you wrote. The simplest way to do this is to use $dt_2=dt_1/2$ when for small enough $dt_1$ you can estimate that $p=1$ if $e_2=e_1/2$ or $p=2$ if $e_2=e_1/4$ and so on.First remark - you typically do not (and do not want to) estimate local truncation error that in many cases is of order $p+1$. Secondly, you mention PDEs, so you typically have also another discretization step, e.g. $dx$ (or you solve one equation in splitting method with analytical methods?). Then your error will be dominated by lower order accuracy, so with no prior knowledge of order it is not easy to estimate it.