org.gjt.universe.accrete
Class Planet

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

public class Planet
extends Blackbody
implements PhysicalConstants

This class provides an object representing a planetary body, complete with atmosphere. Two separate sets of methods are provided. The first set is empirical, usually simplistic, and built for use in various games I was experimenting with at the time. The second set is based more on physics, using calculations presented in journals such as Icarus.

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 a
           
 double age
           
 double airless_ice_factor
           
 double airless_rock_factor
           
 double albedo
           
 double avg_temp
           
 int axial_tilt
           
 double boil_point
           
protected static int CHAOTIC_ITERATIONS
           
 double cloud_cover
           
 double cloud_factor
           
 double day
           
 double density
           
 double e
           
 double esc_velocity
           
 Planet first_moon
           
 boolean gas_giant
           
 double GCO2
           
 double GH2
           
 double GH2O
           
 double GN2
           
 double GO2
           
 boolean greenhouse_effect
           
 double hydrosphere
           
 double ice_cover
           
 double ice_factor
           
 int its
           
 double mass
           
 double max_temp
           
 double min_temp
           
 double molec_weight
           
 Planet next_planet
           
 double orb_period
           
 int orbit_zone
           
 char plan_class
           
 double r_ecosphere
           
 double radius
           
 double resonance
           
 int resonant_period
           
 double rms_velocity
           
 double rock_factor
           
 double stell_mass_ratio
           
 double surf_accel
           
 double surf_grav
           
 double surf_pressure
           
 double surf_temp
           
 boolean temp_unstable
           
 double volatile_gas_inventory
           
 double water_factor
           
 double where_in_orbit
           
 
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, B, 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, GREENHOUSE_EFFECT_CONST, 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
Planet(double AuDist, double EM, double SM)
          Simplistic constructor, intended for use with Bode's Law routines
Planet(Protoplanet p)
          Constructor from an accreted protoplanet.
 
Method Summary
 double acceleration(double mass, double radius)
          Calculates the surface acceleration of a Planet.
 double boiling_point()
          Calculates the boiling point of water in this planet's atmosphere, stored in millibars.
 char classify_by_accretion()
          Generates a rough-and-ready calculation into Terrestrial and Gas Giant categories based on whether the protoplanet accreted gas.
 char classify_by_temperature()
          Generates a rough-and-ready calculation into Terrestrial and Gas Giant categories based on temperature.
 double cloud_fraction()
          Given the surface temperature of a Planet (in Kelvin), this function returns the fraction of cloud cover available.
private  void computeAtmosphere()
           
 double day_length(double mass, double radius, double eccentricity, double density, double orb_radius, double orb_period, boolean giant)
          Estimates length of the planet's day.
 double density_by_temperature(char PLAN_CLASS)
          Estimates planetary density by planetary class, randomly distributed around central values.
 double eff_temp(double ecosphere_radius)
          Calculates effective temperature of the planet, based on semi-major axis, albedo, and provided ecosphere radius.
 double empirical_density(double mass, double orb_radius, boolean gas_giant)
          Empirically determine density based on distance from primary.
 double escape_vel(double mass, double radius)
          This function implements the escape velocity calculation.
 double farthest_moon()
          Calculates distance to farthest moon, if any.
 double gas_retention(double WT, double TEMP, double MASS, double RAD)
          Calculates the approximate ratio (from none to all) of a gas which is retained in the atmosphere of this planet.
 double gravity(double acceleration)
          Calculates the surface gravity of the planet.
 double green_rise(double optical_depth, double effective_temp)
          Calculates the rise in temperature due to greenhouse effect.
 boolean grnhouse(int zone, double orb_radius, double r_greenhouse)
          Determines if the planet suffers from runaway greenhouse effect.
 double hydro_fraction()
          Calculates the fraction of planet surface covered by water.
 double ice_fraction()
          Given the surface temperature of a Planet (in Kelvin), this function returns the fraction of the Planet's surface covered by ice.
 int inclination(double orb_radius)
          Estimates planetary inclination (axial tilt).
 void iterate_surface_temp()
          Iteratively calculates the temperature of the atmosphere.
 double kothari_radius(double mass, boolean giant, int zone)
          Calculates the equatorial radius of the planet given mass, 'zone', and whether it's a gas giant or not.
 double mass_by_integration(double MASS, double DIST, char PLAN_CLASS)
          Determines planetary mass through a quick 'accretion' of mass within a portion of a disc.
 double molecule_limit(double mass, double equat_radius)
          Calculates the smallest molecular weight retained by the body, which is useful for determining the atmosphere composition.
 double nearest_moon()
          Calculates distance to closest moon, if any.
 double new_planet_albedo()
          Calculates the albedo of the planet, which is the fraction of light reflected rather than absorbed.
 double opacity()
          This function returns the dimensionless quantity of optical depth, which is useful in determining the amount of greenhouse effect on a Planet.
 double period(double separation, double small_mass, double large_mass)
          Calculates orbital period (year) of the two bodies.
 double PESCAPE(double MASS, double RADIUS)
          Calculates 'escape energy'.
 double planet_albedo()
          Calculates the albedo of the planet, which is the fraction of light reflected rather than absorbed.
 double planet_radius(double MASS, double DENSITY, char PLAN_CLASS)
          Returns radius of the planet in kilometers.
 double planet_temperature(double DIST, double LUM)
          Estimates blackbody temperature of a planet.
 double pressure(double equat_radius, double gravity)
          Calculates surface pressure on this planet.
 double rms_vel(double molecular_weight, double orb_radius)
          Calculates Root Mean Square (RMS) velocity of a molecule or atom.
 void set_vital_stats(double smr, double r_gr, double r_ec, double age)
          Calculates planetary characteristics.
 double surface_gravity(double MASS, double RAD)
          Calculates surface gravity in cm/sec^2
 double vol_inventory(double mass, double escape_vel, double rms_vel, double stellar_mass, int zone, boolean greenhouse_effect)
          Calculates the unitless 'volatile gas inventory'.
 double volume_density(double mass, double equat_radius)
          Calculates average density of body, given mass and radius.
 double volume_radius(double mass, double density)
          Calculates radius based on volume, calibrated to Earth.
 
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

a

public double a

e

public double e

where_in_orbit

public double where_in_orbit

mass

public double mass

gas_giant

public boolean gas_giant

orbit_zone

public int orbit_zone

radius

public double radius

density

public double density

orb_period

public double orb_period

day

public double day

resonant_period

public int resonant_period

axial_tilt

public int axial_tilt

esc_velocity

public double esc_velocity

surf_accel

public double surf_accel

surf_grav

public double surf_grav

rms_velocity

public double rms_velocity

molec_weight

public double molec_weight

volatile_gas_inventory

public double volatile_gas_inventory

GH2

public double GH2

GH2O

public double GH2O

GN2

public double GN2

GO2

public double GO2

GCO2

public double GCO2

surf_pressure

public double surf_pressure

greenhouse_effect

public boolean greenhouse_effect

boil_point

public double boil_point

albedo

public double albedo

surf_temp

public double surf_temp

min_temp

public double min_temp

max_temp

public double max_temp

avg_temp

public double avg_temp

hydrosphere

public double hydrosphere

cloud_cover

public double cloud_cover

ice_cover

public double ice_cover

plan_class

public char plan_class

next_planet

public Planet next_planet

first_moon

public Planet first_moon

r_ecosphere

public double r_ecosphere

resonance

public double resonance

stell_mass_ratio

public double stell_mass_ratio

age

public double age

cloud_factor

public double cloud_factor

water_factor

public double water_factor

rock_factor

public double rock_factor

airless_rock_factor

public double airless_rock_factor

ice_factor

public double ice_factor

airless_ice_factor

public double airless_ice_factor

its

public int its

temp_unstable

public boolean temp_unstable

CHAOTIC_ITERATIONS

protected static final int CHAOTIC_ITERATIONS
See Also:
Constant Field Values
Constructor Detail

Planet

public Planet(double AuDist,
              double EM,
              double SM)
Simplistic constructor, intended for use with Bode's Law routines

Parameters:
AuDist - Semi-major axis of orbit in AU
EM - Emission of the star relative to Sol
SM - Stellar mass relative to Sol

Planet

public Planet(Protoplanet p)
Constructor from an accreted protoplanet.

Parameters:
p - Protoplanet that forms the basis of this planet
Method Detail

classify_by_temperature

public final char classify_by_temperature()
Generates a rough-and-ready calculation into Terrestrial and Gas Giant categories based on temperature.


classify_by_accretion

public final char classify_by_accretion()
Generates a rough-and-ready calculation into Terrestrial and Gas Giant categories based on whether the protoplanet accreted gas.


mass_by_integration

public final double mass_by_integration(double MASS,
                                        double DIST,
                                        char PLAN_CLASS)
Determines planetary mass through a quick 'accretion' of mass within a portion of a disc. Gives a mass profile similar to the solar system when used with Bode's Law calculations.

Parameters:
MASS - Mass of primary in Solar masses
DIST - Semi-major axis of orbit in AU
PLAN_CLASS - 'T' or 'G' denoting 'class' of planet

density_by_temperature

public final double density_by_temperature(char PLAN_CLASS)
Estimates planetary density by planetary class, randomly distributed around central values.

Parameters:
PLAN_CLASS - 'T' for Terrestrial, 'G' for Gas Giant

planet_radius

public final double planet_radius(double MASS,
                                  double DENSITY,
                                  char PLAN_CLASS)
Returns radius of the planet in kilometers. Almost identical to 'volume_radius()', but remains here by historical accident.

Parameters:
MASS - Mass in Earth masses
DENSITY - Average density in grams per cubic centimeter
PLAN_CLASS - 'T' for Terrestrial, 'G' for Gas Giant

surface_gravity

public final double surface_gravity(double MASS,
                                    double RAD)
Calculates surface gravity in cm/sec^2

Parameters:
MASS - Mass in Earth masses
RAD - Radius in kilometers

PESCAPE

public final double PESCAPE(double MASS,
                            double RADIUS)
Calculates 'escape energy'. Escape energy was an idea I [Carl] was toying with for a game, and this routine tries to find planetary escape energy in the same units as constant accelleration travel across the star system. Probably not useful to anybody else (and may not be useful to me if I can't find those PBEM notes :)

Parameters:
MASS - Mass in Earth masses
RADIUS - Radius in kilometers

planet_temperature

public final double planet_temperature(double DIST,
                                       double LUM)
Estimates blackbody temperature of a planet. The temperature is calculated for a planet with a given albedo at a specific distance from a primary of the specified luminosity.

Parameters:
DIST - Semi-major axis of orbit in AU
LUM - Luminosity of primary (relative to Sol???)

gas_retention

public final double gas_retention(double WT,
                                  double TEMP,
                                  double MASS,
                                  double RAD)
Calculates the approximate ratio (from none to all) of a gas which is retained in the atmosphere of this planet. Does not attempt to decide just how much gas that really is, or the resulting contribution to atmospheric pressure.

Parameters:
WT - Molecular weight of gas in question
TEMP - Blackbody temperature
MASS - Mass in Earth masses
RAD - Radius in centimeters

computeAtmosphere

private void computeAtmosphere()

volume_radius

public final double volume_radius(double mass,
                                  double density)
Calculates radius based on volume, calibrated to Earth.

Parameters:
mass - Mass in Earth masses
density - Average density in grams per cubic centimeter

kothari_radius

public final double kothari_radius(double mass,
                                   boolean giant,
                                   int zone)
Calculates the equatorial radius of the planet given mass, 'zone', and whether it's a gas giant or not. This formula is listed as eq.9 in Fogg's article, although some typos crop up in that eq. See "The Internal Constitution of Planets", by Dr. D. S. Kothari, Mon. Not. of the Royal Astronomical Society, vol 96 pp.833-843, 1936 for the derivation. Specifically, this is Kothari's eq.23, which appears on page 840.

Parameters:
mass - Mass in Earth masses
giant - True if planet is a gas giant
zone - Orbital zone, 1 to 3

empirical_density

public final double empirical_density(double mass,
                                      double orb_radius,
                                      boolean gas_giant)
Empirically determine density based on distance from primary.

Parameters:
mass - Mass in Earth masses
orb_radius - Semi-major axis of orbit in AU
gas_giant - True if planet is a gas giant

volume_density

public final double volume_density(double mass,
                                   double equat_radius)
Calculates average density of body, given mass and radius.

Parameters:
mass - Mass in Earth masses.
equat_radius - Equatorial radius in kilometers.

period

public final double period(double separation,
                           double small_mass,
                           double large_mass)
Calculates orbital period (year) of the two bodies.

Parameters:
separation - Distance in AU between bodies
small_mass - Mass of smaller body in Solar masses
large_mass - Mass of larger body in Solar masses

day_length

public final double day_length(double mass,
                               double radius,
                               double eccentricity,
                               double density,
                               double orb_radius,
                               double orb_period,
                               boolean giant)
Estimates length of the planet's day. Fogg's information for this routine came from Dole "Habitable Planets for Man", Blaisdell Publishing Company, NY, 1964. From this, he came up with his eq.12, which is the equation for the 'base_angular_velocity' below. He then used an equation for the change in angular velocity per time (dw/dt) from P. Goldreich and S. Soter's paper "Q in the Solar System" in Icarus, vol 5, pp.375-389 (1966). Using as a comparison the change in angular velocity for the Earth, Fogg has come up with an approximation for our new Planet (his eq.13) and take that into account. This is used to find 'change_in_angular_velocity' below.

Parameters:
mass - Mass in Earth masses.
radius - Equatorial radius in kilometers.
eccentricity - Eccentricity of orbit
density - Average planetary density in grams per cubic centimeter
orb_radius - Semi-major axis of orbit in AU
orb_period - Orbital period (year) in Earth days. (???)
giant - True if this planet is a gas giant

inclination

public final int inclination(double orb_radius)
Estimates planetary inclination (axial tilt). Calibrated to Earth.

Parameters:
orb_radius - Semi-major axis of orbit in AU

escape_vel

public final double escape_vel(double mass,
                               double radius)
This function implements the escape velocity calculation. Note that it appears that Fogg's eq.15 is incorrect.

Parameters:
mass - Mass in Earth masses.
radius - Radius in kilometers.

rms_vel

public final double rms_vel(double molecular_weight,
                            double orb_radius)
Calculates Root Mean Square (RMS) velocity of a molecule or atom. This is Fogg's eq.16. Calibrated to Earth exospheric temperature, which implies that the orbital radius has been preadjusted so that temperature comparisons are meaningful.

Parameters:
molecular_weight - The molecular weight (usually assumed to be N2) of the molecule or atom in question.
orb_radius - Semi-major axis of orbit in AU

molecule_limit

public final double molecule_limit(double mass,
                                   double equat_radius)
Calculates the smallest molecular weight retained by the body, which is useful for determining the atmosphere composition.

Parameters:
mass - Planetary mass in Earth masses.
equat_radius - Equatorial radius in kilometers.

acceleration

public final double acceleration(double mass,
                                 double radius)
Calculates the surface acceleration of a Planet.

Parameters:
mass - Planetary mass in Earth masses.
radius - Equatorial radius in kilometers.

gravity

public final double gravity(double acceleration)
Calculates the surface gravity of the planet.

Parameters:
acceleration - Surface gravity in cm/sec^2

grnhouse

public final boolean grnhouse(int zone,
                              double orb_radius,
                              double r_greenhouse)
Determines if the planet suffers from runaway greenhouse effect. Note that if the orbital radius of the Planet is greater than or equal to R_inner, 99% of it's volatiles are assumed to have been deposited in surface reservoirs (otherwise, it suffers from the greenhouse effect).

Parameters:
zone - Orbital 'zone'.
orb_radius - Semi-major axis of orbit, in AU
r_greenhouse - 'Greenhouse effect' radius in AU

vol_inventory

public final double vol_inventory(double mass,
                                  double escape_vel,
                                  double rms_vel,
                                  double stellar_mass,
                                  int zone,
                                  boolean greenhouse_effect)
Calculates the unitless 'volatile gas inventory'. This implements Fogg's eq.17.

Parameters:
mass - Planetary mass in Earth masses.
escape_vel - Escape velocity in kilometers/second.
rms_vel - Average velocity at molecules at top of atmosphere.
stellar_mass - Stellar mass ration in Solar masses.
zone - Orbital 'zone', between 1 and 3.
greenhouse_effect - True if planet has runaway greenhouse effect.

pressure

public final double pressure(double equat_radius,
                             double gravity)
Calculates surface pressure on this planet. Uses volatile gas inventory, equatorial radius, and surface gravity, and is calibrated so that Earth (with a gas inventory of 1000 and gravity of 1 G) has a pressure of 1000 millibars. This implements Fogg's eq.18.

Parameters:
equat_radius - Equatorial radius in kilometers.
gravity - Surface gravity in units of Earth gravities.

boiling_point

public final double boiling_point()
Calculates the boiling point of water in this planet's atmosphere, stored in millibars. This is Fogg's eq.21.


hydro_fraction

public final double hydro_fraction()
Calculates the fraction of planet surface covered by water. This function is Fogg's eq.22. Uses the volatile gas inventory (a dimensionless quantity, calibrated to Earth==1000) and planetary radius in Km. I [Matt] have changed the function very slightly: the fraction of Earth's surface covered by water is 71%, not 75% as Fogg used.


cloud_fraction

public final double cloud_fraction()
Given the surface temperature of a Planet (in Kelvin), this function returns the fraction of cloud cover available. This is Fogg's eq.23. See Hart in "Icarus" (vol 33, pp23 - 39, 1978) for an explanation. This equation is Hart's eq.3. I [Matt] have modified it slightly using constants and relationships from Glass's book "Introduction to Planetary Geology", p.46. The 'CLOUD_COVERAGE_FACTOR' is the amount of surface area on Earth covered by one Kg. of cloud.


ice_fraction

public final double ice_fraction()
Given the surface temperature of a Planet (in Kelvin), this function returns the fraction of the Planet's surface covered by ice. This is Fogg's eq.24. See Hart[24] in Icarus vol.33, p.28 for an explanation. I [Matt] have changed a constant from 70 to 90 in order to bring it more in line with the fraction of the Earth's surface covered with ice, which is approximatly .016 (=1.6%).


eff_temp

public final double eff_temp(double ecosphere_radius)
Calculates effective temperature of the planet, based on semi-major axis, albedo, and provided ecosphere radius. The equation is calibrated to the effective temperature of Earth. This is Fogg's eq.19.

Parameters:
ecosphere_radius - Radius of ecosphere in AU

green_rise

public final double green_rise(double optical_depth,
                               double effective_temp)
Calculates the rise in temperature due to greenhouse effect. This is Fogg's eq.20, and is also Hart's eq.20 in his "Evolution of Earth's Atmosphere" article.

Parameters:
effective_temp - Temperature in Kelvin of a blackbody here

planet_albedo

public final double planet_albedo()
Calculates the albedo of the planet, which is the fraction of light reflected rather than absorbed. The cloud adjustment is the fraction of cloud cover obscuring each of the three major components of albedo that lie below the clouds.


new_planet_albedo

public final double new_planet_albedo()
Calculates the albedo of the planet, which is the fraction of light reflected rather than absorbed. This routine expects the albedo contribution for each of the components to be precalculated rather than randomly varied on each call; this is to accellerate execution of the planetary temperature loop.

The cloud adjustment is the fraction of cloud cover obscuring each of the three major components of albedo that lie below the clouds. We assume that each surface component is obscured to an equal degree.


opacity

public final double opacity()
This function returns the dimensionless quantity of optical depth, which is useful in determining the amount of greenhouse effect on a Planet.


iterate_surface_temp

public final void iterate_surface_temp()
Iteratively calculates the temperature of the atmosphere. For most planets, this iteration terminates very quickly, but for some planets the state is chaotic. Typically, at least one planet will be discovered within a few hundred systems for which this equation never converges. These are primarily Earthlike planets where surface temperature is near the freezing point of water, but it has also occurred in planets near the boiling point as well (typically high pressure worlds with large oceans). Adjust the CHAOTIC_ITERATIONS parameter to change the cutoff point.

It may be desirable to iteratively calculate the volatiles inventory as well, to simulate atmospheric evolution; doing this correctly is beyond what I [Carl] feel comfortable with.


set_vital_stats

public final void set_vital_stats(double smr,
                                  double r_gr,
                                  double r_ec,
                                  double age)
Calculates planetary characteristics. At this point the body of the planet has already been calculated (mass, orbital characteristics, whether it accreted gas as well as dust); remaining characteristics are calculated using stellar characteristics provided as parameters.

Parameters:
smr - Stellar mass ratio (in Solar masses)
r_gr - Greenhouse radius (in AU)
r_ec - Ecosphere radius (in AU)
age - Age of star (in gigayears)

nearest_moon

public final double nearest_moon()
Calculates distance to closest moon, if any. I {Carl] am unsure about the logic behind this routine, and it is currently unused. It might be related to the size of the Roche lobes of this planet, but I don't have the time right now to check it.


farthest_moon

public final double farthest_moon()
Calculates distance to farthest moon, if any. I {Carl] am unsure about the logic behind this routine, and it is currently unused. It might be related to the size of the accretion disk around this planet.



Copyright © 2001 Universe Dev Team All Rights Reserved.