# Stefan-boltzmann solved for temperature?

1. Jul 21, 2011

### ~jet

My physics is extremely rusty (I was bored to death back in school and had no practical application of the stuff to make it interesting and/or truly sink it.) Now, I have an application, and while I have a long way to go, it is pleasurable to be comprehending things as I go.

To a point, and here is where I ask for some help and confirmations. Namely, I need to find the effective (surface?) temperature of a star (presumably main sequence and not extraordinary in mass) based on its mass.

First, smash my face in if I miscombobulated the stefan-boltzmann law:

L = 4$\pi$R$^{2}$$\sigma$T$^{4}_{eff}$

... to look for T$_{eff}$: (and turning 4$\pi$R$^{2}$ into A for now)

T$_{eff}$ = $\sqrt[4]{L/A\sigma}$

No?

Walp, I've already plugged this into my code, and I'm getting absolutely absurd results for a near-solar-mass star: 4.23581197119e+23 (x10$^{23}$ for the noncoders out there) when I'm expecting to get roughly 5700-5800K. So I am forced to assume either that I flubbed my reconfiguring of S-BL or I am horribly misreading the S-B constant:

$\sigma$ = 5.670373(21)×10$^{−8}$Jm$^{−2}$s$^{−1}$K$^{−4}$.

That's quite a unit... I'm almost certain I'm not reading it correctly. Tips?

Last edited: Jul 21, 2011
2. Jul 21, 2011

### George Jones

Staff Emeritus
Yes, if you mean $\sqrt[4]{L/\left(A\sigma\right)}$ or $\sqrt[4]{L/A/\sigma}$, and I get the correct result using this.
For troubleshooting, it would help if you posted $\sqrt[4]{L/A\sigma}$ exactly as you coded it, including the numerical values that you used.

3. Jul 21, 2011

### ~jet

Yip yip, that's what I mean; good to hear.

the code is simple python, accepting solar masses as an argument:

star.mass = 1.98892e+30 (kg)
star.luminosity = star.mass ** 3.5 (1.1095850642735086e+106)
star.surface_area = (4 * pi * (self.radius ** 2)) (~6.078608e+18 m2
star.effective_temperature = (self.luminosity / (self.surface_area * stefan_boltzmann_constant )) ** 0.25 (~4.2358e+23 wawahoozit units)

The code seems fine to me (assuming I've taken accurate information from the solar-comparative equations peppering the web.) I think I am mangling the units. Probably starting with luminosity... looking at it in erg/s (on the order of 1033) I think I see a place to start

4. Jul 21, 2011

### George Jones

Staff Emeritus
This can't be correct. I think it should be something like
$$\frac{L}{L_{Sun}} = \left( \frac{M}{M_{Sun}} \right)^{3.5}.$$

5. Jul 21, 2011

### ~jet

pulled it from http://en.wikipedia.org/wiki/Mass–luminosity_relation ... I may be misusing the proportionality bit. Have we really not worked out how to model these based purely on mass yet? (i.e., independent of having to use the sun as a comparator.)

6. Jul 21, 2011

### ~jet

In any event, I shall plug away it at again; converting my radius to cm, I was able to get closER (as (erg/s)/(cm2erg/scm2K4) cancelled down a lot easier)... at my next opportunity, I see what happens when I try that as you show it instead.

7. Jul 23, 2011

### ~jet

Kay, so still doing something wrong... I'm getting 32486K for a sunmass star when I use what wikipedia claims. Am I misconstruing your equation when I flip it to

$$L = \left(\left( \frac{M}{M_{Sun}} \right)^{3.5}\right)L_{Sun}.$$

Further, why do you say 3.5 and wikipedia claim 4?

8. Jul 23, 2011

### ~jet

Perhaps I'm also asking the wrong question; I may still be blending my units poorly.

$T = \sqrt[4]{\frac{L}{A\sigma}}$ and I try to read this in units:

$\frac{erg/s}{\frac{cm^{2} erg}{s cm^{2} K^{4}}}$

If that isn't butchered, it does have a pleasing cascade of cancellations that lead me to

$\frac{1}{K^{4}}$

That's either wrong or I don't know how to ~read~ that properly. Beware, I'm many years out of practice and didn't have anything by way of application at the time to let it truly sink in.

9. Jul 25, 2011

### ~jet

Solved it; I was unwittingly trying to combine erg/s with watts