Application Center - Maplesoft

App Preview:

The Sun

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application

The Sun


For the Sun, calculate the (A) central pressure, (B) central temperature, (C) pressure scale height, (D) adiabatic sound speed for a monatomic gas, and (E) the adiabatic convection by Mixing-length Theory. Data are from Bahcall, Basu & Pinsonneault (1998), Basu & Antia (1997), Langer (2016), and Mullan (2010).




The central pressure, when calculated, will be needed in some further calculations.


The pressure due to radiation is very small and can be ignored.


Care should be taken to use the correct data in the various problems. For example, the mean molecular weight at the core (mu - used in problem B) is not the same as the average mean molecular weight ("muavg - "used in problem E).






Mass of Sun

M := 1.99*10^30*Unit('kg')


Radius of Sun

r := 6.99*10^8*Unit('m')``


Gravitational Constant

G := GetValue(Constant('G'))*GetUnit(Constant('G')) = 0.6673e-10*Units:-Unit(m^3/(kg*s^2))NULL

Mean molecular weight at the core

mu := .62


Average mean molecular weight

`μavg` := .606


Mass of the hydrogen atom

m[H] := 1.673532499*10^(-27)*Unit('kg')``


Boltzmann's constant

k := GetValue(Constant('k'))*GetUnit(Constant('k')) = 0.1380650277e-22*Units:-Unit(m^2*kg/(s^2*K))NULL


Average solar density

rho := 1410*Unit('kg'/'m'^3)


Density at the base of the convection zone

`ρb` := 187*Unit('kg'/'m'^3)



Solar luminence

L := 3.845*10^26*Unit('W')


distance from centre to the base of the convection zone

rcb := (.714*6.995)*10^8*Unit('m')


Universal gas constant

R := GetValue(Constant('R'))*GetUnit(Constant('R')) = 8.314472*Units:-Unit(m^2*kg/(s^2*mol*K))NULL


Particle number density``


n := k/(mu*m[H]*R) = 1600.380200*Units:-Unit(mol/kg)NULL


Temperatyre at the base of the convection zone

TB := 2.18*10^6*Unit('K')


Specific heat at constant pressure

C[p] := 5*n*R*(1/2) = 33265.79090*Units:-Unit(m^2/(s^2*K))  ``


Free parameters used in mixing length formulas

alpha := 1

beta := 1/2



Useful Equations

Equation to approximate the central pressure of a star

P[c] = M^2*G/r^4


Relation of pressure to temperature (a is the radiation constant)

` P =`*rho*k*T/(mu*m[H])+(1/3)*a*T^4


Pressure scale height

H[p] = P/(rho*g[av])


average value of gravitational acceleration


g[av] = (1/2)*G*M/((1/2)*r)^2


Adiabatic sound speed

v[s] = (5*P[av]/(3*rho))^(1/2)



gravitational acceleration

g = G*M/r^2


Adiabatic temperature gradient

`at =`*g/C[p]


Temperature gradient difference

delta(dT/dr) = (L*(mu*m[H]/k)^2*(g/T)^(3/2)/((4*Pi*r^2)*rho*C[p]*alpha^2*beta^(1/2)))^(2/3)

Convective velocity

v[c] = beta^(1/2)*(TB/g)^(1/2)*k*delta(dT/dr)^(1/2)*alpha^2/(`μavg`*m[H])


Solution (A): Central Pressure

In order to use the equation of hydrostatic equilibrium to calculate the central pressure of the Sun, it would be necessary to know how the mass and density of the Sun vary with its radius. This is not explicitly known. However, a rough estimate of the central pressure can be obtained from


P[c] := M^2*G/r^4 = 0.1106925965e16*Units:-Unit(Pa)NULL

or about 1015 pascals. This is off by a factor of approximately 10 from the currently accepted figure: 2.34 * 1016 pascals, calculated from solar models. (See Appendix, Table 17, in the text.)


Solution (B): Central Temperature

The total pressure is related to temperature by


P = rho*k*T/(mu*m[H])+(1/3)*a*T^4


where the first term on the right is the pressure due to the ideal gas law, and the second term is the pressure due to radiation. The contribution due to radiation is much smaller than that due to gas pressure, so the second term on the right can be ignored. Since


Pc = G*M*rho/r


the pressure equation can be rewritten as


T := mu*m[H]/(rho*k)*(G*M*rho/r) = 14277073.03*Units:-Unit(K)NULL


The accepted value is 1.55 * 107 kelvins. (See Appendix, Table 17, in the text.)



Solution*CSolar Pressure Scale Height

The pressure scale height, Hp,is an estimate of the size of a convective zone. Using

g[av] := (1/2)*G*M/((1/2)*r)^2 = 543.5629481*Units:-Unit(m/s^2)NULL



H[p] := (1/2)*P[c]/(rho*g[av]) = 722137039.0*Units:-Unit(m)NULL


A commonly accepted value is 5 * 108 metres (Basu & Antia, 1997).NULL

Solution (D); Solar Adiabatic Sound Speed for a Monatomic Gas

The sound speed, vs, depends on the compressibility and inertia of the gas.

Average solar pressure

P[av] := (1/2)*P[c] = 0.5534629825e15*Units:-Unit(Pa) 

v[s] := (5*P[av]/(3*rho))^(1/2) = 808833.4582*Units:-Unit(m/s)NULL

A typical value of the adiabatic sound speed inside the Sun is 5 * 105 m/s (Bahcall, Basu & Pinsonneault, 1998).


Solution (E): The Adiabatic Convection by Mixing-Length Theory

To calculate values pertaining to the base of the Sun's convection zone, the following values may be used:


Gravitational acceleration as the base of the convection zone

g := G*M/rcb^2 = 532.3562291*Units:-Unit(m/s^2)NULL


The adiabatic temperature gradient in the Sun's convective zone is:

g/C[p] = 0.1600311355e-1*Units:-Unit(K/m)NULL


and the temperature gradient difference is

delta(dT/dr) = (L*(`μavg`*m[H]/k)^2*(g/TB)^(3/2)/((4*Pi*rcb^2)*`ρb`*C[p]*alpha^2*beta^(1/2)))^(2/3)

delta(dT/dr) = 0.5483107230e-8*2^(1/3)*Units:-Unit(K/m)



delta(dT/dr) = 0.69082e-8*Units:-Unit(K/m)



The ratio of the temperature gradient difference to the adiabatic temperature gradient:


6.908204945*10^(-9)*Unit('K'/'m')/(0.1600302405e-1*Unit('K'/'m')) = 0.4316812200e-6NULL



This is the degree to which the actual temperature gradient is superadiabatic. Therefore, it is possible to regard the temperature gradient deep in the convective zone as being equal to the adiabatic gradient. This greatly simplifies modelling of the convective zone (Mullan, 2010).



The convective velocity is

v[c] := beta^(1/2)*(TB/g)^(1/2)*k*(6.908204945*10^(-9)*Unit('K'/'m'))^(1/2)*alpha^2/(`μavg`*m[H]) = 36.20400343*2^(1/2)*Units:-Unit(m/s)"(->)"51.200*Units:-Unit(m/s) 


The convective velocity is about 51 m/s, which is a reasonable estimate (Langer, 2016). This represents


v[c]/(8.088334582*10^5*Unit('m'/'s')) = 0.4476076385e-4*2^(1/2)"(->)"0.63301e-4 

approximately 1/10,000 of the sound speed.



Bahcall, J., Basu, S. & M. Pinsonneault. (1998). How Uncertain Are Solar Neutrino Predictions? Phys. Lett. B, 433, 1-8.


Basu, S. & Antia, H. (1997). Seismic measurement of the depth of the solar convection zone. Mon. Not. R. Astron. Soc. 287, 189-198.


Langer, N. (2016). Lecture Notes. (Accessed: 2016-08-25.)


Mullan, D. (2010). Physics of the Sun: A First Course. Boca Raton: Taylor and Francis Group.