Star density calculation = weird result.

In summary, the game developer is trying to figure out why his stars are getting denser than Sol, which is causing errors in the density calculations.
  • #1
Adyaphede
3
0
Hello everyone!

I'm new here and I've checked this forums once in a while for physics information, mainly astrophysics stuff but I usually found all the answers I needed. Not this time though.

A bit about me.
I'm an Indie game developer and the game I'm working on takes place in a fictional galaxy generated from scratch. The scale of that galaxy goes from tiny to 1% realist (or about 1 billion stars) some would argue this scale would be .5%.

Galaxy generation can yield 3 types of galaxies: spiral, barred or elliptical.

Based on the stellar types and some generalization based on those types, all stars are generated and placed according to the type of galaxy.

Each star has its own properties set like mass, radius, etc based on its type. I take each type's upper and lower limits from the Stellar Type's page on wikipedia for each attribute and randomize from lower to upper limit.

My problem is the density I am getting for a given type in relation to Sol.

Each star, when selected, gives a report of sort, informing the player of the star's attributes in Sol.

So for example you could get for an M class star: "Radius: 0.67 Sol"

To come up with the star's density, I come up with its radius multiplied by sol's radius (because the types' limits are in Sol, so I have to mult it by Sol to get the star's real radius).

Then I get the star's mass using the same as above mult by Sol's mass.

The star's volume comes next and this is derived from the star's radius (4/3 * PI * radius^3).

Last, to get the density, it's mass / volume.

That's the contention point. I always get an awful number (usually around 10 digits) after being divided by Sol's density. This can't be right.

Might as well put a screenshot so it's easier to see/understand.

[PLAIN]http://www.danyrioux.com/files/weird_density.png
In the picture above, the star's attributes were:
Star Mass : 3.5223205E30
Star Volume : 4.14757254E18
Star Density : 8.4924871E11

Since Sol's density is 1.408E3, I understand the huge result and that it's wrong (obviously), but what I don't understand is why.

Any help would be appreciated. If you need more information I'll gladly reply asap.
 
Last edited by a moderator:
Astronomy news on Phys.org
  • #2
My guess is that when you are multiplying by Sol's radius, you are using the value in kilometers rather than in meters, This gives you an answer of kg/km^3 rather than what you want which is kg/m^3.
 
  • #3
That was exactly it Janus.

In fact, the answer I needed was in g/cm3 but was getting the information in kg/km3 as you said. It took a while but found it.

Thanks. :)
 

Related to Star density calculation = weird result.

What is star density calculation?

Star density calculation is a scientific method used to determine the number of stars within a particular volume of space. It is based on observations and measurements of the brightness and distances of stars.

Why is the result of star density calculation sometimes weird?

The result of star density calculation can seem weird because it often involves very large or very small numbers. Additionally, this calculation is affected by various factors such as the size and shape of the galaxy being studied, and the distribution of stars within it.

What do scientists use star density calculation for?

Scientists use star density calculation to gain a better understanding of the distribution and evolution of stars within a galaxy. This information can also be used to study the formation and structure of galaxies.

How accurate is star density calculation?

The accuracy of star density calculation depends on the quality and quantity of data available. With advanced technology and more precise measurements, scientists are able to achieve more accurate results.

Can star density calculation be used to predict the future of a galaxy?

No, star density calculation is used to study the current state of a galaxy and cannot predict its future. However, it can provide insight into the past and potential evolution of a galaxy based on its current star density.

Similar threads

  • Astronomy and Astrophysics
Replies
21
Views
2K
  • Astronomy and Astrophysics
2
Replies
49
Views
3K
  • Astronomy and Astrophysics
Replies
12
Views
1K
  • Astronomy and Astrophysics
Replies
7
Views
1K
  • Astronomy and Astrophysics
Replies
10
Views
1K
  • Astronomy and Astrophysics
Replies
1
Views
1K
  • Astronomy and Astrophysics
Replies
1
Views
2K
  • Astronomy and Astrophysics
Replies
1
Views
1K
Replies
1
Views
983
  • Astronomy and Astrophysics
Replies
22
Views
2K
Back
Top