underworldcode / underworld3

https://underworldcode.github.io/underworld3/
Other
21 stars 10 forks source link

Advection-diffusion convergence issue #161

Closed bknight1 closed 1 month ago

bknight1 commented 9 months ago

With increasing resolution the error is not showing a convergence order: AdvDiff_HP_convergence

The errors are concentrated at the diffusive boundary: unknown (T) degree comparison: Hot_pipe_l1_deg_comparison

diffusivity (D) value comparison: Hot_pipe_l1_D_comparison

To test any updates, the script to check convergence is found here

lmoresi commented 9 months ago

I had a look at this. I think it is unrealistic to start with a case which has an infinite gradient. I have an example notebook that looks at advection starting from a finite time and looking at the change over time and with advection. I'll upload and you can review.

bknight1 commented 9 months ago

Keen to have a look!

lmoresi commented 9 months ago

@bknight1 Take a look at Jupyterbook/Notebooks/Examples-Convection/Ex_AdvectionDiffusion_1dBlock.py.

I'm careful to start from a finite time after the step-function initial condition is applied so that it can be represented reasonably well by the mesh (maybe less so for the simplex example shown). Move it / diffuse it and compare before the analytic solution becomes invalid.

bknight1 commented 9 months ago

Makes sense! I'll update the script and see how it performs

lmoresi commented 2 months ago

@bknight1 - is this still live with the replacement for the test and the recent debugging ?

bknight1 commented 2 months ago

Last time I run it the convergence looked a bit better: AdvDiff-HP_setup&results.pdf

Re-running it now to see if the updates make a difference (updated my install to development last night)

bknight1 commented 2 months ago

These are the results after the update:

AdvDiff_convergence_tol=1e-06_new.pdf

Which appears to be worse...

bknight1 commented 1 month ago

Think this has been solved, so closing for now