Re: Main Sequence Stellar Mass Function?



On Oct 23, 12:07 pm, CharlesRCap...@xxxxxxxxx wrote:

Anyone have a quick back-of-the-envelope function for finding main
sequence initial stellar mass?

I felt kinda stupid when the answer just jumped out at me this
morning. The answer is just so obvious that I'm disappointed that I
didn't figure it out right away.

The function for getting a random distribution of stars using the
Salpeter slope (2.35) is:

f(x) = -Log2.35(n)

where n is greater than zero and less than or equal to one.

....or in Java/C#...

double m = 0.0;
double n = 0.0;
Random r = new Random();
while (n == 0.0)
{
n = r.NextDouble();
}
m = (Math.Log(n, 2.35) * -1);

The function does not match observed stellar counts exactly, but it's
close enough for government work.
.