nugrid_set.py 文件源码

python
阅读 37 收藏 0 点赞 0 评论 0

项目:NuGridPy 作者: NuGrid 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号