def pressure_work(field,data): try: gi =-1*xo.AdotDel(data, ['velocity_x','velocity_y','velocity_z'], 'gas_pressure') #-data.ds.arr(grad(data,'PotentialField',2),'code_length/code_time**2') except: return np.zeros_like(data['density']) return gi
def pressure_work(field, data): try: gi = -1 * xo.AdotDel( data, [YT_velocity_x, YT_velocity_y, YT_velocity_z], YT_gas_pressure ) #-data.ds.arr(grad(data,'PotentialField',2),'code_length/code_time**2') except: return np.zeros_like(data[YT_density]) return gi
def bz_over_rho(field, data): output = xo.AdotDel(data, ['bx_hat', 'by_hat', 'bz_hat'], 'velocity_z') return output
def by_over_rho(field, data): output = xo.AdotDel(data, [YT_bx_hat, YT_by_hat, YT_bz_hat], 'velocity_y') return output