Documentation from the file
polytrope/0.8/idl/test_le1.pro
| Routine |
Name: test_le1
Description:
This IDL pro accepts a polytropic index in the range [0.,4.999999] and
solves the Lane-Emden equation numerically
using fourth order Runge Kutta techniques. The
output is a structure of arrays which are the scaled quantities related
to the polytrope.
Syntax:
test_le1, nn, polytrope
Input:nn:
nn is a floating_point in the range [0.,4.999999].
Output:polytrope:
polytrope is an IDL structure of arrays and values described in the
items below.
polytrope.xsi is an IDL dblarr which is the
dimensionless distance variable
in the Lane-Endem equation. It is defined by xsi=r/a where "a"
is a unit of length suitable for a polytrope.
polytrope.phi is an IDL dblarr that
represents the scaled mass density.
phi is defined as follows: mass density equals a constant lambda
times phi raised to the power n, where n is the polytropic index
in the range [0.,4.999999] and lambda is a
scaling parameter identified
by the central desity of the star, thereby normalizing the function
phi to unity at the center
polytrope.dphi is an IDL dblarr which is the derivative
of phi with respect to xsi.
polytrope.rho is an IDL dblarr which is phi raised to the nth power.
It represents a scaled mass density.
polytrope.press is an IDL ablarr which is rho raised to the
gamma power. gamma is the the ratio of specific heats and
defines the equation of state
of the polytrope. gamma equals (n+1)/n where n is the polytropic
index. press represents a scaled pressure.
polytrope.x is an IDL dblarr which is xsi divided by root.
root is the root
of the Lane-Emden equation and describes the radius of the
polytrope. x represents a scaled distance variable.
polytrope.nn is an IDL floating_point and is the polytropic index.
polytrope.xsi1 is an IDL floating_point and is the first root of the
normalized Lane-Emden equation
polytrope.dphixsi1 is an IDL floating_point and is dphi evaluated
at xsi1, the first root of the normalized Lane-Emden equation.
polytrope.rc is an IDL floating_point and is the ratio of mean
density to the central density. It is given by -(3/xsi1) times
dphixsi1.
lane:
lane is a common block that contains n, the polytropic index in the
range [0,4.999999].
Example:
The following IDL command-line example prints out
the ratio of mean density to central
density of a polytrope of index 3:
test_le1, 3., polytrope
print, polytrope.rc
|
-top-
|