Help With Star Generator

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
MKruer
Posts: 501
Joined: 18.09.2002
With us: 22 years 2 months

Help With Star Generator

Post #1by MKruer » 16.05.2004, 22:42

I have complied a list of all star types based upon temperature (O5 – T ) and type (Hypergiant - White Dwarfs), but the last thing I am missing is the masses, radii, and the statistical probability of each star class. If any one can help me will obtaining the final information, I would appreciate it.

http://vegastrike.sourceforge.net/forum ... 0071#20071

Cormoran
Posts: 198
Joined: 28.07.2003
With us: 21 years 3 months
Location: Slartibartfast's Shed, London

Post #2by Cormoran » 17.05.2004, 12:20

Have a look at this site.

http://www.users.zetnet.co.uk/trisen/sol/2300ad/wg/

The first few bits there have tabulated data on stars, which may be of use.

However, while the figures look vaguely right, the page is designed as a world building method for RPGs, and thus may not be strictly accurate.

If you do like the figures, I have them tabulated somewhere, which may save you some typing.

Cheers,

Cormoran
'...Gold planets, Platinum Planets, Soft rubber planets with lots of earthquakes....' The HitchHikers Guide to the Galaxy, Page 634784, Section 5a. Entry: Magrathea

marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Re: Help With Star Generator

Post #3by marc » 17.05.2004, 13:28

MKruer wrote:I am missing is the masses, radii, and the statistical probability of each star class.


You could extract this information from celestias star database using some queries with my database backend. It is possible to write a query that will place the data directly into a csv text file for import into excel. However the mass table I am using is still incomplete.

Topic author
MKruer
Posts: 501
Joined: 18.09.2002
With us: 22 years 2 months

Post #4by MKruer » 17.05.2004, 19:53

That seems to work well, but I would still like some data verification, for the final chart.

While looking into the HR diagram and stars in general, it seems as if there is no standardized list at all. While looking for the surface temperature I would go to several different sites and they would all have different answer for the same class of star. Very unorganized! This leads me to question the mass/radius of the stars according to the HR diagram. In theory the HR any point on the diagram should tell you, the radius, luminosity, temperature, and mass. But it looks like

I don’t know if the radius and mass truly scales linearly or not. The temperature sure as hell didn’t. perhaps there need to be a new more universal HR diagram for the scientific community. (like that will ever happen)

Topic author
MKruer
Posts: 501
Joined: 18.09.2002
With us: 22 years 2 months

Re: Help With Star Generator

Post #5by MKruer » 17.05.2004, 19:55

marc wrote:
MKruer wrote:I am missing is the masses, radii, and the statistical probability of each star class.

You could extract this information from celestias star database using some queries with my database backend. It is possible to write a query that will place the data directly into a csv text file for import into excel. However the mass table I am using is still incomplete.


Could you? In order for it to seriously work i would need the full class of star

G2V, O9Ia, M0VI, etc...

Topic author
MKruer
Posts: 501
Joined: 18.09.2002
With us: 22 years 2 months

Post #6by MKruer » 17.05.2004, 20:15

I found somehign intresting,

Stefan-Boltzmann Law

This is the relationship between luminosity (L), radius (R) and temperature (T):
L = (7.125 x 10^-7) R^2 T^4

Units: L - watts, R - meters, T - degrees Kelvin


(luminosity = mass^3)

I guess the only thing i need to find now is the luminosity for each class or starl LOL

marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Re: Help With Star Generator

Post #7by marc » 19.05.2004, 09:45

MKruer wrote:
marc wrote:
MKruer wrote:I am missing is the masses, radii, and the statistical probability of each star class.

You could extract this information from celestias star database using some queries with my database backend. It is possible to write a query that will place the data directly into a csv text file for import into excel. However the mass table I am using is still incomplete.

Could you? In order for it to seriously work i would need the full class of star

G2V, O9Ia, M0VI, etc...


You would use something like this for each star type:

Code: Select all

SELECT COUNT(*) FROM star WHERE CONCAT(spectralClass,spectralSubClass,luminosityClass) = 'G2V';


This is the information available in the star table.

Code: Select all

describe star;
+---------------------+---------------------------------------------------------------------+------+-----+-------------+-------+
| Field               | Type                                                                | Null | Key | Default     | Extra |
| 0                   | 1                                                                   | 2    | 3   | 4           | 5     |
+---------------------+---------------------------------------------------------------------+------+-----+-------------+-------+
| hip                 | int(11) unsigned                                                    |      | PRI | 0           |       |
| hd                  | int(11) unsigned                                                    | YES  |     | NULL        |       |
| RA                  | float                                                               |      |     | 0           |       |
| declination         | float                                                               |      |     | 0           |       |
| distFromSol         | float                                                               |      |     | 0           |       |
| absoluteMagnitude   | float                                                               |      |     | 0           |       |
| starType            | enum('Normal Star','White Dwarf','Neutron Star','Black Hole')       |      |     | Normal Star |       |
| spectralClass       | enum('O','B','A','F','G','K','M','R','S','N','WC','WN','?','L','T') |      |     | ?           |       |
| spectralSubClass    | tinyint(4) unsigned                                                 |      |     | 0           |       |
| luminosityClass     | enum('Ia0','Ia','Ib','II','III','IV','V','VI')                      |      |     | Ia0         |       |
| parallax            | float                                                               |      |     | 0           |       |
| parallaxError       | tinyint(4)                                                          |      |     | 0           |       |
| mass                | float                                                               |      |     | 0           |       |
| bolometricMagnitude | float                                                               |      |     | 0           |       |
| radius              | float                                                               |      |     | 0           |       |
| rotationPeriod      | float                                                               | YES  |     | NULL        |       |
| temperature         | float                                                               | YES  |     | NULL        |       |
| systemType          | enum('Single','Binary','Ternary','Quaternary')                      | YES  |     | NULL        |       |
| breathable          | tinyint(4)                                                          |      |     | 0           |       |
| seed                | int(10) unsigned                                                    | YES  |     | NULL        |       |
+---------------------+---------------------------------------------------------------------+------+-----+-------------+-------+
20 rows returned
(0.06 seconds)

Topic author
MKruer
Posts: 501
Joined: 18.09.2002
With us: 22 years 2 months

Post #8by MKruer » 20.05.2004, 17:28

Sorry missed that. I dont have my thinking cap on. Whould the following return a list of all the stars with the required feilds?

marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Re: Help With Star Generator

Post #9by marc » 21.05.2004, 04:02

What following?

Either way, I wasn't clear.

This:

Code: Select all

SELECT COUNT(*) FROM star WHERE CONCAT(spectralClass,spectralSubClass,luminosityClass) = 'G2V';


Would return the number of G2V stars in the database. You could then use a bunch of similar queries to retrieve your statistics.

There are more examples on the addons documentation page.
http://mostlyharmless.sourceforge.net/s ... eadme.html
Beyond that you will have to read some sql material.

revent
Posts: 80
Joined: 15.11.2003
Age: 47
With us: 21 years
Location: Springfield, MO, USA

Pulling star data from celestia db

Post #10by revent » 21.05.2004, 05:04

Probably not a good idea if you want a realistic distribution. Both Hipparcos and the celestia database extraction procedure have an inherent selection bias, and that'll show up in your data. For example, you'll be missing lots of dim stars.

marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #11by marc » 24.05.2004, 01:18

In that case just bring the sample set a little closer by adding this to the queries:

Code: Select all

AND distFromSol < 200

Or use a sample from pascals star database which has a lot more of the dimmer stars.


Return to “Development”