コード例 #1
0
ファイル: moveSXcoils_051015.py プロジェクト: tokasamwin/Nova
Mtarget = sf.Mpoint[1]
pl.plot(sf.Mpoint[0],sf.Mpoint[1],'o',markersize=1)

sf.contour(Nstd=1.5)


#sf.coil['Coil8']['I'] *= 1.25
#eq.update_psi()

#sf.contour(Nstd=1.5)

rbdry,zbdry = sf.get_boundary()  # update boundary
pl.plot(rbdry,zbdry,'r')


'''
conf = Config('SXex')
rb = RB(conf,sf,Np=550)
rb.divertor_outline(True)
'''
'''
rb.FWfill(dt=conf.tfw,loop=True,alpha=0.7,color=next(Color),s=2e-3)
rb.fill(dt=conf.BB[::-1],alpha=0.7,ref_o=0.3,dref=0.2,
        referance='length',color=next(Color))
rb.fill(dt=conf.tBBsupport,alpha=0.7,color=next(Color))
rb.BBsheild_fill(dt=conf.sheild,ref_o=0.35*np.pi,dref=0.2*np.pi,offset=1/10*np.pi,
                 alpha=0.7,color=next(Color))
rb.VVfill(dt=conf.VV,ref_o=0.385*np.pi,dref=0.15*np.pi,offset=1/10*np.pi,
          alpha=0.7,loop=True,color=next(Color))

print(rb.targets['outer']['theta']*180/np.pi)
コード例 #2
0
    ax = pl.Subplot(fig, gd[i])
    fig.add_subplot(ax)
    fig.sca(ax)
    pl.axis('equal')
    pl.axis('off')
    pl.tight_layout()
    #pl.xlim([4,14]),pl.ylim([-13,8])
    pl.xlim([3, 17]), pl.ylim([-12, 10])

    conf = Config(config, inside=False)
    sf = SF(conf)
    sf.contour()
    sf.plot_coils(Color)
    conf.TF(sf)
    rb = RB(conf, sf, Np=200)
    rb.divertor_outline(True)
    rb.fill(dt=conf.tfw, alpha=0.7, color=next(Color))
    rb.fill(dt=conf.BB, alpha=0.7, color=next(Color))
    rb.fill(dt=conf.tBBsupport, alpha=0.7, color=next(Color))
    rb.BBsheild_fill(dt=conf.sheild,
                     ref_o=2 / 8 * np.pi,
                     alpha=0.7,
                     color=next(Color))
    rb.fill(dt=conf.VV, alpha=0.7, color=next(Color), loop=True)
    rb.set_TFbound()  # TF boundary conditions
    #rb.TFbound['ro_min'] -= 0.25
    #rb.plot_TFbounds()
    rb.TFopp(False, objF='L')  # L==length, V==volume
    rb.TFfill()

    pl.text(16, 9.5, config, fontsize=36, ha='right', va='top')
コード例 #3
0
figheight = 8.0
mpl.rcParams['figure.figsize'] = [figheight, figheight * 5 / 9]
xlim, ylim = [8, 12], [-8, -7]

pl.figure()
pl.axis('equal')
pl.axis('off')
pl.xlim(xlim)
pl.ylim(ylim)

conf = Config('SX7')
sf = SF(conf, sample=1)
conf.TF(sf)
rb = RB(conf, sf, Np=1e3)
rb.divertor_outline(True, color=next(Color))
Rt, Zt = rb.targets['outer']['R'], rb.targets['outer']['Z']
Ro, Zo = rb.targets['outer']['Rsol'][-1], rb.targets['outer']['Zsol'][-1]
index = np.argmin((Rt - Ro)**2 + (Zt - Zo)**2)
R, Z = Rt[:index + 1], Zt[:index + 1]
graze = sf.get_graze([Ro, Zo], [R[-2] - R[-1], Z[-2] - Z[-1]])
print(graze * 180 / np.pi, rb.targets['outer']['theta'] * 180 / np.pi)

conf = Config('SX8')
sf = SF(conf, sample=1)
conf.TF(sf)
rb = RB(conf, sf, Np=1e3)
rb.divertor_outline(True, color=next(Color))
Rt, Zt = rb.targets['outer']['R'], rb.targets['outer']['Z']
Ro, Zo = rb.targets['outer']['Rsol'][-1], rb.targets['outer']['Zsol'][-1]
index = np.argmin((Rt - Ro)**2 + (Zt - Zo)**2)
コード例 #4
0
        style='white',
        font='sans-serif',
        palette='Set2',
        font_scale=7 / 8,
        rc=rc)

pl.figure()
text = linelabel(Ndiv=42, value=' 1.0f', postfix='m', loc='end')

for config in ['SN', 'SFp', 'SFm']:  #,'SFm','SFp','X','SX8','SXex']: #
    color = next(Color)
    conf = Config(config)
    sf = SF(conf, sample=1)

    rb = RB(conf, sf, Np=250)
    rb.divertor_outline(False, plot=False, debug=False)
    '''
    sf.eq['ncoil'] = 0
    eq = EQ(sf,boundary={'R':rb.Rb,'Z':rb.Zb,'expand':0.5},n=1e4)  #'expand':0.5,'zmax':sf.Xpoint[1]+sf.rcirc+sf.drcirc}
   
    if 'ex' not in config: 
        eq.run()
    eq.set_eq_psi() 
    '''
    sf.sol(Nsol=21, update=True, plot=False)
    rb.trim_sol(plot=False)  # trim legs to targets
    sf.add_core()  # referance low field midplane
    '''
    for i in range(sf.Nsol):
        pl.plot(sf.legs['outer1']['R'][i],sf.legs['outer1']['Z'][i],'k--',alpha=0.15)
    pl.axis('equal')