|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gjt.universe.accrete.AccreteObject | +--org.gjt.universe.accrete.Blackbody | +--org.gjt.universe.accrete.Star
Implements a Star object for building alternative solar systems.
This Java class is copyright 1998 by Carl Burke. All rights reserved. Substantial sections of this code were previously distributed in different form as part of 'starform' (copyright 1989 Matthew Burdick)
This software is provided absolutely free and without warranty, including but not limited to the implied warranties of merchantability and fitness for a purpose. You may use this code for any legal purpose provided that you do not charge for it; this implies that you may use this code as a component of a commercial system as long as the additional functionality of the commercial system is greater than what this code provides and that the commercial system is not primarily intended as a simulation of solar system formation. In other words, if you want to write a science-fiction computer game that uses the code in this package to build objects which are used in the game, that's great and permitted; if you use this code to make a kickass solar-system-builder, you are not allowed to distribute that software except for free.
You are allowed and encouraged to modify this software, provided that this copyright notice remains intact. This notice may be reformatted, but not removed.
If you do use this software, I and the contributing authors listed
under "Acknowledgements" would appreciate some recognition. If you make
changes, I would appreciate it if you would pass those changes back to me
for possible inclusion in the master. At the time this notice was prepared,
my email address is cburke@mitre.org and the home page for this software is
http://www.geocities.com/Area51/6902/w_accr.html.
Matt Burdick, the author of 'starform' (freeware copyright 1989); much of the code (particularly planetary environments) was adapted from this.
Andrew Folkins, the author of 'accretion' (public domain) for the Amiga; I used chunks of his code when creating my displays.
Ed Taychert of Irony Games, for the algorithm he uses to classify terrestrial planets in his tabular CGI implementation of 'starform'.
Paul Schlyter, who provided information about computing planetary positions.
Field Summary | |
double |
age
|
double |
AU
|
private static double |
B
|
private static double[] |
BC
|
static java.lang.String |
CLASS_CODE
|
double |
EM
|
private static double |
GREENHOUSE_EFFECT_CONST
|
double |
LUM
|
double |
main_seq_life
|
private static double[] |
OLDSPECT
|
double |
r_ecosphere
|
double |
r_greenhouse
|
double |
radius
|
double |
SM
|
private static double[] |
SPECT
|
int |
ST
|
double |
VM
|
Fields inherited from class org.gjt.universe.accrete.Blackbody |
SIGMA, TEMP |
Fields inherited from class org.gjt.universe.accrete.AccreteObject |
cr |
Constructor Summary | |
Star(double StellarMassRatio)
Constructor using the 'starform' star generation method. |
|
Star(int StellarClassCode)
Makes a new star given the integer 'Class Code'. |
Method Summary | |
double |
AUPLAN(double MASS)
Provides an estimation of 1 'Astronomical Unit' for moons around other planets. |
double |
AUSTAR(double MASS)
Provides an estimation of 1 'Astronomical Unit' for other planets around other stars. |
java.lang.String |
classCode()
Creates a string representation of the star's 'class code'. |
protected void |
commonConstructor()
Performs calculations common to both constructors. |
double |
critical_limit(double orb_radius,
double eccentricity)
Calculates the mass at which a protoplanet orbiting this star will accrete gas as well as dust. |
double |
farthest_planet()
Calculates distance to farthest possible planetary orbit. |
double |
luminosity()
Estimates luminosity of star. |
double |
LUMINOSITY()
Calculates stellar luminosity based on visual magnitude. |
double |
MAINSEQ()
Calculate absolute visual magnitude of a main sequence star given the temperature. |
double |
MASS()
Calculates stellar mass using mass-luminosity relationship. |
double |
nearest_planet()
Calculates distance to nearest possible planetary orbit. |
int |
orb_zone(double orb_radius)
Calculates the 'orbital zone' of a particle (1, 2, or 3) based on distance from the star. |
double |
RADIUS()
Calculates stellar radius using luminosity and temperature. |
double |
stellar_dust_limit()
Calculates distance to farthest edge of proplyd. |
Methods inherited from class org.gjt.universe.accrete.Blackbody |
E, EMIT, IREMIT, UVEMIT, VISEMIT |
Methods inherited from class org.gjt.universe.accrete.AccreteObject |
about, LognormalDeviate, nextDouble, NormalDeviate, random_eccentricity, random_number |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final double GREENHOUSE_EFFECT_CONST
private static final double B
public static final java.lang.String CLASS_CODE
private static final double[] OLDSPECT
private static final double[] SPECT
private static final double[] BC
public int ST
public double VM
public double LUM
public double EM
public double SM
public double AU
public double main_seq_life
public double age
public double radius
public double r_ecosphere
public double r_greenhouse
Constructor Detail |
public Star(int StellarClassCode)
StellarClassCode
- Integer code (0-59) corresponding to stellar
class (B0 - M9)public Star(double StellarMassRatio)
StellarMassRatio
- Ratio of star's mass to SolMethod Detail |
public java.lang.String classCode()
protected void commonConstructor()
public double MAINSEQ()
public double LUMINOSITY()
public double MASS()
public double RADIUS()
public double stellar_dust_limit()
public double nearest_planet()
public double farthest_planet()
public double critical_limit(double orb_radius, double eccentricity)
orb_radius
- Semi-major axis of protoplaneteccentricity
- Orbital eccentricity of protoplanetpublic double luminosity()
public int orb_zone(double orb_radius)
orb_radius
- Distance fom star in AUpublic double AUSTAR(double MASS)
MASS
- Mass in Solar massespublic double AUPLAN(double MASS)
MASS
- Mass in Earth masses
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |