<div dir="ltr">Dear all,<div><br></div><div>I am hoping to calculate the flux of mass ("mdot") and angular momentum ("Ldot") through a series of concentric spherical surfaces in a simulation snapshot (centered around an absorbing "sink" within the grid). </div>
<div><br></div><div>So far, I've attempted this along these lines:</div><div><br></div><div><div>pf = load(fn) # load data</div><div>rad = 0.1</div><div>sp = pf.h.sphere([0,0,0],1.1*rad)</div><div>surf = pf.h.surface(sp,"Radius",rad)</div>
<div>flux = surf.calculate_flux("x-velocity","y-velocity","z-velocity","Density")</div></div><div><br></div><div>where flux gets assigned to the  mass accretion rate in this case. I believe I could do the angular momentum by calculating the flux of a derived variable  that is defined as </div>
<div>data["SpecificAngularMomentumZ"] * data["Density"]</div><div>such that the resulting units are angular momentum per volume. </div><div><br></div><div>I was wondering if there is a better way to go about this calculation, it seems that others must have tried to look at similar questions. In particular, defining an "isoradius" surface seems to accomplish what I was hoping to do, but there must be a cleaner way. </div>
<div><br></div><div>Thanks so much for your advice,</div><div><br></div><div>Morgan</div><div><br></div></div>