map profs from rmin to rho

2021-05-18  本文已影响0人  Armlinux
#map profs from rmin to rho(normlized sqrt(psi_toriodal))
# rmin rho in gfile
node=OMFIT['ASIPP_IM']['EASTdatas']['CASES']['71605']['3.501']
gfile=node['gfile']
Rmax=gfile['fluxSurfaces']['geo']['Rmax_centroid']*1.
Rmin=gfile['fluxSurfaces']['geo']['Rmin_centroid']*1.
rmin_=(Rmax-Rmin)/2
print rmin_
rmin_gf=rmin_/max(rmin_)
print rmin_gf
rho_gf=gfile['fluxSurfaces']['geo']['rhon']*1
# interp1d
case='case1'
for item in ['ne','te','ti']:
    node_mat=OMFIT['ASIPP_IM']['EASTdatas']['CASES']['71605']['mat']
    if len(node_mat['rho'+item+'_'+case])>51:
        ind=range(0,501,5)
        prof_exp=node_mat[item+'_'+case][ind]*1.
        rho_exp=node_mat['rho'+item+'_'+case][ind]*1.
    else:
        prof_exp=node_mat[item+'_'+case]*1.
        rho_exp=node_mat['rho'+item+'_'+case]*1.
    rmin_gf[0]=0
    prof_rho=interp1d(rho_exp,prof_exp)(rmin_gf)
    node['datas'][item]=interp1d(rho_gf,prof_rho)(linspace(0,1,201))



上一篇下一篇

猜你喜欢

热点阅读