gravity_r_radpressure

Module

Description

$Id$

Radial gravity

** AUTOMATIC CPARAM.INC GENERATION ************************ Declare (for generation of cparam.inc) the number of f array variables and auxiliary variables added by this module

CPARAM logical, parameter :: lgrav = .true.

MVAR CONTRIBUTION 0 MAUX CONTRIBUTION 0 MGLOBAL CONTRIBUTION 3

PENCILS PROVIDED gg(3)


Quick access

Variables:

acceleration, acceleration_penc, acceleration_penc_1d, acceleration_point, accretor_grav, accretor_rsoft, accretor_speed, calc_diagnostics_gravity, cdt_accretor, cpot, cpot2, cs0hs, dgravx, dustbeta, enum_grav_type, enum_gravx_profile, enum_gravy_profile, enum_gravz_profile, enum_ipotential_secondary, enum_iramp_function, g0, g01, g4pi, g_a, g_a_cgs, g_a_factor, g_b, g_b_cgs, g_b_factor, g_c, g_c_cgs, g_c_factor, g_d, g_d_cgs, g_d_factor, g_e, g_e_cgs, g_e_factor, g_f, g_f_cgs, g_f_factor, g_ref, get_gravity_field, grav_amp, grav_tilt, grav_type, gravity_sphersym, gravx_xpencil, gravx_xpencil_0, gravy, gravy_profile, gravy_ypencil, gravz_const, gravz_zpencil, gsum, h0hs, idiag_epot, idiag_epotmx, idiag_epotmxy, idiag_epotmy, idiag_epotmz, idiag_epottot, idiag_epotuxmx, idiag_epotuxmxy, idiag_epotuzmz, idiag_fgravx, idiag_rgxm, idiag_rugm, idiag_torque, idiag_ugm, idiag_wgrav, indirect_plus_inertial_terms, interpolate_grav_profile, ipotential, ipotential_secondary, iramp_function, kaccretor, kappa_x1, kappa_x2, kappa_z1, kappa_z2, ky_gg, laccretor_peri, ladjust_sphersym, lboussinesq_grav, lcalc_zinfty, lcentrifugal_force_gravity, lconservative_gravity, lcoriolis_force_gravity, lgravity_dust, lgravity_gas, lgravity_neutrals, lindirect_terms, lnrho_bot, lnrho_top, lnumerical_equilibrium, lxyzdependence, mass_cent_body, n_adjust_sphersym, n_pot1, non_conservative_gravity, non_conservative_index, nux_epicycle, nux_epicycle2, pot_ratio, potential, potential_global, potential_penc, potential_point, potx_const, potx_xpencil, poty_const, poty_ypencil, potz_const, potz_zpencil, r1_pot1, rampup_secondary_mass, read_grav_profile, reduced_top, rgal, rp1_pot, rp1_smooth1, rpot, rsol, rsol_cgs, secondary_body_gravity, sphere_rad, ss_bot, ss_top, t1_ramp_mass, xdep, xgrav, xinfty, xref, ygrav, yinfty, z1, z2, zclip, zdep, zgrav, zinfty, zref

Routines:

addgravity(), calc_diagnostics_gravity(), calc_pencils_gravity(), compute_gravity_star(), get_xgravity(), gravity_after_boundary(), init_gg(), initialize_gravity(), is_constant_zgrav(), pencil_criteria_gravity(), pencil_interdep_gravity(), read_gravity_init_pars(), read_gravity_run_pars(), register_gravity(), rprint_gravity(), set_consistent_gravity(), write_gravity_init_pars(), write_gravity_run_pars()

Needed modules

Variables

  • gravity/acceleration [public]
  • gravity/acceleration_penc [private]
  • gravity/acceleration_penc_1d [private]
  • gravity/acceleration_point [private]
  • gravity/calc_diagnostics_gravity [public]
  • gravity/cpot (5,ninit) [real,private/optional/default=0.]
  • gravity/dustbeta (ndustspec) [real,private/optional/default=0.0]
  • gravity/g0 [real,public/optional/default=0.0]
  • gravity/g01 (ninit) [real,private/optional/default=0.]
  • gravity/g1 [real,private/optional/default=0.0]
  • gravity/get_gravity_field [private]
  • gravity/gravz [real,public/optional/default=0.0]
  • gravity/gravz_const [real,public/optional/default=1.0]
  • gravity/gravz_profile [character,public/optional/default='zero']
  • gravity/gsum [real,private/target/optional/default=0.0]
  • gravity/iglobal_gg [integer,private/optional/default=0]
  • gravity/indirect_plus_inertial_terms [private]
  • gravity/ionbeta [real,private/optional/default=0.0]
  • gravity/ipotential (ninit) [character,private/optional/default='zero']
  • gravity/lgravity_dust [logical,private/optional/default=.true.]
  • gravity/lgravity_gas [logical,private/optional/default=.true.]
  • gravity/lgravity_neutrals [logical,private/optional/default=.true.]
  • gravity/lindirect_terms [logical,private/optional/default=.false.]
  • gravity/lnrho_bot [real,public]
  • gravity/lnrho_top [real,public]
  • gravity/lnumerical_equilibrium [logical,public/optional/default=.false.]
  • gravity/lramp_mass [logical,private/optional/default=.false.]
  • gravity/n_pot [real,private/optional/default=10]
  • gravity/n_pot1 [real,private/optional/default=10]
  • gravity/nu_epicycle [real,public/optional/default=1.0]
  • gravity/potential [public]
  • gravity/potential_global [private]
  • gravity/potential_penc [private]
  • gravity/potential_point [private]
  • gravity/qgshear [real,private/optional/default=1.5]
  • gravity/r0_pot [real,private/optional/default=0.0]
  • gravity/r1_pot1 [real,private/optional/default=0.0]
  • gravity/reduced_top [real,public/optional/default=1.0]
  • gravity/rp1 [real,private]
  • gravity/rp1_pot [real,private/optional/default=0.0]
  • gravity/rpot (ninit) [real,private/optional/default=0.]
  • gravity/secondary_body_gravity [private]
  • gravity/ss_bot [real,public]
  • gravity/ss_top [real,public]
  • gravity/t1_ramp_mass [real,private]
  • gravity/t_ramp_mass [real,private/optional/default=impossible]
  • gravity/z1 [real,public]
  • gravity/z2 [real,public]
  • gravity/zgrav [real,public]
  • gravity/zinfty [real,public]
  • gravity/zref [real,public]

Subroutines and functions

subroutine  gravity/register_gravity()

initialise gravity flags

10-jan-02/wolf: coded

Identify version number.

Use :

farraymanager (farray_register_global())

Call to:

svn_id(), fatal_error(), stop_it(), get_radial_distance(), not_implemented(), erfunc(), is_constant_zgrav()

subroutine  gravity/initialize_gravity(f)

Set up cpot according to the value of ipotential, and initialize the global variable gg (gravity field). Needed by both start.f90 and run.f90

16-jul-02/wolf: coded 22-nov-02/tony: renamed 15-mar-07/wlad: made it coordinate-independent

Parameters:

f (mx,my,mz,mfarray) [real]

Use :

sub (poly(), step(), get_radial_distance()), mpicomm, sharedvariables (put_shared_variable())

Call to:

fatal_error(), stop_it(), get_radial_distance(), not_implemented(), erfunc(), is_constant_zgrav()

subroutine  gravity/read_gravity_init_pars(iomsg)
Parameters:

iomsg [character,out]

Use :

file_io (parallel_unit())

Call to:

stop_it(), not_implemented(), fatal_error(), get_radial_distance(), erfunc(), is_constant_zgrav()

subroutine  gravity/write_gravity_init_pars(unit)
Parameters:

unit [integer,in]

Call to:

stop_it(), not_implemented(), fatal_error(), get_radial_distance(), erfunc(), is_constant_zgrav()

subroutine  gravity/read_gravity_run_pars(iomsg)
Parameters:

iomsg [character,out]

Use :

file_io (parallel_unit())

Call to:

stop_it(), not_implemented(), fatal_error(), get_radial_distance(), erfunc(), is_constant_zgrav()

subroutine  gravity/write_gravity_run_pars(unit)
Parameters:

unit [integer,in]

Call to:

stop_it(), not_implemented(), fatal_error(), get_radial_distance(), erfunc(), is_constant_zgrav()

subroutine  gravity/init_gg(f)

initialise gravity; called from start.f90 10-jan-02/wolf: coded 24-nov-02/tony: renamed from init_grav for consistancy (i.e. init_[variable name])

Parameters:

f (mx,my,mz,mfarray) [real]

Call to:

stop_it(), not_implemented(), fatal_error(), get_radial_distance(), erfunc(), is_constant_zgrav()

subroutine  gravity/pencil_criteria_gravity()

All pencils that the Gravity module depends on are specified here.

20-11-04/anders: coded

Call to:

stop_it(), not_implemented(), fatal_error(), get_radial_distance(), erfunc(), is_constant_zgrav()

subroutine  gravity/pencil_interdep_gravity(lpencil_in)

Interdependency among pencils from the Gravity module is specified here.

20-11-04/anders: coded

Parameters:

lpencil_in (npencils) [logical]

Call to:

stop_it(), not_implemented(), fatal_error(), get_radial_distance(), erfunc(), is_constant_zgrav()

subroutine  gravity/calc_pencils_gravity(f, p)

Calculate Gravity pencils. Most basic pencils should come first, as others may depend on them.

12-nov-04/anders: coded

Parameters:
Use :

farraymanager (farray_use_global())

Call to:

stop_it(), not_implemented(), fatal_error(), get_radial_distance(), erfunc(), is_constant_zgrav()

subroutine  gravity/addgravity(df, p)

add duu/dt according to gravity

10-jan-02/wolf: coded

Parameters:
  • df (mx,my,mz,mvar) [real]

  • p [pencil_case]

Call to:

stop_it(), not_implemented(), fatal_error(), get_radial_distance(), erfunc(), is_constant_zgrav()

subroutine  gravity/gravity_after_boundary(f)

For actions outside mn-loop.

9-jun-15/MR: coded

Parameters:

f (mx,my,mz,mfarray) [real]

Call to:

stop_it(), not_implemented(), fatal_error(), get_radial_distance(), erfunc(), is_constant_zgrav()

subroutine  gravity/rprint_gravity(lreset[, lwrite])

reads and registers print parameters relevant for gravity advance dummy routine

26-apr-03/axel: coded

Parameters:
  • lreset [logical]

  • lwrite [logical]

Use :

farraymanager (farray_index_append())

Call to:

get_radial_distance(), erfunc(), is_constant_zgrav()

subroutine  gravity/compute_gravity_star(f, wheat, luminosity, star_cte)

Compute the global gravity field for a star-in-a-box with a central heating 05-jan-2010/dintrans: coded

Parameters:
  • f (mx,my,mz,mfarray) [real]

  • wheat [real]

  • luminosity [real]

  • star_cte [real]

Use :

sub (get_radial_distance(), erfunc())

Call to:

get_radial_distance(), erfunc(), is_constant_zgrav()

subroutine  gravity/get_xgravity(xgrav)

Dummy routine for getting the gravity profile into the intial conditions

04-oct-10/bing: coded

Parameters:

xgrav (nx) [real]

Call to:

is_constant_zgrav()

subroutine  gravity/set_consistent_gravity(ginput, gtype, gprofile, lsuccess)

Dummy routine

Parameters:
  • ginput [real]

  • gtype [character]

  • gprofile [character]

  • lsuccess [logical]

Call to:

is_constant_zgrav()

function  gravity/is_constant_zgrav()

14-apr-15/MR: coded

Return:

is_constant_zgrav [logical]

subroutine  gravity/pushpars2c(p_par)
Parameters:

p_par (0) [integer]

Use :

syscalls (copy_addr())