shgrav Module

This module defines functions used for the computation of accelerations based on spherical harmonics representation of the gravitational potential of the central body. It uses the SHTOOLS library https://shtools.github.io/SHTOOLS/


Uses

  • module~~shgrav~~UsesGraph module~shgrav shgrav module~swiftest swiftest module~shgrav->module~swiftest module~base base module~swiftest->module~base module~collision collision module~swiftest->module~collision module~encounter encounter module~swiftest->module~encounter module~globals globals module~swiftest->module~globals module~io_progress_bar io_progress_bar module~swiftest->module~io_progress_bar module~lambda_function lambda_function module~swiftest->module~lambda_function module~laplace_coefficients laplace_coefficients module~swiftest->module~laplace_coefficients module~netcdf_io netcdf_io module~swiftest->module~netcdf_io module~operators operators module~swiftest->module~operators module~solver solver module~swiftest->module~solver module~walltime walltime module~swiftest->module~walltime module~base->module~globals module~coarray coarray module~base->module~coarray module~collision->module~base module~collision->module~encounter module~collision->module~globals module~encounter->module~base module~encounter->module~globals module~encounter->module~netcdf_io iso_c_binding iso_c_binding module~globals->iso_c_binding iso_fortran_env iso_fortran_env module~globals->iso_fortran_env module~io_progress_bar->module~base module~io_progress_bar->module~globals module~lambda_function->module~globals module~laplace_coefficients->module~globals ieee_exceptions ieee_exceptions module~laplace_coefficients->ieee_exceptions module~netcdf_io->module~base module~netcdf_io->module~globals module~operators->module~globals module~solver->module~base module~solver->module~globals module~solver->module~lambda_function module~solver->ieee_exceptions module~walltime->module~base module~walltime->module~globals module~coarray->module~globals

Used by

  • module~~shgrav~~UsedByGraph module~shgrav shgrav module~s_rmvs_step s_rmvs_step module~s_rmvs_step->module~shgrav module~s_shgrav_accel s_shgrav_accel module~s_shgrav_accel->module~shgrav module~s_shgrav_pot s_shgrav_pot module~s_shgrav_pot->module~shgrav module~s_swiftest_obl s_swiftest_obl module~s_swiftest_obl->module~shgrav

Interfaces

interface

  • public module subroutine shgrav_acc(body, nbody_system)

    Arguments

    Type IntentOptional Attributes Name
    class(swiftest_body), intent(inout) :: body

    Swiftest body object

    class(swiftest_nbody_system), intent(inout) :: nbody_system

    Swiftest nbody system object

interface

  • public module subroutine shgrav_g_acc_one(GMcb, r_0, phi_cb, rh, c_lm, g_sph, GMpl, aoblcb)

    Calculate the acceleration terms for one pair of bodies given c_lm, theta, phi, r

    Arguments

    Type IntentOptional Attributes Name
    real(kind=DP), intent(in) :: GMcb

    GMass of the central body

    real(kind=DP), intent(in) :: r_0

    radius of the central body

    real(kind=DP), intent(in) :: phi_cb

    rotation phase angle of the central body

    real(kind=DP), intent(in), dimension(:) :: rh

    distance vector of body

    real(kind=DP), intent(in), dimension(:, :, :) :: c_lm

    Spherical Harmonic coefficients

    real(kind=DP), intent(out), dimension(NDIM) :: g_sph

    acceleration vector

    real(kind=DP), intent(in), optional :: GMpl

    Mass of input body if it is not a test particle

    real(kind=DP), intent(inout), optional, dimension(:) :: aoblcb

    Barycentric acceleration of central body (only for massive input b

interface

  • public module subroutine shgrav_pot_system(self)

    Arguments

    Type IntentOptional Attributes Name
    class(swiftest_nbody_system), intent(inout) :: self

    Swiftest nbody system object