Time stepping at large Rm

9 views
Skip to first unread message

Hongzhe Zhou

unread,
May 30, 2024, 1:21:51 AMMay 30
to pencil-code-discuss
Hi All,

We are trying to simulate atmospheres of exoplanets, whose Rm  can become quite low when the temperature drops and the gas becomes less conductive. In this case the time step becomes very small due to the large resistivity. Is there any way to alleviate this? For the moment we are thinking of isolating the diffusion operator and create sub-time steps for it. Any suggestions on how to implement sub time steps, or other ideas of increasing the time steps at low Rm will be welcome!

Cheers,
Hongzhe

Kishore G

unread,
May 31, 2024, 12:38:59 AMMay 31
to pencil-co...@googlegroups.com
It may make sense to use some kind of implicit time-stepping scheme for the diffusion part alone (I think, e.g., Dedalus does this, but only if the resistivity is a constant). This seems somewhat complicated to implement in Pencil.

If your domain is spatially periodic as well, you can do the resistive evolution by taking an FFT and using the Green function (it is unclear if this would save any computational time, since it would require an FFT+IFFT at every advective timestep). [1] seems relevant if you want to try this.

[1]: https://lisyarus.github.io/blog/posts/exponential-smoothing.html#section-differential-equations

--
Kishore G.
வியாழன், 30 மே, 2024 AM 10:51:51 IST, Hongzhe Zhou எழுதியது

Hongzhe Zhou

unread,
May 31, 2024, 2:53:59 AMMay 31
to pencil-code-discuss
Hi Kishore,

Unfortunately we use spherical coordinates (with non-periodic b.c.s) so the FFT method wouldn't work.
I saw there is a timestep_subcycle.f90 file and it might be relevant. I'll look into it.

Hongzhe

Chao-Chin Yang

unread,
May 31, 2024, 3:14:42 AMMay 31
to pencil-co...@googlegroups.com

Dear Hongzhe,

 

You might be interested in src/implicit_diffusion.f90 and generalize the subroutine set_diffusion_equations() for curvilinear coordinates.

See samples/implicit_resistivity for my use case for Cartesian coordinates and also the Appendix of Yang, Mac Low, & Johansen (2018).

 

Sincerely,

-- 

Chao-Chin Yang

Assistant Professor

Department of Physics and Astronomy

The University of Alabama, U.S.A.

https://ccyang.people.ua.edu/

 

 

From: pencil-co...@googlegroups.com <pencil-co...@googlegroups.com> on behalf of Hongzhe Zhou <zhouh...@gmail.com>
Date: Friday, May 31, 2024 at 2:54
PM
To: pencil-code-discuss <pencil-co...@googlegroups.com>
Subject: [EXTERNAL] Re: Time stepping at large Rm

You don't often get email from zhouh...@gmail.com. Learn why this is important

--
You received this message because you are subscribed to the Google Groups "pencil-code-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pencil-code-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pencil-code-discuss/9c8e9cd5-a9ad-4bf6-ab70-5b381ed12b56n%40googlegroups.com.

Reinaldo Santos de Lima

unread,
May 31, 2024, 9:51:16 AMMay 31
to pencil-co...@googlegroups.com
Dear Hongzhe,

If your resistivity is very simple (homogeneous, isotropic), maybe a multigrid algorithm would work; I have a parallel library with the crank-nicolson scheme (semi-implicit 2nd order) implemented for spherical coordinates (tested at least in 2D). Check in this ref. the use of it for CR diffusion (https://ui.adsabs.harvard.edu/abs/2015MNRAS.448..207D/abstract). If you think it can work, I can send it to you, or maybe you can find a more general implementation (for example in the PETSc library).

Cheers,
Reinaldo

Reply all
Reply to author
Forward
0 new messages