Skip to content
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

BUG: artificacts in vorticity for athena #5061

Open
chrishavlin opened this issue Nov 20, 2024 · 4 comments
Open

BUG: artificacts in vorticity for athena #5061

chrishavlin opened this issue Nov 20, 2024 · 4 comments
Labels
bug code frontends Things related to specific frontends frontend: athena viz: 2D

Comments

@chrishavlin
Copy link
Contributor

Plots of vorticity (and presumably any variable that needs a derivative) have artifacts aligned with grid boundaries where the resolution changes:

import yt 
ds = yt.load_sample("AM06")
slc = yt.SlicePlot(ds, 'x', ('gas', 'vorticity_x'), window_size=(4,4))
slc.save('vort_x.png')
slc.annotate_grids()
slc.save('vort_x_with_grids.png')

vort_x
vort_x_with_grids

Also note that you do get a RuntimeWarning:

/home/chavlin/src/yt_general/yt/yt/data_objects/construction_data_containers.py:1531: RuntimeWarning: 
Something went wrong during field computation. This is likely due to missing ghost-zones support in 
class <class 'weakref.ProxyType'>

So presumably this is a known issue, but I didn't see a clear corresponding open issue so I thought it was worth opening a new report to document it. There are, however, a number of open and closed issues that are related to ghost zones and vorticity (in athena and other frontends):

@chrishavlin
Copy link
Contributor Author

also, feel free to close this as a duplicate if I missed an open issue or if one of the linked ones handles this sufficiently :)

@neutrinoceros neutrinoceros added the code frontends Things related to specific frontends label Nov 20, 2024
@matthewturk
Copy link
Member

That is a super weird error I do not recognize. I believe that what we should look at is whether or not the "smoothed" covering grids are being used.

@chrishavlin
Copy link
Contributor Author

chrishavlin commented Nov 21, 2024

I believe that what we should look at is whether or not the "smoothed" covering grids are being used.

That would be a yes, this call to retrieve_ghost_zones hardcodes a smoothed=True parameter, which results in using a smoothed covering grid to fill the ghost zones

for og in giter:
if ngz > 0:
g = og.retrieve_ghost_zones(ngz, [], smoothed=True)
else:
g = og

@chrishavlin
Copy link
Contributor Author

setting it to False to see what happens... it does run, and the magnitude of the artifacts is lower, but they're still there:

Screenshot from 2024-11-21 16-14-15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug code frontends Things related to specific frontends frontend: athena viz: 2D
Projects
None yet
Development

No branches or pull requests

3 participants