DedalusProject / dedalus

A flexible framework for solving PDEs with modern spectral methods.
http://dedalus-project.org/
GNU General Public License v3.0
513 stars 121 forks source link

[d3] Sphere basis #162

Closed kburns closed 3 years ago

kburns commented 3 years ago

This PR implements S2 operators, tests, and examples. The tests all currently pass except for a couple related to the sine mode for m=0, which is being addressed in the d3-valid branch. Remaining things:

kburns commented 3 years ago

Probably only need one of barotropic/shallow water examples, but need to understand nonlinear stability, and probably add diffusion, etc.

kburns commented 3 years ago

Ok implicit coriolis seems to be working. The barotropic example (planetary wave) is stable at larger timesteps now, but its still unstable if the amplitude of the wave is too large (should be an exact nonlinear solution). There seems to be some leakage between the real and imaginary parts of the solution that leads to the crash... not sure why.

kburns commented 3 years ago

Seems like the instability might just be from using complex numbers. Zeroing the imaginary part each timestep fixes the issue, and it runs as expected (maintains nonlinear solution with slow viscous decay).

kburns commented 3 years ago

@jsoishi I think everything seems to be working on my end now. Should we spice up the barotropic example a little to e.g. get it to form jets, and leave shallow water in the scratch directory for now?

kburns commented 3 years ago

Decided to keep the shallow water example and add a jet to it, and move the barotropic script to the scratch directory, since its really a scalar problem that doesn't require vector fields.

I think this is pretty much ready to go now. Could always use more tests, of course, but maybe good enough for now?

bpbrown commented 3 years ago

Looks good to me; we can add other tests and examples later, so I'd say let's get this merged!

On Sat, Oct 30, 2021 at 10:07 AM Keaton J. Burns @.***> wrote:

Decided to keep the shallow water example and add a jet to it, and move the barotropic script to the scratch directory, since its really a scalar problem that doesn't require vector fields.

I think this is pretty much ready to go now. Could always use more tests, of course, but maybe good enough for now?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DedalusProject/dedalus/pull/162#issuecomment-955494518, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABN7BYPGNPNKPEM47ICMCVDUJQQ4TANCNFSM5GJWDJ2Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.