I hope you are doing well. I am currently working on simulations in spherical shells using the Dedalus code and have encountered an issue when trying to add diagnostic parameters. I am working with the shell IVP script file. Here is my question:
I have a scalar field, T, defined as T = dist.Field(name='T', bases=shell). I would like to compute the surface average of T to obtain a radial function, v(r). Furthermore, I want to differentiate v(r) at the inner sphere and dump it as a diagnostic parameter. Could you please advise on the correct workflow to achieve this?
I attempted several methods, and the following is one of the methods, but I believe I am implementing it incorrectly:
phi_ave = lambda A: d3.Average(A,'phi')
theta_ave = lambda A: d3.Average(A,'theta')
surface_ave = lambda A: theta_ave(phi_ave(A))
Thank you in advance.
Regards,
Bhargav