[yt-users] cell volume for 2d cylindrical FLASH data

Ji Suoqing jisuoqing at gmail.com
Sat Sep 15 13:17:05 PDT 2012


Hi Matt,

Thanks for your detailed response! Yes, now we just define the cylindrical cell volume and it works well (although it would be better if the CellVolume could be self-adapted to different geometrical info which could be retrieved directly from data file), and we handle the cylindrical quantities very careful. I'm very pleased to keep an eye on some possible different forms between cartesian and cylindrical cases, and will let you know about this.

Sincere thanks for all of your efforts on YT again!

Best wishes,
Suoqing

On Sep 15, 2012, at 7:15 AM, Matthew Turk <matthewturk at gmail.com> wrote:

> Hi Suoqing,
> 
> Yes, this is the case -- as a bit of background, in the 2.x series, yt
> only formally supports cartesian coordinates.  In the 3.0 series,
> which is still under heavy development, we will be supporting generic
> coordinate systems.  Anthony Scopatz, John ZuHone and I added support
> for cylindrical (rz) and polar (rt) coordinates recently.
> 
> While adding cylindrical coordinates had some challenges, the point
> you bring up is one of the easier ones to solve, albeit in a limited
> fashion.  To fix the specific field CellVolume, you can add a new
> field called CellVolume to your parameter file once it has loaded:
> 
> def CylCellVolume(field, data):
>    data["x"] ...
> pf.add_field("CellVolume", function=CylCellVolume)
> 
> Note that there may still be other assumptions of cartesian values,
> although none are immediately coming to mind.  In the new branch, we
> also change the coordinates to r, theta so as to reduce confusion and
> ensure that the correct values are being used and calculated.  For
> visualization, I believe everything should work properly as is.  The
> item you note about summation of volume (and also mass, since that is
> defined by density * volume) weighted quantities is a good one, and I
> appreciate you bringing it up.  I believe this should address that
> issue.
> 
> If you want to follow along about the development of 3.0, which will
> include this as well as a number of other things (but which will not
> be ready for some time!) you can subscribe to yt-dev, where it gets
> discussed regularly.  The most recent discussion was from Anthony, who
> recently developed a cylindrical ray tracing technique.
> 
> -Matt
> 
> On Fri, Sep 14, 2012 at 4:51 PM, Ji Suoqing <jisuoqing at gmail.com> wrote:
>> Hi all,
>> 
>> I've just found something confusing when dealing with 2d cylindrical data: the CellVolume is defined as cartesian form instead of cylindrical form. In FLASH, the cell volume for 2d cylindrical is defined as:
>> 
>> r * dr * dz * 2pi
>> 
>> While in YT, all the cell volumes have the same value. Although it's not difficult to define our own cell volume by ourselves, I just wonder this might lead to problems when calculating other quantities, such as any summation of volume-average quantities.
>> 
>> Best wishes,
>> Suoqing
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> _______________________________________________
> 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