EulerFlow and SRMHD Convergence
There was a mistake in the EulerFlow and SRMHD error computation routines: The analytical solution expressed in conserved variables was compared vs. the numerical solution expressed in primitive variables.
I will report the errors for EulerFlow Moving Gauss 2D and SRMHD Alfven Wave 2D after the fix to make sure we do not get the computation wrong again.
I further added a Gauss-Legendre quadrature based error computation to the EulerFlow project in order to validate the Riemann quadrature values. Indeed, there is only a small difference. Convergence is observed in both cases .
(I did not calculate the rates yet. Sven should have a script for that.)
Some debugging tips:
-
We need to make sure that always matching variables (cons.,prim.) are compared against eacht other -- also for the SRMHD convergence tests.)
-
Even if the solver might get inaccurate in the long term, the initial data should always be better resolved on a finer mesh. We should always see convergence in projecting the initial data!
EulerFlow moving Gauss 2D-- rho errors
settings: fused-algorithmic-steps=on,timestepping=globalfixed
Gauss-Legendre quadrature:
maximum-mesh-size = 0.5
plotindex time l1norm l2norm max min avg
1 0.000000e+00 8.750382e-13 8.925639e-13 1.311617e-12 6.208367e-13 8.950533e-13
2 5.459310e-02 1.038389e-03 2.920092e-03 1.570339e-02 1.460953e-06 8.411925e-04
3 1.013872e-01 1.410669e-03 4.361094e-03 2.551770e-02 2.776317e-06 1.122370e-03
4 1.559803e-01 1.239346e-03 3.639293e-03 2.137039e-02 8.062877e-07 1.042290e-03
5 2.027744e-01 8.993649e-04 2.033884e-03 9.321796e-03 4.938160e-06 8.758699e-04
6 2.573675e-01 8.112109e-04 2.558304e-03 2.066562e-02 1.188077e-06 8.807274e-04
7 3.041615e-01 1.171406e-03 3.257146e-03 2.334808e-02 1.116484e-06 1.177089e-03
8 3.509556e-01 1.247573e-03 3.321656e-03 2.104360e-02 8.826953e-07 1.255401e-03
9 4.055487e-01 9.415592e-04 2.712697e-03 2.152044e-02 4.344998e-08 9.937017e-04
maximum-mesh-size = 0.15
plotindex time l1norm l2norm max min avg
1 0.000000e+00 8.772611e-13 8.949179e-13 1.507683e-12 6.206147e-13 8.976664e-13
2 5.199343e-02 1.824504e-04 1.173739e-03 1.840355e-02 1.319400e-11 1.656369e-04
3 1.013872e-01 1.463228e-04 8.135031e-04 1.585928e-02 9.383494e-12 1.586405e-04
4 1.507809e-01 1.511930e-04 7.129781e-04 7.640309e-03 6.468159e-13 1.499519e-04
5 2.001747e-01 1.799638e-04 1.039565e-03 1.571490e-02 7.177703e-12 1.593651e-04
6 2.521681e-01 2.472488e-04 1.460660e-03 2.225137e-02 1.960077e-11 2.191721e-04
7 3.015619e-01 2.123867e-04 9.078946e-04 1.156214e-02 2.549394e-11 2.037580e-04
8 3.509556e-01 1.996272e-04 1.025265e-03 1.816118e-02 3.995360e-11 2.028881e-04
9 4.003494e-01 2.200875e-04 1.407165e-03 2.126848e-02 6.046564e-10 1.847641e-04
maximum-mesh-size = 0.05
plotindex time l1norm l2norm max min avg
1 0.000000e+00 8.775711e-13 8.953091e-13 1.799227e-12 6.206147e-13 8.981400e-13
2 5.026031e-02 8.648108e-06 1.024604e-04 2.880816e-03 1.421085e-14 8.765676e-06
3 1.005206e-01 1.310812e-05 1.404085e-04 4.134064e-03 1.211253e-13 1.270370e-05
4 1.507809e-01 1.204385e-05 1.501490e-04 7.148238e-03 2.442491e-14 1.169658e-05
5 2.001747e-01 1.309551e-05 1.688337e-04 5.761659e-03 3.804734e-13 1.238790e-05
6 2.504350e-01 1.609669e-05 1.985765e-04 7.332591e-03 1.674216e-13 1.489681e-05
7 3.006953e-01 1.583313e-05 2.188010e-04 9.998774e-03 3.019807e-14 1.503079e-05
8 3.500891e-01 1.771167e-05 2.384444e-04 8.503132e-03 7.386314e-13 1.616133e-05
9 4.003494e-01 1.941804e-05 2.599394e-04 1.078235e-02 2.096101e-13 1.797866e-05
Riemann quadrature:
maximum-mesh-size = 0.5
plotindex time l1norm l2norm max min avg
1 0.000000e+00 8.208791e-04 2.760006e-03 1.152340e-02 1.857846e-09 8.208791e-04
2 5.459310e-02 1.136775e-03 2.987134e-03 1.768960e-02 1.300473e-06 1.136775e-03
3 1.013872e-01 1.339213e-03 3.890847e-03 2.752230e-02 1.402174e-07 1.339213e-03
4 1.559803e-01 1.298609e-03 3.445100e-03 2.234650e-02 3.597158e-09 1.298609e-03
5 2.027744e-01 1.040780e-03 2.383341e-03 9.564163e-03 1.192050e-09 1.040780e-03
6 2.573675e-01 1.125659e-03 2.468552e-03 8.197815e-03 7.159261e-10 1.125659e-03
7 3.041615e-01 1.645793e-03 3.824891e-03 1.758752e-02 3.099943e-09 1.645793e-03
8 3.509556e-01 1.710023e-03 4.109781e-03 1.967037e-02 6.597448e-09 1.710023e-03
9 4.055487e-01 1.238782e-03 2.674109e-03 8.709187e-03 5.247924e-09 1.238782e-03
maximum-mesh-size = 0.15
plotindex time l1norm l2norm max min avg
1 0.000000e+00 8.976664e-13 9.187753e-13 1.507683e-12 6.206147e-13 8.976664e-13
2 5.199343e-02 1.656369e-04 1.006196e-03 1.840355e-02 1.319400e-11 1.656369e-04
3 1.013872e-01 1.586405e-04 8.668425e-04 1.585928e-02 9.383494e-12 1.586405e-04
4 1.507809e-01 1.499519e-04 7.055692e-04 7.640309e-03 6.468159e-13 1.499519e-04
5 2.001747e-01 1.593651e-04 8.780007e-04 1.571490e-02 7.177703e-12 1.593651e-04
6 2.521681e-01 2.191721e-04 1.259805e-03 2.225137e-02 1.960077e-11 2.191721e-04
7 3.015619e-01 2.037580e-04 8.841593e-04 1.156214e-02 2.549394e-11 2.037580e-04
8 3.509556e-01 2.028881e-04 1.060100e-03 1.816118e-02 3.995360e-11 2.028881e-04
9 4.003494e-01 1.847641e-04 1.146441e-03 2.126848e-02 6.046564e-10 1.847641e-04
maximum-mesh-size = 0.05
plotindex time l1norm l2norm max min avg
1 0.000000e+00 8.981400e-13 9.193660e-13 1.799227e-12 6.206147e-13 8.981400e-13
2 5.026031e-02 8.765676e-06 1.038935e-04 2.880816e-03 1.421085e-14 8.765676e-06
3 1.005206e-01 1.270370e-05 1.360760e-04 4.134064e-03 1.211253e-13 1.270370e-05
4 1.507809e-01 1.169658e-05 1.486293e-04 7.148238e-03 2.442491e-14 1.169658e-05
5 2.001747e-01 1.238790e-05 1.582185e-04 5.761659e-03 3.804734e-13 1.238790e-05
6 2.504350e-01 1.489681e-05 1.849682e-04 7.332591e-03 1.674216e-13 1.489681e-05
7 3.006953e-01 1.503079e-05 2.125449e-04 9.998774e-03 3.019807e-14 1.503079e-05
8 3.500891e-01 1.616133e-05 2.143398e-04 8.503132e-03 7.386314e-13 1.616133e-05
9 4.003494e-01 1.797866e-05 2.425857e-04 1.078235e-02 2.096101e-13 1.797866e-05
SRMHD Alfven wave 2D -- vely errors
settings: fused-algorithmic-steps=off,timestepping=global
maximum-mesh-size = 0.5
plotindex time l1norm l2norm max min avg
1 0.000000e+00 1.547407e-03 2.445560e-03 4.573094e-03 2.602050e-05 1.547407e-03
2 6.015317e-02 1.111526e-03 1.657690e-03 3.769028e-03 3.275033e-06 1.111526e-03
3 1.002207e-01 1.398944e-03 1.869334e-03 4.319537e-03 2.836757e-04 1.398944e-03
maximum-mesh-size = 0.15
plotindex time l1norm l2norm max min avg
1 0.000000e+00 2.302968e-05 3.590189e-05 7.108230e-05 1.139464e-07 2.302968e-05
2 5.344862e-02 2.056201e-05 3.057057e-05 7.954177e-05 3.314441e-07 2.056201e-05
3 1.002171e-01 2.300635e-05 3.160379e-05 7.990042e-05 5.301505e-07 2.300635e-05
maximum-mesh-size = 0.05
plotindex time l1norm l2norm max min avg
1 0.000000e+00 2.913558e-07 4.523600e-07 9.036162e-07 4.721517e-10 2.913558e-07
2 5.122013e-02 3.221749e-07 4.326605e-07 1.331551e-06 5.221886e-09 3.221749e-07
3 1.002133e-01 3.809067e-07 5.525386e-07 1.662368e-06 1.168645e-09 3.809067e-07