I got used to generate a spherical shell in 3D from CMB to the Earth surface.
However, if I try to generate a mesh from the Earth surface to let’s say 400km depth, the initial global refinement only shows elongated elements which cannot be more refined due to a tremendously exaggerated aspect ratio of those elements. I have tried to set the Cells along circumference to 6, 12 and 92 (the max we are allowed) but it does not change the elements size much.
Is there a way to generate such a mesh with more squarish elements?
Can you send over one of the parameter files you used?
I suspect this is true, namely that no matter what you choose for these
numbers, a thin shell will have cells with poor aspect ratios. Can you
post pictures for 96 cells?
The problem is that the function in deal.II we call assumes a thick
shell. It would not be very difficult to write a plugin that describes a
thin shell instead by ensuring that we use only one element in depth,
regardless of the number of cells on the surface. I could point you at
how this could be done if you’re interested.
John - I attached the parameter file that I used to test the mesh:
test_mesh.prm (2.4 KB)
Wolfgang - see below 3 pictures for using Cells along circumference (Cac) of 6, 12 and 96, respectively, using global mesh refinement of 4. I used GMR = 4 for comparison because 4 was the minimum I could use for Cac = 6, otherwise I had an error telling me that the upper and lower boundary of the domain were bordered by the same cell.
Technically, right now I do not mind continuing working with thick spherical shell because even with using a density dataset which only covers 400km, the rest is filled with a constant density. But still I would like to have the option to do a thin mesh.
So I am interested to know what to do to be able to use a thin shell (although it might be some work I will reserve for the hackathon).
I don’t think it’s actually going to be that difficult. The way you should
implement this is by first reading how the GridGenerator::hyper_shell()
functions do this kind of work. (In deal.II/source/grid/grid_generator.cc.)
This will give you a bit of an idea of how this is done in general.
But really, it should work out to be not very much work at all. In your
particular case, I would create a 2d mesh for the surface of a 3d ball. I
forgot what function does that in GridGenerator, but there is one for this.
Then refine it until you have a horizontal resolution you’re happy with, and
then simply extrude it in radial direction. There is no function currently for
this kind of radial extrusion, but you can get inspired by looking at
I’m pretty sure that you’ll have all of that with less than 2 days of work.