# [mesa-users] Full ionization

Ehsan Moravveji e.moravveji at gmail.com
Mon Oct 27 09:49:58 EDT 2014

```Hello MESA users,

On my continuing plan to prepare some classroom exercises based on MESA outputs, I came across an interesting feature that would like to share with you, and ask for your comments.

The idea is to check the assumption of P_ideal = P_gas + P_rad, where P_gas means pressure from fully-ionized ideal gas: P_gas=R_gas*Rho*T/mu.

Then, I calculate the above P_ideal inside two models: 1Msun and 10Msun. I also read the total pressure returned from EOS and stored in the output profile file as P_mesa.

Then, I would like to check for the difference between P_mesa and P_tot, so I define delta to be a relative difference between the two:
delta = (P_mesa - P_tot) / P_mesa * 100 [%]
delta essentially tests how well the stellar interior can be considered as a fully ionized mixture of ideal gas + radiation.
Now, please take a look at the three attached plots.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ans03-profile-1Msun.png
Type: image/png
Size: 167041 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20141027/e33ff36b/attachment.png>
-------------- next part --------------

Here, for a 1Msun model, delta is large and also blows up close to the surface. To me, the reason is partial ionization at cooler temperatures, and therefore the logical departure from the assumption of the gas being ideal fully ionized.

The second figure is quite similar to the first but for a 10 Msun model:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ans03-profile-10Msun.png
Type: image/png
Size: 144735 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20141027/e33ff36b/attachment-0001.png>
-------------- next part --------------

Here, MESA is doing better, since at higher temperatures, the full ionization is relatively better fulfilled.

Then, i look at the above ?delta? quantity that I defined, only in the core and on the surface of the 10 Msun model, and trace it during the main sequence.
The x-axis gives the drop in core hydrogen mass fraction.
Here, I find an interesting feature in the core (bottom panel): delta is somehow cyclic!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ans03-hist-10Msun.png
Type: image/png
Size: 298201 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20141027/e33ff36b/attachment-0002.png>
-------------- next part --------------

How should I understand this?
I set use_lnPgas = .true., so MESA is using the interpolated EOS tables. Is what I?m seeing representative of cyclic interpolation goodness?
Sometimes delta is close to 0.0% and sometimes it goes up to ~0.30 %.

I use v.6794, and the inlist is attached. To avoid writing a long email, I cut out some details, so let me know if something is unclear.

Cheers
Ehsan.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: inlist_exercise
Type: application/octet-stream
Size: 4788 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20141027/e33ff36b/attachment.obj>
-------------- next part --------------

```