<div dir="ltr"><span style="font-size:13.333333969116211px;font-family:arial,sans-serif">Hello, folks. I have a code that is computing the flux across a sphere of a given radius, as shown below</span><span style="font-size:13.333333969116211px;font-family:arial,sans-serif">. This code provides me with the summed flux across the surface, however what I am hoping to do is to bin this flux up into various velocities ranging from v_min to v_max. Thus, determine the mass flux across the surface for a chosen velocity bin.</span><div style="font-size:13.333333969116211px;font-family:arial,sans-serif">
<br></div><div style="font-size:13.333333969116211px;font-family:arial,sans-serif">Does anyone know of a simple way to read out flux for a given velocity (normal to the surface) rather than the summed total? </div><div style="font-size:13.333333969116211px;font-family:arial,sans-serif">
<br></div><div style="font-size:13.333333969116211px;font-family:arial,sans-serif">Code:</div><div style="font-size:13.333333969116211px;font-family:arial,sans-serif"><pre style="margin-top:0px;margin-bottom:0px;padding:5px 0px;font-family:'Bitstream Vera Sans Mono',monospace;font-size:13px;color:rgb(0,0,0)">
from yt.mods import *
pf=load("/trove/msoares/50Stars_LRefine5_Derefine0.05_velocity/50Stars_hdf5_plt_cnt_0200")
rad=0.1/pf['pc']
sp = pf.h.sphere([0,0,0],2.0*rad)
surf = pf.h.surface(sp,"Radius",rad)
flux = surf.calculate_flux("x-velocity","y-velocity","z-velocity","Density")
print flux</pre><pre style="margin-top:0px;margin-bottom:0px;padding:5px 0px;font-family:'Bitstream Vera Sans Mono',monospace;font-size:13px;color:rgb(0,0,0)"><br></pre></div><div><div dir="ltr"><div><font face="georgia, serif">Regards,</font></div>
<font face="georgia, serif">Melinda Soares-Furtado</font></div></div>
</div>