# **Stellar Strcuture Modeling**

## *Stelar strcuture equations*

A very "simple (?)" case

* Time independent
* Stars in hydrostatic and thermal equilibrium
* No magnetic field
* No rotation

### Mass conservation

\begin{equation}
\frac{d}{d r} m\left(r\right) = 4 \pi r^2 \rho\left(r\right)
\label{eqn:mass_conservation}
\tag{1}
\end{equation}

### Hydrostatic equilibrium

\begin{equation}
\frac{d}{d r} P\left(r\right) = - \frac{G}{r^2} m\left(r\right) \rho\left(r\right)
\label{eqn:hydrostatic_equilibrium}
\tag{2}
\end{equation}

### Energy conservation

\begin{equation}
\frac{d}{d r} L\left(r\right) = 4 \pi r^2  \rho\left(r\right) \varepsilon
\label{eqn:energy_conservation}
\tag{3}
\end{equation}

### Radiative transfer

* The temprature gradient

\begin{equation}
\frac{d \ln\left(T\right)}{d \ln\left(P\right)} = \nabla
\label{eqn:radiative_transfer}
\tag{4}
\end{equation}

Usign the chain rule, equation $(4)$ can be expanded as

\begin{align}
\frac{d \ln\left(T\right)}{d T}
\frac{d T}{d r}
\frac{d r}{d P}
\frac{d P}{d \ln\left(P\right)} & = \nabla \\
\frac{d \ln\left(T\right)}{d T}
\frac{d T}{d r}
& = \frac{d r}{d P}
\frac{d P}{d \ln\left(P\right)} \nabla \\
\frac{d T}{d r}
& = \frac{T}{P}
\frac{d P}{d r} \nabla
\end{align}

Usign equation $(2)$ we have

\begin{equation}
\frac{d}{d r}T\left(r\right) = 
- \frac{G}{r^2} 
\frac{m\left(r\right) \rho\left(r\right) T\left(r\right)}{P\left(r\right)} \nabla
\label{eqn:radiative_transfer_2}
\tag{5}
\end{equation}

In general

\begin{equation}
\nabla = (1 - \xi) \nabla_{rad} + \xi \nabla_{ad}
\end{equation}

* $\nabla_{rad}$ is the tempraure gradient in radiative equilibrium given by

\begin{equation}
\nabla_{rad} = \frac{3}{16 \pi a c} \frac{P \bar\kappa}{T} \frac{L}{GM}
\label{eqn:radiative_temperature_gradient}
\tag{6}
\end{equation}

* $\nabla_{ad}$ is the tempraure gradient in adiabatic convective equilibrium given by

\begin{equation}
\nabla_{ad} = \frac{\gamma - 1}{\gamma}
\label{eqn:adiabatic_temperature_gradient}
\tag{7}
\end{equation}

* $\xi$ is the "convective efficiency"
    - $\xi = 0$ for radiative equilibrium
    - $\xi = 1$ for adiabatic convection
    - $0 < \xi < 1$ for non-adiabatic convection

## Boundary conditions

### Eulerian frame

We have our stellar structure equations specified with $r$ as the independent variable

\begin{align}
\frac{d}{d r} m\left(r\right) & = 4 \pi r^2 \rho\left(r\right) \\
\frac{d}{d r} P\left(r\right) & = - \frac{G}{r^2} m\left(r\right) \rho\left(r\right) \\
\frac{d}{d r} L\left(r\right) & = 4 \pi r^2  \rho\left(r\right) \varepsilon \\
\frac{d}{d r} T\left(r\right) & = - \frac{G}{r^2} \frac{m\left(r\right) \rho\left(r\right) T\left(r\right)}{P\left(r\right)} \nabla \\
\end{align}

### Lagrangian frame

Is convenient for us to deal with our set of equations using the mass as the independen variable

\begin{align}
\frac{d}{d m} r\left(m\right) & = \frac{r}{4 \pi r^2\left(m\right) \rho\left(m\right)} \\
\frac{d}{d m} P\left(m\right) & = - \frac{G m}{4 \pi r^2\left(m\right)}  \\
\frac{d}{d m} L\left(m\right) & = \varepsilon \\
\frac{d}{d m} T\left(m\right) & = - \frac{G m}{4 \pi r^4\left(m\right)} \frac{T\left(m\right)}{P\left(m\right)} \nabla \\
\end{align}

### Boundary conditions

Since we have 4 equations we need 4 boundary counditions to solve te eqations above

* At the center

\begin{align}
r\left(m = 0\right) & = 0 \\
L\left(m = 0\right) & = 0
\end{align}

* At the surface

\begin{align}
P\left(m = M_\star\right) & = 0 \\
T\left(m = M_\star\right) & = T_{eff}
\end{align}

with the effective temperature $T_{eff}$ given by 

\begin{equation}
T_{eff} = \left(\frac{L_\star}{4 \pi R_\star \sigma}\right)^\frac{1}{4}
\label{eqn:effective_temperature}
\tag{8}
\end{equation}

where $L_\star$ and $R_\star$ are the Luminocity at the  surface of the star and the star redius, respectively.

## Constitutive relations

* All our equations, and our magnitudes, are given as function of $\varepsilon$, $\rho$ and  $\nabla$
* $\nabla$ is dependent of aditional parameters $\bar\kappa$ and $\xi$
  - $\bar\kappa$ is the opacity
  - $\xi$ is the convective efficiency
* These quantities can be expresed in terms of state variables and chemical composition
  - $P$ pressure
  - $T$ temperature
  - $\chi_i$, chemical composition
* The relation between this magnitudes are constitutive relations and complements the stellar structure equations

\begin{equation}
    \begin{array}[lcrr] \\
        \rho        & = & \rho        (P, T, \chi_i)                  & \mathrm{(state\ equation)}          \\
        \varepsilon & = & \varepsilon (P, T, \chi_i)                  & \mathrm{(energy\ generation\ rate)} \\
        \bar\kappa  & = & \bar\kappa  (P, T, \chi_i)                  & \mathrm{(opacity)}                  \\
        \xi         & = & \xi         (P, T, \chi_i)                  & \mathrm{(convective\ efficiency)}   \\
        \nabla      & = & \nabla      (P, T, \chi_i, \bar\kappa, \xi) & \mathrm{(energy\ transport)}        \\
    \end{array}
\end{equation}

## Polytropes

* Polytropes provide a simplified stellar model that can be used to tell some approximate behavior of stellar interiors
* In polytropes the relation between pressure $P$ and density $\rho$ are related by

\begin{equation}
P = K \rho^{1 + \frac{1}{n}}
\label{eqn:politrope_pressure}
\tag{9}
\end{equation}

* $n$ is called the *polytropic index*
* $K$ and $n$ are constants
* Polytropic models allow us to avoid dealing with both the heat transfer and thermal balance


* **It does not necessarily have to be that the EOS is in this form, rather, the stratification of the star could obey this type of scaling**

### The Lane-Endem equation

From hydrostatic equilibrium equation in the Eulerian frame, we have

\begin{align}
\frac{d}{d r} P\left(r\right) & = - \frac{G}{r^2} m\left(r\right) \rho\left(r\right) \\
\frac{r^2}{\rho\left(r\right)} \frac{d}{d r} P\left(r\right) & = - G m\left(r\right)
\end{align}

Taking derivative and using the mass conservation equation

\begin{align}
\frac{r^2}{\rho\left(r\right)} \frac{d}{d r} P\left(r\right) & = - G m\left(r\right) \\
\frac{d}{dr}\left(\frac{r^2}{\rho\left(r\right)} \frac{d}{d r} P\left(r\right)\right) & = - G \frac{d}{dr}m\left(r\right) \\
\frac{d}{dr}\left(\frac{r^2}{\rho\left(r\right)} \frac{d}{d r} P\left(r\right)\right) & = - 4 \pi G r^2 \rho\left(r\right) \\
\frac{1}{r^2}\frac{d}{dr}\left(\frac{r^2}{\rho\left(r\right)} \frac{d}{d r} P\left(r\right)\right) & = - 4 \pi G \rho\left(r\right)
\label{eqn:lane_endem_1}
\tag{10}
\end{align}

To make the last expression dimensionless, we postulate a function $\theta$ such that

$$
\rho(r) = \rho_c \theta^n\left(r\right)
\label{eqn:theta_density}
\tag{11}
$$

where $\rho_c$ is the density at the center of the star

$$
\rho_c = \rho\left(r = 0\right)
$$

Replacing $(10)$ in $(9)$ we get

\begin{align}
P & = K \rho^{1 + \frac{1}{n}} \\
P  & = K \left(\rho_c \theta^n \left(r\right)\right)^{1 + \frac{1}{n}} \\
P  & = K \rho_c^{1 + \frac{1}{n}} \rho_c \theta^{1 + n}\left(r\right) \\
P  & = P_c \theta^{1 + n}\left(r\right)
\label{eqn:theta_pressure}
\tag{12}
\end{align}

where

\begin{equation}
P_c = K \rho_c^{1 + \frac{1}{n}}
\end{equation}

Replacing $(11)$ and $(12)$ in $(10)$

$$
\frac{1}{r^2}\frac{d}{dr}\left(\frac{r^2}{\rho\left(r\right)} \frac{d}{d r} P\left(r\right)\right)  = - 4 \pi G \rho\left(r\right) \\
\frac{1}{r^2 }\frac{d}{dr}\left(\frac{r^2}{\rho_c \theta^n\left(r\right)}\frac{d}{dr}\left(P_c \theta^{n+1}\left(r\right)\right)\right)  = - 4 \pi G \rho_c \theta^n\left(r\right) \\
\frac{1}{r^2 }\frac{d}{dr}\left(\frac{P_c r^2 (n + 1 ) }{4 \pi G \rho_c^2 }\frac{d\theta}{dr}\right)  = - \theta^n
$$

Here we introduce _"length scale"_ the constant given by

$$
r^2_n = \frac{(n + 1)P_c}{4 \pi G \rho_c^2 }
\label{eqn:length_scale}
\tag{14}
$$

An the function $\xi$

$$r = r_n \xi
\label{eqn:xi_eq}
\tag{15}
$$


Replacing $(14)$ and $(15)$ in $(13)$, finally we get the Lane-Endem equation

\begin{align}
\frac{1}{r^2 }\frac{d}{dr}\left(r^2 r_n^2 \frac{d\theta}{dr}\right) & = - \theta^n \\
\frac{1}{r_n^2 \xi^2 r_n}\frac{d}{d\xi}\left(\frac{r_n^2 \xi^2 r_n^2}{r_n} \frac{d\theta}{d\xi}\right) & = - \theta^n \\
\frac{1}{\xi^2}\frac{d}{d\xi}\left(\xi^2\frac{d\theta}{d\xi}\right) & = - \theta^n
\label{eqn:lane_endem}
\tag{16}
\end{align}

For this eqation we need boundary conditions to define the problem. From $(11)$ and $(12)$

* $\rho_c$ is the central density
* $P_c$ is the pressure ad the center and is 0 due to sperical symmety and hydrostatic equilibrium

then

\begin{align}
\theta(\xi = 0) & = 1 \\
\left.\frac{d\theta}{d\xi}\right|_{\xi=0} & = 0
\end{align}

* Integrating outward, the surface will be defined as the first zero of θ.

\begin{equation}
\xi_1: \theta\left(\xi_1\right) = 0
\end{equation}

* The physical radius of the star is then just

\begin{equation}
R_\star = r_n\xi_1
\end{equation}

* Solutions that do not diverge (because of the symmetry and boundary conditions) are called E-solutions

### Analytic Solutions for the Lane-Endem equation (With `sympy`! :D)

* Only n = 0, 1, and 5 have analytic solutions

380a6909265168542708b6d60ae181bd95f7e6a7
ipynb
Jupyter Notebook
lane_emden_equation.ipynb
RcrdPhysics/Estructura-Estelar
23fe348ab0a49caf7f0c6c25c9bed4b669930d1e
MIT
lane_emden_equation.ipynb
RcrdPhysics/Estructura-Estelar
23fe348ab0a49caf7f0c6c25c9bed4b669930d1e
MIT
lane_emden_equation.ipynb
RcrdPhysics/Estructura-Estelar
23fe348ab0a49caf7f0c6c25c9bed4b669930d1e
MIT
Qwen/Qwen-72B
1. YES
2. YES