May 10, 2023
2:06 p.m.
Hi everyone, I have tried to use the function 'add_gradient_fields' to calculate the second-order derivative of density 'rho' with x-direction, i.e., 'rho_gradient_x_gradient_x'. Here is the code: rho_gradientx = ds.add_gradient_fields(('boxlib','rho')) ds.periodicity = (True, True, True) rho_gradientxx = ds.add_gradient_fields(('boxlib','rho_gradient_x')) Unfortunately, nan occurs when I tried to plot the field 'rho_gradient_x_gradient_x' I will be appreciate if anyone can give me suggestions about how to fix it or provide other solutions to calculate higher order(more than 1st order) gradient fields. Best wishes, He Yifeng