Ejemplo n.º 1
0
 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
Ejemplo n.º 2
0
    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
Ejemplo n.º 3
0
 def bz_over_rho(field, data):
     output = xo.AdotDel(data, ['bx_hat', 'by_hat', 'bz_hat'], 'velocity_z')
     return output
Ejemplo n.º 4
0
 def by_over_rho(field, data):
     output = xo.AdotDel(data, [YT_bx_hat, YT_by_hat, YT_bz_hat],
                         'velocity_y')
     return output