universe.common.database.accrete
Class DustDisc

java.lang.Object
  |
  +--universe.common.database.accrete.DustDisc

public final class DustDisc
extends java.lang.Object

A DustDisc manages the collection of DustBands representing the dust and gas components of a protoplanetary disc.

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 body_inner_bound
           
 double body_outer_bound
           
 double cloud_eccentricity
           
 DustBand dust_head
           
 boolean dust_left
           
 boolean gas
           
 
Constructor Summary
DustDisc(double inner_limit_of_dust, double outer_limit_of_dust, double inner_bound, double outer_bound)
          Public constructor.
 
Method Summary
 void accrete_dust(Protoplanet p)
          Accretes dust and/or gas from all bands onto the specified protoplanet, iterating until the marginal mass increase approaches zero.
 boolean dust_available(Protoplanet p)
          Determines whether dust is present within the effect radius of a specific Protoplanet.
 DustBand splitband(DustBand node1, double min, double max)
          Removes a band of dust from the specified DustBand, supplementing it with 2 new bands.
 DustBand splithigh(DustBand node1, double outer)
          Removes outer portion of the specified DustBand, following it with a new band.
 DustBand splitlow(DustBand node1, double inner)
          Removes inner portion of the specified DustBand, preceding it with a new band.
 void update_dust_lanes(double min, double max)
          Identifies dust bands which may be affected by the specified protoplanet, then modifies the disc accordingly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dust_left

public boolean dust_left

gas

public boolean gas

cloud_eccentricity

public double cloud_eccentricity

dust_head

public DustBand dust_head

body_inner_bound

public double body_inner_bound

body_outer_bound

public double body_outer_bound
Constructor Detail

DustDisc

public DustDisc(double inner_limit_of_dust,
                double outer_limit_of_dust,
                double inner_bound,
                double outer_bound)
Public constructor.

Parameters:
inner_limit_of_dust - Innermost limit of dust
outer_limit_of_dust - Outermost limit of dust
inner_bound - Innermost limit of planetary orbits
outer_bound - Outermost limit of planetary orbits
Method Detail

dust_available

public boolean dust_available(Protoplanet p)
Determines whether dust is present within the effect radius of a specific Protoplanet.

Parameters:
p - Protoplanet within the disc

splitband

public DustBand splitband(DustBand node1,
                          double min,
                          double max)
Removes a band of dust from the specified DustBand, supplementing it with 2 new bands.

Parameters:
node1 - Band from which dust has been removed
min - Inner limit of cleared lane (in AU)
max - Outer limit of cleared lane (in AU)

splithigh

public DustBand splithigh(DustBand node1,
                          double outer)
Removes outer portion of the specified DustBand, following it with a new band.

Parameters:
node1 - Band from which dust has been removed
outer - Inner limit of cleared lane (in AU)

splitlow

public DustBand splitlow(DustBand node1,
                         double inner)
Removes inner portion of the specified DustBand, preceding it with a new band.

Parameters:
node1 - Band from which dust has been removed
inner - Outer limit of cleared lane (in AU)

update_dust_lanes

public void update_dust_lanes(double min,
                              double max)
Identifies dust bands which may be affected by the specified protoplanet, then modifies the disc accordingly. Adjacent bands with identical characteristics are merged to help reduce fragmentation of the disc.

Parameters:
min - Inner limit of cleared lane (in AU)
max - Outer limit of cleared lane (in AU)

accrete_dust

public void accrete_dust(Protoplanet p)
Accretes dust and/or gas from all bands onto the specified protoplanet, iterating until the marginal mass increase approaches zero. Once the new mass has been calculated, the dust bands are updated to reflect the accretion of dust and/or gas onto the protoplanet.

Parameters:
p - Protoplanet accreting in this cycle


Copyright © 2001 Universe Dev Team All Rights Reserved.