Skip to main content
Log in

Self-gravity in curved mesh elements

  • Original Article
  • Published:
Celestial Mechanics and Dynamical Astronomy Aims and scope Submit manuscript

Abstract

The local character of self-gravity along with the number of spatial dimensions are critical issues when computing the potential and forces inside massive systems like stars and disks. This appears from the discretisation scale where each cell of the numerical grid is a self-interacting body in itself. There is apparently no closed-form expression yet giving the potential of a three-dimensional homogeneous cylindrical or spherical cell, in contrast with the Cartesian case. By using Green’s theorem, we show that the potential integral for such polar-type 3D sectors—initially, a volume integral with singular kernel—can be converted into a regular line-integral running over the lateral contour, thereby generalising a formula already known under axial symmetry. It therefore is a step towards the obtention of another potential/density pair. The new kernel is a finite function of the cell’s shape (with the simplest form in cylindrical geometry), and mixes incomplete elliptic integrals, inverse trigonometric and hyperbolic functions. The contour integral is easy to compute; it is valid in the whole physical space, exterior and interior to the sector itself and works in fact for a wide variety of shapes of astrophysical interest (e.g. sectors of tori or flared discs). This result is suited to easily providing reference solutions, and to reconstructing potential and forces in inhomogeneous systems by superposition. The contour integrals for the 3 components of the acceleration vector are explicitely given.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

Notes

  1. From the asymptotic behaviour of the \({\mathbf K}\)-function (Gradshteyn and Ryzhik 2007), the leading terms are:

    $$\begin{aligned} \left\{ \begin{array}{l} M \sim - \zeta \ln \sqrt{(a-R)^2 + \zeta ^2}\\ N \sim - (a-R) \ln \sqrt{(a-R)^2 + \zeta ^2} \end{array}\right. \end{aligned}$$
    (14)

    as \(k \rightarrow 1\) (corresponding to \(a \rightarrow R\) and \(z \rightarrow Z\)).

References

  • Ansorg, M., Kleinwächter, A., Meinel, R.: Uniformly rotating axisymmetric fluid configurations bifurcating from highly flattened Maclaurin spheroids. MNRAS339, pp. 515–523 (2003). doi:10.1046/j.1365-8711.2003.06190.x, arXiv:astro-ph/0208267

  • Binney, J., Tremaine, S.: Galactic Dynamics. Princeton University Press, Princeton, NJ (1987)

    MATH  Google Scholar 

  • Cohl, H.S., Tohline, J.E.: A compact cylindrical green’s function expansion for the solution of potential problems. ApJ527, pp. 86–101 (1999). doi:10.1086/308062

  • Dafa-Alla, A.F., Hwang, K.W., Ahn, S., Kim, P.: A new finite difference representation for poissons equation on from a contour integral. Appl. Math. Comput. 217(8):3624–3634 (2010). doi:10.1016/j.amc.2010.10.017, URL http://www.sciencedirect.com/science/article/pii/S0096300310010477

    Google Scholar 

  • Durand, E.: Electrostatique. Vol. I. Les distributions. Ed. Masson (1953)

  • Gradshteyn, I.S., Ryzhik, I.M.: Table of Integrals, Series, and Products, 7th edn. Academic Press, London (2007)

    MATH  Google Scholar 

  • Grandclément, P., Bonazzola, S., Gourgoulhon, E., Marck, J.A.: A multidomain spectral method for scalar and vectorial poisson equations with noncompact sources. J. Comput. Phys. 170, 231–260 (2001). doi:10.1006/jcph.2001.6734, arXiv:gr-qc/0003072

    Google Scholar 

  • Guillet, T., Teyssier, R.: A simple multigrid scheme for solving the Poisson equation with arbitrary domain boundaries. J. Comput. Phys. 230, 4756–4771 (2011). doi:10.1016/j.jcp.2011.02.044

    Google Scholar 

  • Hachisu, I.: A versatile method for obtaining structures of rapidly rotating stars. ApJS61, pp. 479–507 (1986). doi:10.1086/191121

  • Hill, D.L., Wheeler, J.A.: Nuclear constitution and the interpretation of fission phenomena. Phys. Rev. 89, 1102–1145 (1953). doi:10.1103/PhysRev.89.1102

    Google Scholar 

  • Huré, J.M.: Solutions of the axi-symmetric Poisson equation from elliptic integrals. I. Numerical splitting methods. A&A434, pp. 1–15 (2005). doi:10.1051/0004-6361:20034194

  • Huré, J.M.: A key-formula to compute the gravitational potential of inhomogeneous discs in cylindrical coordinates. Celes. Mech. Dyn. Astron. 114, 365–385 (2012). doi:10.1007/s10569-012-9445-8

  • Jusélius, J., Sundholm, D.: Parallel implementation of a direct method for calculating electrostatic potentials. J. Chem. Phys. 126(9):094101 (2007). doi:10.1063/1.2436880, URL http://link.aip.org/link/?JCP/126/094101/1

  • Kellogg, O.D.: Foundations of Potential Theory. Frederick Ungar Publishing Company, New-York (1929)

    Book  Google Scholar 

  • Li, S., Buoni, M.J., Li, H.: A fast potential and self-gravity solver for non-axisymmetric disks. ArXiv e-prints 0812, 0590 (2008)

  • Ma, Z.H., Chew, W.C., Jiang, L.J.: A novel efficient numerical solution of Poisson equation for arbitrary shapes in two dimensions. ArXiv e-prints 1208, 0901 (2012)

    Google Scholar 

  • Mach, P., Malec, E.: Accretion and structure of radiating disks. A&A541:A128, p. 1010 (2012). doi:10.1051/0004-6361/201015755.1010.1450

  • MacMillan, W.: The Theory of the Potential. No. vol. 2 in Theoretical Mechanics. McGraw-Hill Book Company, Inc., New York (1930). URL http://books.google.fr/books?id=yL7QAAAAMAAJ

  • Matsumoto, T., Hanawa, T.: A fast algorithm for solving the poisson equation on a nested grid. ApJ583, pp. 296–307 (2003). doi:10.1086/345338, arXiv:astro-ph/0209618

  • Olver, F.W.J., Lozier, D.W., Boisvert, R.F., Clark, C.W. (eds): NIST Handbook of Mathematical Functions. Cambridge University Press, New York, print companion to ? (2010)

  • Stone, J.M., Norman, M.L.: ZEUS-2D: a radiation magnetohydrodynamics code for astrophysical flows in two space dimensions. I. The hydrodynamic algorithms and tests. ApJ80, pp. 753–790 (1992). doi:10.1086/191680

  • Zhu, P.: Field distribution of a uniformly charged circular arc. J. Electrostat. 63(11):1035–1047 (2005). doi:10.1016/j.elstat.2005.02.001, URL http://www.sciencedirect.com/science/article/pii/S0304388605000148

    Google Scholar 

Download references

Acknowledgments

We greatly thank D. Pfenniger for his suggestions about a preliminary version of the project. We thank the anonymous referees for their valuable comments and suggestions to improve the presentation.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jean-Marc Huré.

Electronic supplementary material

Below is the link to the electronic supplementary material.

Supplementary material 1 (f90 5 KB)

Appendices

Appendix A: Values of \(F(\beta ,k)\) and \(E(\beta ,k)\) for any amplitude \(\beta \)

The computation of \(F(\beta ,k)\) must be performed with caution as soon as the amplitude \(\beta \) stands outside the range \([0,\frac{\pi }{2}]\). It is in particular necessary to use the following rules:

$$\begin{aligned} \left\{ \begin{array}{ll} F(\beta ,k)=-F(-\beta ,k), \quad \hbox {if } \beta < 0,\\ F(\beta ,k)=n {\mathbf K}(k)+F\left( |\beta |-n\frac{\pi }{2},k\right) , \quad \hbox {if } |\beta |-n\frac{\pi }{2} \in [0,\frac{\pi }{2}] \hbox { and even } n,\\ F(\beta ,k)=n {\mathbf K}(k)-F\left( n\frac{\pi }{2}-|\beta |,k\right) ,\quad \hbox {if } n\frac{\pi }{2}-|\beta |\in [0,\frac{\pi }{2}] \hbox { and odd } n, \end{array}\right. \end{aligned}$$
(34)

and

$$\begin{aligned} \left\{ \begin{array}{ll} E(\beta ,k)=-E(-\beta ,k), \quad \hbox {if } \beta < 0,\\ E(\beta ,k)=n {\mathbf E}(k)+E\left( |\beta |-n\frac{\pi }{2},k\right) , \quad \hbox {if } |\beta |-n\frac{\pi }{2} \in [0,\frac{\pi }{2}] \hbox { and even } n,\\ E(\beta ,k)=n {\mathbf E}(k)-E\left( n\frac{\pi }{2}-|\beta |,k\right) , \quad \hbox {if } n\frac{\pi }{2}-|\beta |\in [0,\frac{\pi }{2}] \hbox { and odd}\, n. \end{array}\right. \end{aligned}$$
(35)

Appendix B: Derivation of \(M\) and \(N\) in the axially symmetrical case

In order to determine \(M\) and \(N\) in the following equation

$$\begin{aligned} \partial _a N - \partial _z M = 2 \sqrt{\frac{a}{R}} k {\mathbf K}(k), \end{aligned}$$
(36)

we set without loss of generality:

$$\begin{aligned} \left\{ \begin{array}{l} M = \zeta k {\mathbf E}(k) f(a) + \zeta k {\mathbf K}(k) g(a),\\ N = a k {\mathbf E}(k) h(a,\zeta ) + a k {\mathbf K}(k) l(a,\zeta ), \end{array}\right. \end{aligned}$$
(37)

where \(f\), \(g\), \(h\) and \(l\) are four functions to be determined. From Eqs. (18) and (19), and given (Gradshteyn and Ryzhik 2007):

$$\begin{aligned} \partial _k k{\mathbf E}(k) = 2 {\mathbf E}(k) - {\mathbf K}(k), \end{aligned}$$
(38)

and

$$\begin{aligned} \partial _k k{\mathbf K}(k) = \frac{{\mathbf E}(k)}{{k'}^2}, \end{aligned}$$
(39)

we get:

$$\begin{aligned} -\partial _z M&= k{\mathbf E}(k) f(a) + k{\mathbf K}(k) g(a) + \zeta \partial _\zeta k \left[ \left( 2{\mathbf E}(k) - {\mathbf K}(k) \right) f + g \frac{{\mathbf E}(k)}{{k'}^2} \right] \nonumber \\&= k{\mathbf E}(k) \left[ \left( 2\frac{k^2}{m^2}-1\right) f - \left( 1 - \frac{k^2}{m^2} \right) \frac{g}{{k'}^2} \right] + k{\mathbf K}(k) \left[ \left( 1 - \frac{k^2}{m^2} \right) f + g \right] \end{aligned}$$
(40)

and

$$\begin{aligned} \partial _a N&= k{\mathbf E}(k) (ah' + h) + k{\mathbf K}(k) (al'+l) + a \partial _a k \left[ \left( 2{\mathbf E}(k) - {\mathbf K}(k) \right) h + l \frac{{\mathbf E}(k)}{{k'}^2} \right] \nonumber \\&= k{\mathbf E}(k) \left[ ah'+h + \left( 2h + \frac{l}{{k'}^2} \right) \left( \frac{1}{2} - \frac{a}{a+R}\frac{k^2}{m^2} \right) \right] \nonumber \\&\qquad + k{\mathbf K}(k) \left[ al'+l - h \left( \frac{1}{2} - \frac{a}{a+R} \frac{k^2}{m^2} \right) \right] . \end{aligned}$$
(41)

Forming \(\partial _a N-\partial _z M\), and gathering terms, we get

$$\begin{aligned} 2h + ah' - f - \frac{g}{{k'}^2} + \frac{l}{{2k'}^2} + \frac{k^2}{m^2} \left( 2f + \frac{g}{{k'}^2} -\frac{2a}{a+R}h - \frac{l}{{k'}^2}\frac{a}{a+R} \right) \end{aligned}$$
(42)

for the term multiplying \(k{\mathbf E}(k)\), and

$$\begin{aligned} = f+g+l+al'-\frac{h}{2}+\frac{k^2}{m^2} \left( h \frac{a}{a+R}-f \right) \end{aligned}$$
(43)

for the term multiplying \(k{\mathbf K}(k)\). The solution by (Ansorg et al. 2003) which corresponds to

$$\begin{aligned} \left\{ \begin{array}{l} M = \zeta \sqrt{\frac{a}{R}} k {\mathbf K}(k)\\ N= \sqrt{\frac{a}{R}} k \left\{ (a+R) {\mathbf K}(k) - \frac{2R}{k^2} \left[ {\mathbf K}(k) - {\mathbf E}(k) \right] \right\} , \end{array}\right. \end{aligned}$$
(44)

is obtained for the following settings:

$$\begin{aligned} \left\{ \begin{array}{l} f=0,\\ g=\sqrt{\frac{a}{R}},\\ ah=\sqrt{\frac{a}{R}} \frac{2R}{k^2},\\ al=\sqrt{\frac{a}{R}} \left( a+R-\frac{2R}{k^2}\right) = \frac{1}{2}\sqrt{\frac{a^3}{R}}- \frac{R^2+\zeta ^2}{2\sqrt{aR}}, \end{array}\right. \end{aligned}$$
(45)

which eliminates the term \(k {\mathbf E}(k)\) and produces the factor \(2 \sqrt{\frac{a}{R}}\) for the term \(k{\mathbf K}(k)\).

Appendix C: A basic Fortran 90 program

Fortran 90 routines and a driver program which computes the \(M\) and \(N\) functions for a cylindrical cell and the associated potential at one space point \((R,\theta ,Z)\) are available from the online version of the paper. The quadrature is performed from a Newton-Cotes, second-order quadrature scheme. External calls to functions IEF(BETA,K) and IEE(BETA,K) refer to the values of the incomplete elliptic integral \(F(\beta ,k)\) and \(E(\beta ,k)\) respectively which can be obtained from any mathematical library. For single (double) precision computations, change _AP into 4 (resp 8), and EPSMACH is the corresponding precision (about \(2 \times 10^{-16}\) in double precision). These routines are not optimized. Running the code with the default parameters generates the following output:

figure a

Appendix D: Accelerations

Since \(M\) and \(N\) are build from the two elementary kernels \(M_0\) and \(N_0\) from Eq. (25), we will only expand \(\partial _R M_0\), \(\partial _R N_0\), \(\partial _\theta M_0\), etc. After calculus, we get

$$\begin{aligned} \left\{ \begin{array}{l} \frac{\partial M_0 }{\partial R} = - \frac{1}{4}\sqrt{\frac{a}{R^3}} \zeta k^3 \left\{ \left[ E(\beta _0,k) - \frac{k^2 \sin ^2 \beta _0}{2 \sqrt{1-k^2\sin ^2 \beta _0}} \right] \right. \\ \left. \qquad \qquad \times \left[ 1-\frac{(a+R)k^2}{2a} \right] \frac{1}{{k'}^2}+F(\beta _0,k) \right\} + \frac{1}{2} \alpha \frac{\partial f }{\partial R}\\ \frac{\partial N_0 }{\partial R} = - \frac{1}{4}\sqrt{\frac{a}{R^3}} k \frac{a^2+R^2}{a}F(\beta _0,k) + \frac{1}{2}\frac{kE(\beta _0,k)}{{k'}^2} \left\{ \frac{a-R}{a+R}\sqrt{\frac{a}{R}}\left( \frac{a+R}{2R}-\frac{k^2}{m^2}\right) -\frac{{k'}^2}{m}\right\} \\ \qquad \qquad +\,\, \frac{1}{4}k \sqrt{\frac{a}{R}} \left( 1-\frac{k^2}{m^2}+\frac{a-R}{2R} \right) \left( {k'}^2-\frac{a-R}{a+R}\right) \frac{\sin (2\beta _0)}{{k'}^2\sqrt{1-k^2\sin ^2 \beta _0}}\\ \qquad \qquad +\,\, \frac{1}{2}(1-\alpha ) \frac{\partial g }{\partial R}\\ \frac{\partial M_0 }{\partial \theta } = \frac{1}{4}\sqrt{\frac{a}{R}} \zeta \frac{k}{\sqrt{1-k^2\sin ^2 \beta _0}} + \frac{1}{2} \alpha \frac{\partial f }{\partial \theta }\\ \frac{\partial N_0 }{\partial \theta } = \frac{1}{4}\sqrt{\frac{a}{R}} [a+R \cos (2 \beta _0)] \frac{k}{\sqrt{1-k^2\sin ^2 \beta _0}} + \frac{1}{2}(1-\alpha ) \frac{\partial g }{\partial \theta }\\ \frac{\partial M_0 }{\partial Z} = \frac{1}{2}\sqrt{\frac{a}{R}}k \left[ F(\beta _0,k)-\left( 1-\frac{k^2}{m^2}\right) \frac{E(\beta _0,k)}{{k'}^2}\right] \\ \qquad \qquad +\,\, \frac{1}{4}\sqrt{\frac{R}{a}}\left( 1-\frac{k^2}{m^2}\right) \frac{k^3}{{k'}^2\sqrt{1-k^2\sin ^2 \beta _0}} + \frac{1}{2}\alpha \frac{\partial f }{\partial Z}\\ \frac{\partial N_0 }{\partial Z} = - \frac{1}{2}\sqrt{\frac{a}{R}}\left\{ \left( a+R-\frac{2R}{k^2}\right) \left[ E(\beta _0,k)-\frac{k^2 \sin (\beta _0)}{2\sqrt{1-k^2\sin ^2 \beta _0}}\right] \right. \\ \qquad \qquad \left. +\,\,\frac{2R{k'}^2}{k^2}F(\beta _0,k)\right\} \frac{k}{\zeta {k'}^2}\left( 1-\frac{k^2}{m^2}\right) + \frac{1}{2}(1-\alpha )\frac{\partial g }{\partial Z} \end{array}\right. \end{aligned}$$
(46)

where

$$\begin{aligned} \left\{ \begin{array}{l} \frac{\partial f }{\partial R} = \frac{f}{R}+ \frac{1}{2} \sin (2 \beta _0) \sqrt{\frac{R}{a}} \frac{1}{1-m^2 \sin ^2 \beta _0}\frac{k}{\sqrt{1-k^2\sin ^2 \beta _0}} \frac{\zeta [R+a \cos (2 \beta _0)]}{(a+R)^2}\\ \frac{\partial g }{\partial R} = \frac{g}{R}- \frac{1}{2} \sin (2 \beta _0) \sqrt{\frac{R}{a}} \frac{k}{\sqrt{1-k^2\sin ^2 \beta _0}} \frac{[\zeta ^2 \cos (2\beta _0)-aR \sin ^2(2\beta _0)]}{\zeta ^2+R^2 \sin ^2 (2\beta _0)} \\ \frac{\partial f }{\partial \theta } = -R \cos (2 \beta _0) \mathrm{asinh}\frac{\zeta }{(a+R)\sqrt{1-m^2 \sin ^2 \beta _0}} \\ \qquad \qquad - \frac{1}{2} R \sin (2 \beta _0) \frac{\zeta \sqrt{aR}}{(a+R)^2}\frac{ \sin (2\beta _0)}{1-m^2 \sin ^2 \beta _0}\frac{k }{\sqrt{1-k^2\sin ^2 \beta _0}}\\ \frac{\partial g }{\partial \theta } = -R \cos (2 \beta _0) \mathrm{asinh}\frac{a+R \cos (2\beta _0)}{\sqrt{\zeta ^2+R^2 \sin ^2 (2\beta _0)}} \\ \qquad \qquad + \frac{1}{2} R \sin (2 \beta _0) \sqrt{\frac{R}{a}}\frac{[\zeta ^2+R^2 +(a+R)R \cos (2\beta _0)] \sin (2\beta _0)}{\zeta ^2+R^2 \sin ^2 (2\beta _0)}\frac{k}{\sqrt{1-k^2\sin ^2 \beta _0}} \\ \frac{\partial f }{\partial Z} = -\frac{1}{2} \sin (2 \beta _0) \sqrt{\frac{R}{a}} \frac{k}{\sqrt{1-k^2\sin ^2 \beta _0}}\\ \frac{\partial g }{\partial Z} = + \frac{1}{2} \sin (2 \beta _0) \sqrt{\frac{R}{a}} \frac{k}{\sqrt{1-k^2\sin ^2 \beta _0}} \frac{\zeta [a+R\cos (2\beta _0)]}{\zeta ^2+R^2 \sin ^2 (2\beta _0)} \end{array}\right. \end{aligned}$$
(47)

Rights and permissions

Reprints and permissions

About this article

Cite this article

Huré, JM., Trova, A. & Hersant, F. Self-gravity in curved mesh elements. Celest Mech Dyn Astr 118, 299–314 (2014). https://doi.org/10.1007/s10569-014-9535-x

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10569-014-9535-x

Keywords

Navigation