Solution (source code)

= Solution

In the vertical equations, $\mu$ denotes <dynamic viscosity>, while $\mu_m$ is the <mean molecular weight> in units of the proton mass $m_p$. The symbol $k$ denotes the <Boltzmann constant>. For the intended <hydrostatic equilibrium> calculation, put $P=K\rho^\gamma$ with $K>0$, $\gamma>1$, and set $\mathcal R=k/(\mu_m m_p)$. Dividing the hydrostatic equation by $\rho$ and integrating from the symmetric midplane gives
$$
\frac{\gamma K}{\gamma-1}\rho^{\gamma-1}=\frac{\gamma K}{\gamma-1}\rho_m^{\gamma-1}-\frac{\Omega^2z^2}{2}.
$$
The <specific enthalpy> vanishes at the free surface. Hence the <polytropic vertical structure in stellar gravity> is
$$
\boxed{\rho(z)=\rho_m\left(1-\frac{z^2}{H^2}\right)^{1/(\gamma-1)},\qquad H^2=\frac{2\gamma K\rho_m^{\gamma-1}}{(\gamma-1)\Omega^2}=\frac{2\gamma\mathcal R T_m}{(\gamma-1)\Omega^2}.}
$$
On $|z|<H$, the <ideal gas> relation gives $T=T_m(1-z^2/H^2)$ and $P=P_m(1-z^2/H^2)^{\gamma/(\gamma-1)}$; the vacuum extension sets $\rho=P=0$ outside. The formula needs $\gamma>1$ for a finite positive semi-thickness and assumes the harmonic vertical gravity remains valid through this height.

There is a genuine inconsistency if all four printed structure equations are imposed literally with $F=0$ and finite positive <opacity>: <radiative diffusion> then requires $dT/dz=0$, whereas the polytropic <temperature> above has a nonzero <gradient> away from the midplane. The intended result is valid for the hydrostatic <polytropic equation of state> with the radiative closure replaced or neglected, for example an adiabatic opaque limit. It is not an exact simultaneous solution of the stated finite-opacity radiative system. With that radiative system and a nonvacuum <ideal gas>, $\gamma=1$ instead gives an isothermal solution
$$
\rho=\rho_m\exp\left[-\frac{\Omega^2z^2}{2\mathcal R T_m}\right],
$$
which has no finite free surface. For $\gamma\ne1$, constant $T$ and constant $K$ would force constant density, contradicting hydrostatic balance on a nontrivial vertical interval. This is the <zero-radiative-flux obstruction for a polytropic ideal gas>.