Notebook criado para analisar a influencia do parametro diffusion_cgs_solver no teste make_o_ne_wd


In [21]:
%pylab
%matplotlib inline
import mesa as ms
import numpy as np
import matplotlib
matplotlib.rcParams['figure.figsize'] = (14.0, 7.0) #(14.0, 10.0)
import matplotlib.pyplot as plt


Using matplotlib backend: TkAgg
Populating the interactive namespace from numpy and matplotlib

In [24]:
# folder com o teste make_o_ne_wd
#folder = '/media/glauffer/Data/mesa/create_wd/test_suite/make_o_ne_wd/LOGS15/history_editado.data'
folder = '/media/glauffer/Data/mesa/create_wd/test_suite/make_o_ne_wd/LOGS15/'

# lendo os dados
hist = ms.history_data(folder)
teff = hist.get('log_Teff')
lum = hist.get('log_L')
#from astropy.table import Table
#tbl = Table.read(folder, format='ascii.basic', guess=False, header_start=5, data_start=6)
plot(teff, lum, '.-')
#plot(teff[2518], lum[2518], 'ko')
gca().invert_xaxis()
ylabel(r'$\log L$')
xlabel(r'$\log Teff$')


Using old history.datasa file ...
 reading ...100% 

Closing history.data  tool ...
Out[24]:
<matplotlib.text.Text at 0x7f1001695390>

Devido ao parametro diffusin_cgs_solver o arquivo history.data ficou todo bagunçado. Eu tive que editar o arquivo, fazendo com que eu perdesse os dados de alguns modelos

Perfil quimico no modelo final


In [26]:
models = hist.get('model_number')
prof = ms.mesa_profile(folder, models[-1], num_type='nearest_model')

q = prof.get('q')
logq = - prof.get('logxq')

h1 = prof.get('h1')
#he3 = prof.get('he3')
he4 = prof.get('he4')
c12 = prof.get('c12')
#c13 = prof.get('c13')
#n13 = prof.get('n13')
n14 = prof.get('n14')
#n15 = prof.get('n15')
o16 = prof.get('o16')
#o18 = prof.get('o18')
ne20 = prof.get('ne20')
#ne22 = prof.get('ne22')
mg24 = prof.get('mg24')

plt.plot(logq, he4, color='darkolivegreen', lw=1.5, label=r'$He_4$')
plt.plot(logq, c12, color='k', lw=1.5, label=r'$C_{12}$')
plt.plot(logq, n14, color='r', lw=1.5, label=r'$N_{14}$')
plt.plot(logq, o16, color='g', lw=1.5, label=r'$O_{16}$')
plt.plot(logq, ne20, color='y', lw=1.5, label=r'$Ne_{20}$')
plt.plot(logq, mg24, color='m', lw=1.5, label=r'$Mg_{24}$')
plt.plot(logq, h1, color='b', lw=1.5, label=r'$H_1$')
plt.xlabel(r'$- \log (1 - q)$')
plt.ylabel('mass fraction')
plt.title('Perfil Quimico ' + ' - model n ' + str(model[-1]))
plt.legend(bbox_to_anchor=(1.01, 1), loc=2, borderaxespad=0.)
plt.xlim(0, 20)


59 in profiles.index file ...
Found and load nearest profile for cycle 2611
reading /media/glauffer/Data/mesa/create_wd/test_suite/make_o_ne_wd/LOGS15//profile59.data ...
 reading ...95%
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-26-423ee6b4ee8c> in <module>()
     28 plt.xlabel(r'$- \log (1 - q)$')
     29 plt.ylabel('mass fraction')
---> 30 plt.title('Perfil Quimico ' + ' - model n ' + str(model[-1]))
     31 plt.legend(bbox_to_anchor=(1.01, 1), loc=2, borderaxespad=0.)
     32 plt.xlim(0, 20)

NameError: name 'model' is not defined
 reading ...100% 

Closing profile tool ...

In [ ]: