AMG vs. GMG Solver Inconsistency in 3D Elasticity Models in Spherical Domains

Hi Ninghui, Timo and John,

Alright, so the problematic case is GMG + iterated Stokes. I can confirm that this case, for the viscoelastic bending beam, leads to anomalous velocities and stresses (see orange solid line in figure below). I’ve tested applying the material averaging to the viscosity used in the reaction rates as well (dashed pink line), and that leads to stable velocities and stresses, much more similar to the Newton/AMG cases. I have to do some more testing/discussing before I can be sure - this change is not in the fix_stresses_elasticity branch yet.


That said, the GMG solver is sensitive to the number of mesh refinement levels, and we’ve experienced in some viscoplastic models that it sometimes doesn’t converge, where AMG does. Reducing the viscosity ratio and/or the timestep can help there according to John.

Also, when elasticity is included, the Stokes equations are assembled differently for the Newton and the Picard nonlinear solvers, and for the GMG and AMG solvers (if I remember correclty). Here @YiminJin will know more.

@tjhei, not having to material average could be useful when trying to match benchmark results or in simulations with limited resolution, where you don’t want to lose the in-element variation. However, I think we should first look into those cases that people in John’s and my group have come across where GMG doesn’t converge, but could provide large speed up, like in 3D setups. What do you think @jbnaliboff ?

Hi Anne, John and all,

Alright, so the problematic case is GMG + iterated Stokes. I can confirm that this case, for the viscoelastic bending beam, leads to anomalous velocities and stresses (see orange solid line in figure below). I’ve tested applying the material averaging to the viscosity used in the reaction rates as well (dashed pink line), and that leads to stable velocities and stresses, much more similar to the Newton/AMG cases.

Thanks a lot for the detailed testing and for sharing the results! I’m glad to see that you’ve identified the GMG + iterated Stokes combination as the problematic case, and that applying material averaging to the viscosity used in the reaction rates seems to stabilize the solution.

Please do let me know if there’s anything I can help with regarding further testing or analysis. I’m happy to assist in any way I can.

Best,
Ninghui

I’ve tested applying the material averaging to the viscosity used in the reaction rates as well (dashed pink line), and that leads to stable velocities and stresses, much more similar to the Newton/AMG cases.

Great news, fingers crossed that change helps improve convergence behavior across a range of models.

@tjhei, not having to material average could be useful when trying to match benchmark results or in simulations with limited resolution, where you don’t want to lose the in-element variation. However, I think we should first look into those cases that people in John’s and my group have come across where GMG doesn’t converge, but could provide large speed up, like in 3D setups. What do you think @jbnaliboff ?

I agree. Having a ‘no material averaging’ for GMG may certainly be useful in some cases, but I think sorting out why the GMG performance breaks for some complicated models would be beneficial to a wider class of simulations.

Please do let me know if there’s anything I can help with regarding further testing or analysis. I’m happy to assist in any way I can.

Thanks for the offer @tiannh7. If you don’t mind sharing, posting the results of your testing/benchmarking to the forum (or via github issues) is certainly helpful. Longer term, contributing any new benchmarks or cookbooks repository would likewise be very helpful.

Please let us know how further testing goes (I would use AMG in the interim), and we can update here as well once further testing is done on our side with the changes Anne implemented.

Cheers,
John

1 Like

@anne-glerum My apologies for the late reply. As far as I remember, there is no difference between AMG and GMG in assembling the Stokes equation. But it is highly possible that I am wrong, for otherwise there should not be differences in the results. Besides, I have not fully understood the modifications made by Rene in computing the viscosity derivatives.

I am currently working on a new idea in viscosity averaging and I am going through all these stuffs. I hope I could get some conclusion before the next VEP meeting.

Dear all,

I apologize for revisiting this issue again. Although I still cannot fully solve the viscoelastic problem in 3D spherical domains directly, I am glad to report some progress.

Currently, I am using Anne’s latest branch and have observed that for the field-based method, the AMG solver (green solid line) and the GMG solver (tomato solid line) produce almost identical results. This suggests that an appropriate material averaging scheme has resolved the earlier GMG solver instability issues.

However, I noticed that when using the particle method, there are significant discrepancies. I am aware of some discussions in PR #4370, but I have not fully followed all details.

It is great news that Anne’s new branch is expected to be merged soon.

Thank you for your continued support and efforts!

Best regards,
Ninghui

@tiannh7 - Quick reply.

Two updates:

  1. The fix_stresses_elasticity branch is now merged and
  2. @anne-glerum recently added a feature that allows using the field stress values instead of the stress values on the particles (in models with particles).

For point 2, I believe using the field stress values in runs with improved the bending beam benchmark.

The way to use this feature is as follows:

subsection Particles
  subsection Elastic stress
     set Particle stress value weight = 0
  end
end

The default value is Particle stress value weight = 1, which only uses the stress values derived from the particles.

Cheers,
John

Dear John,

Thank you very much for your helpful suggestions.

I have tried modifying the particle stress value weight and observed some interesting behavior. It seems that the effect of the weight depends on the particle generation method, which might be related to the interpolation scheme used.

For example, when I use:

subsection Generator
  subsection Reference cell
    set Number of particles per cell per direction = 8
  end
end
set Interpolation scheme = cell average

the solution with particle stress value weight = 1 is closer to the field method, while weight = 0 deviates slightly.

However, when using random particle generation:

subsection Generator
  subsection Random uniform
    set Number of particles = 500e3
  end
end
set Interpolation scheme = nearest neighbor

the solution with particle stress value weight = 0 is closer to the field method, and weight = 1 is closer to the main (pre-merge) result.

In almost all tests, especially under the iterated Advection and Stokes iteration scheme, I encountered large Stokes residuals causing non-convergence. I have attached the parameter files reproducing these results at the end.

At this point, I am uncertain which method is more reliable. If adopting Anne’s latest field-based approach, it appears that for 3D spherical domains, the option Use limiter for discontinuous composition solution is not supported. Additionally, this method introduces more degrees of freedom (e.g., ve_stress_xx_old, ve_stress_yy_old, etc.) and requires nonlinear iterations, which might be costly for large models. I am not sure whether this trade-off is worthwhile. In addition, after I update the latest main branch, can I still continue to use the previous viscoelastic method?

Thanks again for your guidance and support.

Best,
Ninghui

02-anne-fix-AMG-Igr1-particles_weight1_random.prm.txt (8.1 KB)
02-anne-fix-AMG-Igr1-particles_weight1_PPC8.prm.txt (8.0 KB)
02-anne-fix-AMG-Igr1-particles_weight0_random.prm.txt (8.1 KB)
02-anne-fix-AMG-Igr1-particles_weight0_PPC8.prm.txt (8.0 KB)