[mesa-users] Having some fun with mu

Ehsan Moravveji e.moravveji at gmail.com
Fri Sep 12 05:40:10 EDT 2014


Hello all,
I've been experimenting here and there, and like to check recovering the profile of the mean molecular weight (mu), as it is written out in profiles. 
For that purpose, I use the following simple block (see Eq. (7.34) in Maeder (2009)) to calculate my mu, and later compare it with MESA's:

   do i = 1, nz
      mu_inv = 0d0
      do j = 1, species
         id = s% chem_id(j)
         weight  = chem_isos% W(id)
         charge  = chem_isos% Z(id)
         m_frac  = s% xa(j, i)
         mu_inv = mu_inv + m_frac * (1d0 + charge) / weight
      enddo
      mu(i) = 1d0 / mu_inv
   enddo

The resulting comparison plot is attached. There you easily notice that I fail to reproduce mu as done internally in MESA. This is for a 5 Msun model stopping at center_h1=0.4. I use v.6871, and the very basic inlist that I use is also attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inlist_mu
Type: application/octet-stream
Size: 1130 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20140912/0c9b1ecc/attachment.obj>
-------------- next part --------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Comp-mu.png
Type: image/png
Size: 44688 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20140912/0c9b1ecc/attachment.png>
-------------- next part --------------

I have to confess that I did not dive deeper into this. But, I only "guess" that either my formula is not well implemented, or the order between burning and mixing in which mu is calculated "might" matter.
Please enlighten me with your comments.

Cheers
Ehsan



More information about the Mesa-users mailing list