def TPAGB_core_growth(self,fig, label="",color='k',marker_type='<',linestyle='-'):
'''
Creates diagram of the core growth during AGB phase.
Uses function mult_DUP to identify first TP cycle
and subtract from last cycle of simulation.
(Tested with 2 cases)
'''
m=self.run_historydata
i=0
t0_model=self.set_find_first_TP()
core_growth=[]
ini_m=[]
plt.figure(fig)
for case in m:
mH_first_TP=case.get('h1_boundary_mass')[t0_model[i]]
mH_last_TP=case.get('h1_boundary_mass')[-1]
core_growth.append(mH_last_TP-mH_first_TP)
ini_m.append(case.header_attr["initial_mass"])
i += 1
plt.plot(ini_m,core_growth,marker=marker_type,color=color,markersize=10,mfc=color,linewidth=2,linestyle=linestyle,label=label)
xlabel('Initial star mass $[M_{\odot}]$',fontsize=18)
ylabel('Core growth $[M_{\odot}]$',fontsize=18)
legend()
评论列表
文章目录