<p>You're talking about the temperature gradients in the atmosphere of a star, that's where the emission and absorption lines are originating. This is a much more complicated matter than the star itself.</p>

<p>The temperature of a star must increase from its surface downwards.<br>
This is a simple result of the fact that the stellar structure is given by pressure gradients balancing the force of gravity. We can express this via the law of hydrostatic equilibrium<br>
$$\frac{\partial P}{\partial r} = -g(r)\rho  $$
which is a pretty good approximation to reality in most cases.</p>

<p>The pressure gradient then translates into a temperature gradient, as the pressure originates in the thermal motion of particles, formalized as the <a href="https://en.wikipedia.org/wiki/Ideal_gas_law" rel="nofollow noreferrer">law of ideal gases</a><br>
$$ P = \frac{\rho k_B T}{\mu} $$.</p>

<p>So wherever there's non-zero gravity and no other force in a gaseous medium, there will be temperature gradients. </p>

<p>In an atmosphere, things depend on how efficient the gas is at cooling. In very thin media, like in Earths or any planets / stars <a href="https://en.wikipedia.org/wiki/Exosphere" rel="nofollow noreferrer">exosphere</a> cooling is inefficient enough to make temperature gradients vanish.</p>

CC BY-SA 4.0
2018-09-02T15:53:16.100Z
I don't think this fully answers the question. It explains why the product $\rho T \mu^{-1}$ becomes smaller with radius, but not why *both* $\rho$ and $T$ do so individually.
ProfRob
CC BY-SA 4.0
2018-09-02T16:07:29.023Z
@RobJeffries: True, but as OP is a new contributor I didn't know the level of detail expected, so I chose to write a simple answer and to leave out energy transport.
AtmosphericPrisonEscape
CC BY-SA 4.0
2018-09-02T17:59:45.233Z
Well for instance, the temperature of the Sun's atmosphere increases considerably above the photosphere, despite the pressure decreasing. The answer is not just hydrostatic equilibrium.
ProfRob
CC BY-SA 4.0
2018-09-02T19:06:55.480Z
@RobJeffries: That's of course true. But OP asked for the explanation of any temperature gradient, and this seemed like a very simple one, one that a first year physics student could understand. Also no mention of the sign of the gradient was provided.
AtmosphericPrisonEscape
CC BY-SA 4.0
2018-09-02T19:38:11.443Z
Your explanation would have it that the temperature gradient can *only* be negative, since the pressure gradient can only be negative for an object in hydrostatic equilibrium. I pointed out that the temperature gradient can be positive in some regions to illustrate that your explanation of the reason for a temperature gradient is incomplete. In this case the OP seems to be talking about the negative temperature gradient in the photosphere, since this is responsible for absorption lines.
ProfRob
CC BY-SA 4.0
2018-09-02T15:23:02.037Z
2018-09-02T15:23:02.037Z
AtmosphericPrisonEscape
<p>Force balance only tells you that the <em>pressure</em> must decrease outward, the cause of the decreasing <em>temperature</em> is the nature of heat transport and the requirement that it increase entropy.  Hence heat is always transported from higher T to lower T, and a star must transport heat <em>outward</em> because its surface is losing heat to the coldness of space.  That requires the temperature must drop as you go out, as long as you are just passing the same heat from layer to layer and the thermodynamics of heat transport rules the situation.</p>

<p>It was pointed out that the low-density atmospheres of stars can have their temperature rise with height, as the Earth's stratosphere also does, yet the net energy transport is still outward.  To avoid entropy decrease, this requires that more heat be deposited in the hot layers than is extracted from the cooler ones below, so the heat dumped high up in the atmosphere has to come from somewhere else, other than the cool layers.  That's what can't happen deep in the star-- the heat gets no "Free ride" to pass certain layers, it is passed from layer to layer, the same heat.  But when there are ways to dump heat into higher layers without extracting it from cooler ones below, then the temperature can rise.  (In the Earth's stratosphere, the extra heat comes from sunlight absorbed by ozone, and in the Sun's chromosphere, the extra heat comes from magnetic fields and plasma motions, which pass through the lower layers without being absorbed.)</p>

CC BY-SA 4.0
2018-09-03T04:22:39.033Z
2018-09-03T04:22:39.033Z
Ken G
<p>It is a well known fact that in stars, there exists a temperature gradiënt. The 
observational reason is because we perceived spectral lines in the otherwise continuous spectrum of a star. If this wasn't the case, and thus if the temperature were uniform, then the absorption and the emission would cancel each other out and we would observe a net effect that results in a continuous spectrum. Now my question is: what is the physical explanation for this temperature gradient?</p>

<star><temperature><spectra>
Temperature gradient in stars
Einsteinwasmyfather
# Temperature gradient in stars

(Asked by: username_0 on 2018-09-02)

It is a well known fact that in stars, there exists a temperature gradiënt. The
observational reason is because we perceived spectral lines in the otherwise continuous spectrum of a star. If this wasn't the case, and thus if the temperature were uniform, then the absorption and the emission would cancel each other out and we would observe a net effect that results in a continuous spectrum. Now my question is: what is the physical explanation for this temperature gradient?

**Tags:** star, temperature, spectra

---

## 2 answers

### Answer by username_1 on 2018-09-02. Score: 3 | Accepted answer

You're talking about the temperature gradients in the atmosphere of a star, that's where the emission and absorption lines are originating. This is a much more complicated matter than the star itself.

The temperature of a star must increase from its surface downwards.  
This is a simple result of the fact that the stellar structure is given by pressure gradients balancing the force of gravity. We can express this via the law of hydrostatic equilibrium  
$$\frac{\partial P}{\partial r} = -g(r)\rho $$
which is a pretty good approximation to reality in most cases.

The pressure gradient then translates into a temperature gradient, as the pressure originates in the thermal motion of particles, formalized as the [law of ideal gases](https://en.wikipedia.org/wiki/Ideal_gas_law)  
$$ P = \frac{\rho k\_B T}{\mu} $$.

So wherever there's non-zero gravity and no other force in a gaseous medium, there will be temperature gradients.

In an atmosphere, things depend on how efficient the gas is at cooling. In very thin media, like in Earths or any planets / stars [exosphere](https://en.wikipedia.org/wiki/Exosphere) cooling is inefficient enough to make temperature gradients vanish.

> **Comments:**
> **username_2**: I don't think this fully answers the question. It explains why the product $\rho T \mu^{-1}$ becomes smaller with radius, but not why *both* $\rho$ and $T$ do so individually.  
> **username_1**: @RobJeffries: True, but as OP is a new contributor I didn't know the level of detail expected, so I chose to write a simple answer and to leave out energy transport.  
> **username_2**: Well for instance, the temperature of the Sun's atmosphere increases considerably above the photosphere, despite the pressure decreasing. The answer is not just hydrostatic equilibrium.  
> **username_1**: @RobJeffries: That's of course true. But OP asked for the explanation of any temperature gradient, and this seemed like a very simple one, one that a first year physics student could understand. Also no mention of the sign of the gradient was provided.  
> **username_2**: Your explanation would have it that the temperature gradient can *only* be negative, since the pressure gradient can only be negative for an object in hydrostatic equilibrium. I pointed out that the temperature gradient can be positive in some regions to illustrate that your explanation of the reason for a temperature gradient is incomplete. In this case the OP seems to be talking about the negative temperature gradient in the photosphere, since this is responsible for absorption lines.  

---

### Answer by username_3 on 2018-09-03. Score: 2

Force balance only tells you that the *pressure* must decrease outward, the cause of the decreasing *temperature* is the nature of heat transport and the requirement that it increase entropy. Hence heat is always transported from higher T to lower T, and a star must transport heat *outward* because its surface is losing heat to the coldness of space. That requires the temperature must drop as you go out, as long as you are just passing the same heat from layer to layer and the thermodynamics of heat transport rules the situation.

It was pointed out that the low-density atmospheres of stars can have their temperature rise with height, as the Earth's stratosphere also does, yet the net energy transport is still outward. To avoid entropy decrease, this requires that more heat be deposited in the hot layers than is extracted from the cooler ones below, so the heat dumped high up in the atmosphere has to come from somewhere else, other than the cool layers. That's what can't happen deep in the star-- the heat gets no "Free ride" to pass certain layers, it is passed from layer to layer, the same heat. But when there are ways to dump heat into higher layers without extracting it from cooler ones below, then the temperature can rise. (In the Earth's stratosphere, the extra heat comes from sunlight absorbed by ozone, and in the Sun's chromosphere, the extra heat comes from magnetic fields and plasma motions, which pass through the lower layers without being absorbed.)


---

