source terms module for gravitational acceleration due to a point mass at the center of the coordinate system More...
Data Types | |
type | gravity_pointmass |
Functions/Subroutines | |
subroutine | initgravity_pointmass (this, Mesh, Physics, config, IO) |
constructor for point mass module More... | |
subroutine | calcpotential (this, Mesh, Physics, mass, dist, dist_faces, pot) |
subroutine | infogravity (this) |
subroutine | setoutput (this, Mesh, Physics, config, IO) |
subroutine | updategravity_single (this, Mesh, Physics, Fluxes, pvar, time, dt) |
updates the gravitational acceleration of the pointmass module More... | |
pure subroutine | calcdiskheight_single (this, Mesh, Physics, pvar, bccsound, h_ext, height) |
computes pressure scale height of a geometrically thin Keplerian disk More... | |
subroutine | finalize (this) |
elemental real function, public | getdiskheight (cs, omega) |
return pressure scale height of a geometrically thin Keplerian disk More... | |
Variables | |
character(len=16), dimension(2), parameter | potential_name = (/ "Newton ", "Paczynski-Wiita " /) |
integer, parameter, public | newton = 1 |
integer, parameter, public | wiita = 2 |
Detailed Description
source terms module for gravitational acceleration due to a point mass at the center of the coordinate system
Function/Subroutine Documentation
◆ calcdiskheight_single()
pure subroutine gravity_pointmass_mod::calcdiskheight_single | ( | class(gravity_pointmass), intent(inout) | this, |
class(mesh_base), intent(in) | Mesh, | ||
class(physics_base), intent(in) | Physics, | ||
class(marray_compound), intent(inout) | pvar, | ||
type(marray_base), intent(inout) | bccsound, | ||
type(marray_base), intent(inout) | h_ext, | ||
type(marray_base), intent(inout) | height | ||
) |
computes pressure scale height of a geometrically thin Keplerian disk
(see getdiskheight )
Definition at line 456 of file gravity_pointmass.f90.

◆ calcpotential()
subroutine gravity_pointmass_mod::calcpotential | ( | class(gravity_pointmass) | this, |
class(mesh_base), intent(in) | Mesh, | ||
class(physics_base), intent(in) | Physics, | ||
real | mass, | ||
real, dimension(mesh%igmin:mesh%igmax,mesh%jgmin:mesh%jgmax,mesh%kgmin:mesh%kgmax), intent(in) | dist, | ||
real, dimension(mesh%igmin:mesh%igmax,mesh%jgmin:mesh%jgmax,mesh%kgmin:mesh%kgmax,3), intent(in) | dist_faces, | ||
real, dimension(mesh%igmin:mesh%igmax,mesh%jgmin:mesh%jgmax,mesh%kgmin:mesh%kgmax,4), intent(out) | pot | ||
) |
Definition at line 303 of file gravity_pointmass.f90.
◆ finalize()
|
private |
Definition at line 469 of file gravity_pointmass.f90.
◆ getdiskheight()
elemental real function, public gravity_pointmass_mod::getdiskheight | ( | real, intent(in) | cs, |
real, intent(in) | omega | ||
) |
return pressure scale height of a geometrically thin Keplerian disk
The pressure scale height for an geometrically thin Keplerian disk is given by
\[ h = c_s / \Omega \]
where \( c_s \) is the local speed of sound and \( \Omega \) is the local Keplerian angular velocity (see [42] ).
Definition at line 504 of file gravity_pointmass.f90.


◆ infogravity()
|
private |
Definition at line 325 of file gravity_pointmass.f90.
◆ initgravity_pointmass()
subroutine gravity_pointmass_mod::initgravity_pointmass | ( | class(gravity_pointmass), intent(inout) | this, |
class(mesh_base), intent(in) | Mesh, | ||
class(physics_base), intent(in) | Physics, | ||
type(dict_typ), pointer | config, | ||
type(dict_typ), pointer | IO | ||
) |
constructor for point mass module
Initializes several data arrays including the local Keplerian angular velocity
\[ \Omega = \sqrt{\frac{GM}{r(r-a)^2}} \]
with \( a=0 \) for Newtonian gravity and \( a=R_s \) set to the Schwarzschild radius for pseudo-Newtonian Paczynski-Wiita potential. The gravitational acceleration is given by
\[ \vec{g} = -\frac{d\Phi}{dr} \hat{e}_r = -\frac{GM}{(r-a)^2} \vec{r}/r = -\Omega^2 \vec{r} \]
Definition at line 132 of file gravity_pointmass.f90.
◆ setoutput()
|
private |
Definition at line 354 of file gravity_pointmass.f90.
◆ updategravity_single()
subroutine gravity_pointmass_mod::updategravity_single | ( | class(gravity_pointmass), intent(inout) | this, |
class(mesh_base), intent(in) | Mesh, | ||
class(physics_base), intent(in) | Physics, | ||
class(fluxes_base), intent(in) | Fluxes, | ||
class(marray_compound), intent(inout) | pvar, | ||
real, intent(in) | time, | ||
real, intent(in) | dt | ||
) |
updates the gravitational acceleration of the pointmass module
The acceleration may not change at all if accretion and/or the switchon procedure is disabled. In that case this subroutine does nothing, because appropriate values have already been set in initgravity_pointmass .
Definition at line 383 of file gravity_pointmass.f90.
Variable Documentation
◆ newton
integer, parameter, public gravity_pointmass_mod::newton = 1 |
Definition at line 74 of file gravity_pointmass.f90.
◆ potential_name
|
private |
Definition at line 71 of file gravity_pointmass.f90.
◆ wiita
integer, parameter, public gravity_pointmass_mod::wiita = 2 |
Definition at line 75 of file gravity_pointmass.f90.