### How to calculate the temperature of a star

I need a way to calculate the effective temperature (surface temperature) of a star for a stellar model. I need something in the form Te=....

I have:

- Radius in m
- mass in kg
- the composition of particles (eg H 90%, He 8% etc)
- the combined stored thermal energy of the body in J

Constants (any really but I'm using these for now):

- G=gravity constant=6.67408E-011
- k=kbolzmann=1.3806485279E-023
- s=sbolzmann=5,67036713E-008
- PI=pi ~3.14...

Example of the sun:

- mp=average mass of a particle=1,7E-027
- M=total mass of the body=2E30
- r=radius of the body=700000000

I'm using this equation to estimate the core temperature :

`(G*mp*M)/(r*(3/2)*k)`

which nets 15653011 for the sun which is close enough given that that is the only star core temperature known (afaik).

I'm using this to estimate the luminosity L:

`4*PI*(r^2)*s*(Te^4)`

which results in an error of ~1-5% with 90% of my sample stars which is close enough. For the sun this results in

`3,95120075975041E+026 W`

which is only`2,7%`

off.The problem is I need Te for the 2nd formula which I don't have in my scenario.

Due to the formula for L being dependent on the surface temperature to the power of 4 this value has to be relatively precise.

Assumptions of my model:

- uniform distribution of particles: so every slice of the body has the same composition as the entire body.
- perfect sphere: every body is a perfect sphere, no handling for elliptic bodies needed.

My sample values (first line is the sun with a core temp of 15000000):

`emitted energy Surface temp radius mass`

(in Lsun) (in K) (in m) (in Msun)

1 5800 700000000 1

8700000 53000 25200000000 265

6300000 50100 23100000000 110

2900000 42000 23660000000 132

2000000 44000 16800000000 80

1260000 13500 140000000000 45

57500 3600 618100000000 12.4

78 5700 6440000000 2.56

78.5 4940 8540000000 2.69

15100 7350 51100000000 9.7

1.519 5790 858900000 1.1

0.5 5260 605500000 0.907

370000 3690 994000000000 19.2

123000 33000 7560000000 56

2200000 52500 12600000000 130

200000 10000 151900000000 22

446000 19000 43330000000 42.3

25.4 9940 1197700000 2.02Errors in luminosity to actual value (the maximum error is about 100% which I can live with since it might just be inaccurate measurements for the sample stars)

`2.74%`

6.71%

-1.13%

11.29%

-2.00%

-4.27%

106.76%

3.99%

2.51%

-6.50%

1.12%

4.00%

-8.27%

2.10%

1.57%

113.75%

1.64%

2.15%the errors are based on the sample data i used, so the sample data luminousity is probably off by that, since u say that it is an excact formula. my model is currently based on how the structure is, so if adding varying compositions at different depths would help i could add that. my current model is not quite done. could you perhaps provide a relationship like you said because all i saw were diagramms of mass/luminousity

@asdf I'm not intimately familiar with the calculations here, so I need someone else to confirm. Is this question a duplicate? http://astronomy.stackexchange.com/questions/1013/how-does-one-determine-the-effective-temperature-of-a-star-from-its-spectrum

AlaskaRon Correct answer

6 years agoEmpirically (I fit a regression on log(mass) vs log(surface temp)), using the table of values in the article on Main Sequence stars, I get a fairly well-fitting formula: $\mathrm{estTemp} = 5740*\mathrm{mass}^{0.54}$, where estTemp is in C and mass is in multiples of the sun's mass. Seems to work very well for all but the largest and smallest main sequence stars (and not TOO bad for those).

yes it is somewhat accurate on main sequence stars, but the sample i used contains stars of various sizes and phases including some extremes, so the formula was accurate for 3 of the values but the rest was quite off: -1,03% 120,39% 45,02% 90,89% 39,04% 232,13% 520,95% 67,30% 98,27% 166,37% 4,37% 3,52% 667,13% 52,90% 51,45% 204,66% 128,23% -15,59% so i d iether need a way to determine which formula to use for which stars or something that depends on more parameters

You might want to look at the second derivation on the Mass-Luminosity relationship page.

thanks, that looks to be a more accurate formula, however i have no idea what the brackets around p mean and how to calculate l

i tried seting l=1/p where p is the average density and used Te=(l/r)^0,25*Ti where r is radius, but i got these errors: 171,63% 1201,60% 643,74% 402,53% 486,53% 473,50% 289,27% 637,71% 667,15% 451,57% 955,40% 1097,25% 315,70% 1089,56% 989,26% 334,57% 599,24% 721,25% so i must be doing something wrong as i d expect the formula wouldnt be off by 171% for the sun if applied correctly

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM

ProfRob 6 years ago

You need a proper stellar evolution model. There is no simple answer to this question. Also, many of your assumptions are far from the truth. - e.g. the composition is not at all uniform with depth. $L=4\pi R^2 T_e^4$ is an exact relationship - I am not sure what you mean by getting an "error" when using this. About the only thing you could do is use the ratio of He/H as a crude indicator of evolutionary status and then pick an approximate empirical relationship between $L$ and $M$ appropriate for the evolutionary status.