Refining based on Jeans Length

I have been stepping through using the new refinement objects in the BE problem module. I added to the module both density gradient and Jeans threshold criteria for triggering refinement. I did so by following the steps on the page, RefinementObjects, and by just adding 2 calls sequentially in problem.f90.

The way Jeans based refinement is: each cell has associated with it a local Jeans length = Cs*Sqrt(Pi/G*rho). The refinement criteria for JeansLength is that if a cell's local JeansLength < 4*dx on a given level, than that cell is marked for refinement.

In my global.data file I set mx=16,16,16 and levels=7 with gtolerance=.10,.10,.10,.10,.10,1e30,1e30,.10 in an attempt to force the first 5 levels to be based on density gradients alone. If the collapse proceeded to make central cells jeans unstable, then the refinement based on threshold would happen on levels 6 and 7.

For the light ambient case, the refinement criteria worked well:

There was only ever 5 levels of refinement on the grid, Jeans threshold was not reached.

However, when checking the other case of a Matched ambient medium, the code would freeze or cause a segfault. Hmmm…. The only difference was the value of the ambient rho. Since the code was freezing at grid 3 initialization, I had a feeling the entire mesh was being refined. Since I was simply raising the ambient density by a constant everywhere, it did not make sense this would be due to density gradients. So I computed the Jeans' length for ambient cells in Visit: (<SoundSpeedScaled>*sqrt(pi/(ScaleGrav*rho))) = 3.648 in ambient. Compare now to 4*dx=4*(15.4/16)=3.85, ah, Jeanslength is slightly smaller. So, sure, there is refinement expected in the ambient.

The interesting thing I noticed next was that, contrary to what I'd expect, I was unable to de-trigger this refinement. I added more cells to the root level, which would mean smaller dx, and so no Jeans refinement right? Well, that did not happen. Not even with 22 cells! So. Why freezing at level 3? I restarted a sim with 2 AMR levels, and checked the output. Sure enough, the ambient was refined, and not just to the 1st level, but to the max level. No wonder the code was causing a segfault on BH with 7 levels! So. A movie of the Jean's length and the mesh than revealed the next interesting thing:

http://www.pas.rochester.edu/~erica/weirdness1.gif

This ring is maybe due to density falling in to the sphere in a compression wave? Well, it wasn't, rho was constant out there. But Jeans is a function of Cs, and Temp as well, and so a movie of that revealed this:

http://www.pas.rochester.edu/~erica/2weirdness.gif

Yikes.

I am not making a ticket yet, as I am not entirely sure if this is a problem. For one, the color bar indicates that the temp is indeed constant in the ambient, as it should be for this 'isothermal' sim., so maybe this is a visualization artifact? And 2, I may have been mistaken on how the new grids are laid down for the threshold based refinement. Is it setup to refine maximally when the Jeans Threshold is reached?

Attachments (1)

Download all attachments as: .zip

Comments

No comments.