FARGO3D

Home > Legacy archive > Specific versions > FARGO-ADSG > FARGO-SG > Poisson solver

We calculate the radial and azimuthal self-gravitating accelerations with Fast Fourier Transforms (FFT). This requires (i) the use of a grid with a logarithmic radial spacing, and (ii) that the softening length, adopted to avoid numerical divergences, scales with r, the radial coordinate. The calculation is done with function compute_selfgravity in sgmain.c. Its steps are the following: (a) initialization step with function init_sg in sginit.c: array declarations, construction of the forward and backward FFT plans. (b) calculation of TF(K_r) and TF(K_{\varphi}) with compute_fftkernel in sgkernel.c, where K_r and K_{\varphi} denote the radial and azimuthal kernel convolutions. This step is done only once. (c) calculation of TF(S_r) and TF(S_{\varphi}) with compute_fftdensity in sgdens.c, where S_r and S_{\varphi} denote the radial and azimuthal "reduced" surface densities. This calculation is done every timestep. (d) calculation of g_r and g_{\varphi}, the radial and azimuthal accelerations, as TF^{-1}(TF(S) . TF(K) ), to within a normalization factor. This is done (every timestep of course) with function compute_sgacc in sgacc.c. (e) eventually, the gas velocities are updated with g_r and g_{\varphi} with function update_sgvelocity, in sgupdate.c. In the case where you take into account only the axisymmetric component of the disk self-gravity (which involves only the axisymmetric part of the disk surface density), g_{\varphi}=0 and g_r depends only on r. Only 1D FFT calculations are therefore required, which do not need to be parallelized. The calculation of g_r is done with function compute_SGZeroMode in sgzero.c.


Site Map | COAST COAST | Contact | RSS RSS 2.0