Hi Prachi,

Unfortunately you've come across a fundamental limitation to the way we currently treat SPH data: we don't have a good way of calculating fields that need spatial derivatives on octree meshes at the moment.

I'm currently actively working on this (this week actually) as part of a larger refactoring and redesign of how we treat SPH data to eliminate the global octree mesh. This is a longish term project and probably won't be ready for a few months, so unfortunately I can't help you right now.

Sorry to not have more concrete advice...

Nathan

On Wed, Dec 7, 2016 at 5:52 PM Prachi Parihar <pparihar@astro.caltech.edu> wrote:
Hi all, 

I am trying to compute vorticity for a fire snapshot. I've put down a sphere (sp), and can access some other derived fields, but for some reason things like vorticity give me the following error. Does anyone have suggestions as to what I'm doing wrong? 

>>> sp['gas','velocity_magnitude']
YTArray([ 53724618.56288539,  48756921.3449135 ,  46197475.78549621, ...,
        53664392.60568497,  46881343.68564206,  50050673.058614  ]) cm/s
>>> sp['gas','vorticity_x']
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/prachi/anaconda2/lib/python2.7/site-packages/yt/data_objects/data_containers.py", line 281, in __getitem__
    self.get_data(f)
  File "/home/prachi/anaconda2/lib/python2.7/site-packages/yt/data_objects/data_containers.py", line 1295, in get_data
    self._generate_fields(fields_to_generate)
  File "/home/prachi/anaconda2/lib/python2.7/site-packages/yt/data_objects/data_containers.py", line 1315, in _generate_fields
    fd = self._generate_field(field)
  File "/home/prachi/anaconda2/lib/python2.7/site-packages/yt/data_objects/data_containers.py", line 318, in _generate_field
    tr = self._generate_fluid_field(field)
  File "/home/prachi/anaconda2/lib/python2.7/site-packages/yt/data_objects/data_containers.py", line 336, in _generate_fluid_field
    rv = self._generate_spatial_fluid(field, ngt_exception.ghost_zones)
  File "/home/prachi/anaconda2/lib/python2.7/site-packages/yt/data_objects/data_containers.py", line 359, in _generate_spatial_fluid
    for i, chunk in enumerate(chunks):
  File "/home/prachi/anaconda2/lib/python2.7/site-packages/yt/geometry/particle_geometry_handler.py", line 179, in _chunk_spatial
    g = og.retrieve_ghost_zones(ngz, [], smoothed=True)
AttributeError: 'ParticleOctreeSubset' object has no attribute 'retrieve_ghost_zones'


_______________________________________________

yt-users mailing list

yt-users@lists.spacepope.org

http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org