-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HSE init in ghost zone #91
Comments
I'm trying to understand the setup here
I'm wondering if this is due to how the integral for HSE is constructed and interpolated. I chose to do the integration separately for each mesh block so that the HSE curve for small inner mesh blocks and large outer mesh blocks are resolved. However, since the r-coordinates of the integral for each mesh block is different, I think this could create discontinuities at mesh block boundaries. Maybe the discontinuity disappears when the integral lines up with an axis, which smells like an interpolation issue. Is the plot through the origin? If you offset from x=0 do you see artifacts at all boundaries, indicating only the axes are free from the issue? If you raise the parameter I could also try hacking the HSE integral to be the same for all mesh blocks. If it works better, we can switch main to that scheme. |
Yes, is centered on the origin and we haven't checked yet what happens if it's slightly misaligned. @mfournier01 do you have data readily available to check what a slice looks like at x!=0?
We've tried to increase it, but not that dramatically. @mfournier01 would you mind giving this a shot, too?
I'm not sure this is really necessary. So far it's been working nicely (and it still is within blocks). The main motivation might be to be able to use |
Hi and thanks for replying,
I just checked that and the grid looks quite the same everywhere along the x-axis.
Yes I tried it already up to 1000 and did not noticed any significant change. |
I also reviewed the original issue. So for your pgen you might want to go that route for now, i.e., not generating a profile relative to the local block indices, but use some global bounds (for smallest and largest radius and number of sample points -- adjusted to the dimensions in the input file). |
@mfournier01 discovered an issue when applying the (initialized) density field as a weight to the scalar potential that initialized the magnetic field.
The MWE is the default
cluster.in
(just with periodic BC and perturbations): cluster.txtwith these changes (so loop bounds are already adjusted to also init one layer into the ghost cells): main...pgrete/hse-ghost-mwe
Note, that using
instead of
results in a correctly initialized field.
The magnetic field divergence for the initial dump looks like:
so there are artifacts at the block boundaries (and more specifically, it looks like at boundaries where the coordinate do not cross 0).
(Note, the artifacts at the outermost edge are related to
yt
domain boundary handling, so should not be a concern.)We went through the hse code, but didn't spot anything that looks like being related to this kind of behavior.
Any ideas, @forrestglines ?
The text was updated successfully, but these errors were encountered: