Hi all,
I am trying to use Dedalus to generate a vortex ring by using an impulsive cylindrical body force. This is simply modeled as the Navier-Stokes equations with a body force term which ideally is only active for a brief time.
Attached is a sample code which attempts to implement this by applying a step function to the force based on the time, which is used as a field object like in the
Librational Instability example.
The problem I encounter is that when I try to run the code in parallel, something is happening with the time field variable across MPI tasks that I don't really understand. On one task, it appears as though the time value is fine, but on the other tasks, the array is empty, and I'm not sure what to do with it. When I use np.heaviside(), I get a shape mismatch error, due to (presumably) the same issue of an empty array. I know this has something to do with how Dedalus distributes data in parallel, but I don't see why this uniform field variable would be empty on some MPI tasks.
The obvious work-around I'm using is to run one brief simulation with the force turned on, then run another simulation with the force turned off, reading the output data from the first run. This is a bit of pain though, especially with post-processing, so I would appreciate an explanation of how this data distribution is really working and how to run the full simulation in parallel.
Thanks!
Ryan