Hi all, I have a question about the calculate_flux function defined for AMRSurface objects. The docstrings for calculate_flux note that the returned fluxes are the code unit area multiplied by the local flux density. I'm curious what this means for AMR simulations, where the 'area' will depend on the local resolution. Does the fluxing calculation account for that? What about isocontours that cross level boundaries? Thanks for your advice, Nathan
I think I know how to handle this. As usual, I figured out the issue five minutes after hitting the 'send' button.... It doesn't matter that the resolution changes, since the conversion from code unit area to CGS area is constant across AMR levels. Here is a script snippet that converts a radial mass flux into solar masses per year: mass_sun = 1.9891e33 year = 3.15569e7 kpc = 3.08567758e21 iso = pf.h.surface(dd, 'Radius', 5*kpc) flux = iso.calculate_flux('xvelocity', 'yvelocity', 'zvelocity', 'Density') flux_msun_year = flux/msun*year*pf['Length']**2 Hope that's helpful for future isocontouring adventures :) Nathan On Thu, Feb 6, 2014 at 4:01 PM, Nathan Goldbaum <nathan12343@gmail.com> wrote:
Hi all,
I have a question about the calculate_flux function defined for AMRSurface objects.
The docstrings for calculate_flux note that the returned fluxes are the code unit area multiplied by the local flux density.
I'm curious what this means for AMR simulations, where the 'area' will depend on the local resolution. Does the fluxing calculation account for that? What about isocontours that cross level boundaries?
Thanks for your advice,
Nathan
participants (1)

Nathan Goldbaum