[yt-users] integrated quantities in cylindrical
Suoqing Ji
jisuoqing at gmail.com
Tue Jun 18 10:00:49 PDT 2013
Hi Roman,
I assume the quantity 'CylindricalCellMass' is a derived field defined by yourself? I usually define the 2d cylindrical cell volume as followings:
@derived_field(name = "CylCellVolume") # CellVolume in yt is wrong
def realVolume(field, data):
return data["dx"]*data["dy"]*2*math.pi*data["x"]
@derived_field(name = "CylCellMass")
def realCellMass(field, data):
return data["CylCellVolume"]*data["Density"]
And for my data set, the output given by YT (use dd.quantities['TotalQuantity']('CylCellMass')[0]) and FLASH subroutine (IO_writeIntegralQuantities) match down to the machine accuracy.
Best wishes,
Suoqing
On Jun 18, 2013, at 12:46 PM, Roman Yurchak wrote:
> Hello,
>
> I'm interested in getting some integrated quantities from a cylindrical
> 2d FLASH simulation.
>
> Just to be sure, I started by comparing the total simulation mass
> computed by yt ( with pf.h.all_data().quantities['TotalQuantity'] etc.)
> and the one provided in FLASH logs, and the results are rather different
> [see attachment]:
> * _Values_: difference of up 8% between the two methods
> * _Time evolution_: total mass is decreasing in time according to
> FLASH (which is ok with open boundary conditions) but it is increasing
> with the yt's integration.
> * _Sensitivity to resolution_: there are jumps in total density given
> by yt for the time steps where the maximum refinement level is manually
> decreased.
>
> Would anyone know what might be the reason for this behaviour?
>
> Just in case, I tried to do a second order integration instead of simply
> summing the values in all the cells, but if didn't make an error, the
> correction was negligible.
>
> I can provide data and the yt script I'm using by PM if some could look
> into this.
>
> Thank you,
> Regards,
> --
> Roman Yurchak
> <integrated_quantities_FLASH_cyl.txt>_______________________________________________
> 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