geodynamics / aspect

A parallel, extensible finite element code to simulate convection in both 2D and 3D models.
https://aspect.geodynamics.org/
Other
227 stars 237 forks source link

Issue with the particle method and the adaptive mesh #5171

Open lhy11009 opened 1 year ago

lhy11009 commented 1 year ago

I am testing using the particle method to set up the crustal layer in a two-d subduction model. This layer is adaptively refined compared to the background. I guess some of you would have the knowledge of how to set this up.

The mesh refinement criteria I use are "isosurfaces, minimum refinement function, viscosity". The isosurfaces are used to refine this layer (i.e. spcrust) to the highest level.

subsection Isosurfaces set Isosurfaces = max, max, spcrust: 0.5 | 1.0; max-1, max, spharz: 0.5 | 1.0; max-1, max, opcrust: 0.5 | 1.0; max-2, max, opharz: 0.5 | 1.0; max-1, max, Temperature: 270.0 | 1173.0 end

The method for particles are: subsection Particles set Number of particles = 5e7 set Minimum particles per cell = 33 set Maximum particles per cell = 50 set Load balancing strategy = remove and add particles set Interpolation scheme = cell average set Update ghost particles = true set Particle generator name = random uniform set Data output format = vtu set List of particle properties = initial composition set Time between data output = 0.1e6 end

Initially, the results show a fine composition layer in the crust: Screenshot from 2023-06-16 17-57-46

But then, at t=0.8 Ma, the results show an abrupt diffused tip at the change of mesh (red color -> green color, mesh in the background)

Screenshot from 2023-06-16 17-40-50

Using the field method in the same case the composition is gradually diffused in a couple of cells as expected

Screenshot from 2023-06-16 17-44-03

Any thought on a better resolved crustal layer with the particle method?

gassmoeller commented 1 year ago

Hi Haoyuan, I am at a conference this week so I wont have time to look more into it until next week. One question for you to check would already be: Can you see if the mesh in this region has been coarsened? Repeated coarsening and refinement of a region, combined with addition/deletion of particles can cause this smearing. Maybe you can check if you see similar effects in models without adaptive refinement or if they are limited to models with adaptive refinement?

lhy11009 commented 1 year ago

Hi Rene Thanks for your answer.

Repeated coarsening and refinement of a region, combined with addition/deletion of particles can cause this smearing

This is also what I think the issue could be. The region adjacent to the slab could be refined and coarsened as the dip angle changes.

If I want to turn off the addition/deletion of particles, is it this parameter "Load balancing strategy"? should I set it to none?

gassmoeller commented 1 year ago

If I want to turn off the addition/deletion of particles, is it this parameter "Load balancing strategy"? should I set it to none?

Yes, that should remove the diffusion if it is caused by particle addition/deletion. It might run a bit slower though.

lhy11009 commented 1 year ago

I added set Load balancing strategy = none and set Allow cells without particles = true Here is the new result of the crustal composition at t =0.8 Ma eba_cdpt_SA80 0_OA40 0_szsd_lim_gr11_co1 0_nocf_f0 005_pt_nlb_t0 8_spcrust This case indeed runs slower and the non-linear solver converges worse than the other two cases.

lhy11009 commented 1 year ago

I have another case comparing two options of the parameter: (left subfigure) set Interpolation scheme = harmonic average (right subfigure) set Interpolation scheme = cell average These cases are lower in resolution compared to the previous case but at the same snapshot. cellav_harmonic_compare Is there a reason that the "harmonic average" has a very sharp but not discontinuous boundary? A related matter is there is some cell with missing particles and I have added a set Allow cells without particles = true My intuition is this option doesn't work fine with the harmonic average?