org.gjt.universe.accrete
Class Star

java.lang.Object
  |
  +--org.gjt.universe.accrete.AccreteObject
        |
        +--org.gjt.universe.accrete.Blackbody
              |
              +--org.gjt.universe.accrete.Star
All Implemented Interfaces:
PhysicalConstants

public class Star
extends Blackbody
implements PhysicalConstants

Implements a Star object for building alternative solar systems.

Copyright information

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.

Acknowledgements

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
 
Fields inherited from interface org.gjt.universe.accrete.PhysicalConstants
A1_20, A2_20, AIRLESS_ICE_ALBEDO, ALPHA, AMMONIA, ANGSTROM, ARGON, ATOMIC_HYDROGEN, ATOMIC_NITROGEN, ATOMIC_OXYGEN, BETA_20, BK, CARBON_DIOXIDE, CARBON_MONOXIDE, CHANGE_IN_EARTH_ANG_VEL, CLOUD_ALBEDO, CLOUD_COVERAGE_FACTOR, CM_PER_AU, CM_PER_KM, CM_PER_METER, CO2, DAYS_IN_A_YEAR, DEG_TO_RAD, DUST_DENSITY_COEFF, EARTH_ACCELERATION, EARTH_ALBEDO, EARTH_AXIAL_TILT, EARTH_CONVECTION_FACTOR, EARTH_DENSITY, EARTH_EFFECTIVE_TEMP, EARTH_EXOSPHERE_TEMP, EARTH_MASS_IN_GRAMS, EARTH_RADIUS, EARTH_SURF_PRES_IN_MILLIBARS, EARTH_WATER_MASS_PER_AREA, ECCENTRICITY_COEFF, FREEZING_POINT_OF_WATER, G, GAS_GIANT_ALBEDO, GAS_RETENTION_THRESHOLD, GRAV_CONSTANT, H2, H2O, HELIUM, HYDROGEN_SULPHIDE, ICE_ALBEDO, INCREDIBLY_LARGE_NUMBER, J, K, KELVIN_CELCIUS_DIFFERENCE, KM_EARTH_RADIUS, KM_PER_AU, KRYPTON, MEARTH, METHANE, MH, MILLIBARS_PER_BAR, MOL_HYDROGEN, MOL_NITROGEN, MOL_OXYGEN, MOLAR_GAS_CONST, N, N2, NEON, NITRIC_OXIDE, NITROGEN_DIOXIDE, NITROUS_OXIDE, O2, OZONE, PI, Q1_36, Q2_36, RAD_TO_DEG, RADIANS_PER_ROTATION, ROCKY_AIRLESS_ALBEDO, ROCKY_ALBEDO, SECONDS_PER_HOUR, SOLAR_MASS_IN_GRAMS, SULPH_DIOXIDE, SULPH_TRIOXIDE, SUN_MASS_IN_EARTH_MASSES, WATER_ALBEDO, WATER_VAPOR, XENON
 
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

GREENHOUSE_EFFECT_CONST

private static final double GREENHOUSE_EFFECT_CONST
See Also:
Constant Field Values

B

private static final double B
See Also:
Constant Field Values

CLASS_CODE

public static final java.lang.String CLASS_CODE
See Also:
Constant Field Values

OLDSPECT

private static final double[] OLDSPECT

SPECT

private static final double[] SPECT

BC

private static final double[] BC

ST

public int ST

VM

public double VM

LUM

public double LUM

EM

public double EM

SM

public double SM

AU

public double AU

main_seq_life

public double main_seq_life

age

public double age

radius

public double radius

r_ecosphere

public double r_ecosphere

r_greenhouse

public double r_greenhouse
Constructor Detail

Star

public Star(int StellarClassCode)
Makes a new star given the integer 'Class Code'. There are 60 classes which can be handled (B0 through M9); 'O' class stars and non-main-sequence stars are not currently handled.

Parameters:
StellarClassCode - Integer code (0-59) corresponding to stellar class (B0 - M9)

Star

public Star(double StellarMassRatio)
Constructor using the 'starform' star generation method. That method involves a simple selection of stellar mass ratio relative to Sol, which allows the user to focus on stars likely to have habitable planets.

Parameters:
StellarMassRatio - Ratio of star's mass to Sol
Method Detail

classCode

public java.lang.String classCode()
Creates a string representation of the star's 'class code'. For Star objects built with the 'starform'-style constructor, the results are undefined. At some future time, additional code may be added to calculate main sequence class given the stellar mass; that day is not today.


commonConstructor

protected void commonConstructor()
Performs calculations common to both constructors.


MAINSEQ

public double MAINSEQ()
Calculate absolute visual magnitude of a main sequence star given the temperature. Generated from table of stellar magnitudes by fitting to a cubic curve; there are some known problems with the fit, e.g. the curve isn't steep enough at the high and low ends, but I [Carl] don't want to work through it yet again.


LUMINOSITY

public double LUMINOSITY()
Calculates stellar luminosity based on visual magnitude.


MASS

public double MASS()
Calculates stellar mass using mass-luminosity relationship.


RADIUS

public double RADIUS()
Calculates stellar radius using luminosity and temperature. I [Carl] forget where I got this; maybe derived from an astronomy text?


stellar_dust_limit

public double stellar_dust_limit()
Calculates distance to farthest edge of proplyd. I [Carl] am unsure where this calculation is derived from.


nearest_planet

public double nearest_planet()
Calculates distance to nearest possible planetary orbit. I [Carl] am unsure where this calculation is derived from.


farthest_planet

public double farthest_planet()
Calculates distance to farthest possible planetary orbit. I [Carl] am unsure where this calculation is derived from.


critical_limit

public 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.

Parameters:
orb_radius - Semi-major axis of protoplanet
eccentricity - Orbital eccentricity of protoplanet

luminosity

public double luminosity()
Estimates luminosity of star. Probably generated through curve fitting.


orb_zone

public int orb_zone(double orb_radius)
Calculates the 'orbital zone' of a particle (1, 2, or 3) based on distance from the star. Orbital zone is a rough measure of composition for dust particles.

Parameters:
orb_radius - Distance fom star in AU

AUSTAR

public double AUSTAR(double MASS)
Provides an estimation of 1 'Astronomical Unit' for other planets around other stars. Purely invented.

Parameters:
MASS - Mass in Solar masses

AUPLAN

public double AUPLAN(double MASS)
Provides an estimation of 1 'Astronomical Unit' for moons around other planets. Purely invented.

Parameters:
MASS - Mass in Earth masses


Copyright © 2001 Universe Dev Team All Rights Reserved.