density_profiles
Module
Description
This computes several radial density profiles useful for stars and gravitational collapse calculations, including
uniform
polytrope
piecewise polytrope
Evrard
Bonnor-Ebert sphere
- References:
Evrard (1988), MNRAS 235, 911-934
- Owner:
Daniel Price
- Runtime parameters:
None
- Dependencies:
physcon, prompting, units
Quick access
- Variables:
- Routines:
calc_mass_enc()
,prompt_beparameters()
,rho_bonnorebert()
,rho_evrard()
,rho_piecewise_polytrope()
,rho_polytrope()
,rho_uniform()
Needed modules
Variables
- rho_profile/integrate_rho_profile [private]
Subroutines and functions
- subroutine rho_profile/rho_uniform(ng, mass, radius, rtab, rhotab)
- Parameters:
ng [integer,in]
mass [real,in]
radius [real,in]
rtab (*) [real,out]
rhotab (*) [real,out]
- subroutine rho_profile/rho_polytrope(gamma, polyk, mstar, rtab, rhotab, npts[, rhocentre[, set_polyk[, rstar]]])
- Parameters:
gamma [real,in]
polyk [real,inout]
mstar [real,in]
rtab (*) [real,inout]
rhotab (size(rtab) [real,out]
npts [integer,out]
rhocentre [real,out,]
set_polyk [logical,in,]
rstar [real,inout,]
- subroutine rho_profile/rho_piecewise_polytrope(rtab, rhotab, rhocentre, mstar_in, get_dpdrho, npts, ierr)
- Parameters:
rtab (*) [real,out]
rhotab (*) [real,out]
rhocentre [real,out]
mstar_in [real,in]
get_dpdrho [real]
npts [integer,out]
ierr [integer,out]
- Call to:
- subroutine rho_profile/calc_mass_enc(npts, rtab, rhotab[, mtab[, mstar]])
- Parameters:
npts [integer,in]
rtab (*) [real,in]
rhotab (*) [real,in]
mtab (*) [real,out,]
mstar [real,out,]
- Called from:
- subroutine rho_profile/rho_evrard(ng, mass, radius, rtab, rhotab)
- Parameters:
ng [integer,in]
mass [real,in]
radius [real,in]
rtab (*) [real,out]
rhotab (*) [real,out]
- subroutine rho_profile/rho_bonnorebert(ibeparam, central_density, edge_density, rbe, xbe, mbe, facbe, csbe, gmw, npts, ibelast, rtab, rhotab, ierr)
- Parameters:
ibeparam [integer,in]
central_density [real,inout]
edge_density [real,out]
rbe [real,inout]
xbe [real,inout]
mbe [real,inout]
facbe [real,inout]
csbe [real,in]
gmw [real,in]
npts [integer,in]
ibelast [integer,out]
rtab (*) [real,out] :: array of radii
rhotab (*) [real,out] :: initial normalised density
ierr [integer,out]
- Use :
physcon
(au()
,pc()
,mass_proton_cgs()
,solarm()
),units
(umass()
,udist()
)
- subroutine rho_profile/prompt_beparameters(ibeparam, rho_cen, rad_phys, rad_norm, mass_phys, fac, umass, udist, au, solarm)
- Parameters:
ibeparam [integer,out]
rho_cen [real,out]
rad_phys [real,out]
rad_norm [real,out]
mass_phys [real,out]
fac [real,out] :: This might need to be removed
umass [real,in] :: convert to code units
udist [real,in]
au [real,in]
solarm [real,in]
- Use :
prompting
(prompt()
)