[yt-users] doing SPH smoothing without smoothing lengths (or with them inputted manually)

Matthew Turk matthewturk at gmail.com
Fri Aug 8 13:05:24 PDT 2014


Hi Brendan,

On Fri, Aug 8, 2014 at 1:47 PM, Brendan Griffen
<brendan.f.griffen at gmail.com> wrote:
> Hi,
>
> As I understand yt is able to construct an array based on cloud-in-cell
> assignment but not using sph assignment. Each particle must have their own
> smoothing lengths. Could a rudimentary smoothing length be assigned within
> yt if particles don't already have a smoothing length? The volume rendering
> looks great for gas with a 'density' field but if I want to create a sph
> smoothed field also called 'density' for the dark matter particles, my only
> option for particle data at this point is cloud in cell assignment? This
> looks OK for large scale full homogeneous runs but for zoom-ins cloud in
> cell looks pretty terrible.

This can definitely be done!  (Amos Manneschmidt wrote to the list
today with a related question, which I will reply to as soon as I
can.)  Right now, the smoothing length is assumed to be provided, but
the field definition looks like this:

https://bitbucket.org/yt_analysis/yt/src/d0ec6bb3dbf2455e05e565f1d862a2942810e6ef/yt/fields/particle_fields.py?at=yt#cl-540

Note that "smoothing length" is an input field.  One can then do any
other derived field in a similar way.  If you're looking for, say, the
distance to the Nth nearest neighbor, that is relatively simple to
implement, and I was planning on doing that shortly.

>
> Or could you even feed yt the smoothing lengths (say output from subfind) as
> a vector which yt then uses for the sph assignment? This might be a good
> first step as I already have the smoothing lengths pre-calculated in hsml
> files from subfind.

This is also totally feasible.  What you'd want to do is make a
derived field like the one described above, but specify your smoothing
length differently.

-Matt

>
> Thanks.
>
> Brendan
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list