Beispiel #1
0
config = 'X'  # SN,X,SX,SF
conf = Config(config, inside=False)
sf = SF(conf)
rb = RB(conf, sf, Np=150)
eq = EQ([2, 16], [-10, 9], 5000, sf)
sf.plasma_coils(N=7, dL=0.25)
eq.coils(delta=0.25)  # multi-filiment coils
#sf.contour()

r, z = sf.get_boundary(alpha=0.95)
L = sf.length(r, z)
Lc = np.linspace(0, 1, 21)[:-1]

fix = {}
fix['r'], fix['z'] = interp1(L, r)(Lc), interp1(L, z)(Lc)
fix['value'] = eq.Pcoil(fix['r'], fix['z'])
fix['BC'] = np.array(['psi'] * len(fix['r']))
'''
fix['r'] = np.append(fix['r'],8.6089790197)
fix['z'] = np.append(fix['z'],-7.12320200125)
fix['value'] = np.append(fix['value'],eq.Pcoil(8.608,-7.123))
fix['BC'] = np.append(fix['BC'],'psi')
'''
fix['r'] = np.append(fix['r'], 8.6089790197)
fix['z'] = np.append(fix['z'], -7.12320200125)
fix['value'] = np.append(fix['value'], 0)
fix['BC'] = np.append(fix['BC'], 'Br')

fix['r'] = np.append(fix['r'], 8.6089790197)
fix['z'] = np.append(fix['z'], -7.12320200125)
fix['value'] = np.append(fix['value'], 0)
Beispiel #2
0
pl.axis('off')

conf = Config('X')
sf = SF(conf)
rb = RB(conf,sf,Np=150)
eq = EQ([4,12.5],[-9.5,6.5],5e4,sf)
sf.plasma_coils(N=11,dL=0.25)
eq.coils(delta=0.25)  # multi-filiment coils 

r,z = sf.get_boundary(alpha=0.95)
L = sf.length(r,z)
Lc = np.linspace(0,1,21)[:-1]

fix = {}
fix['r'],fix['z'] = interp1(L,r)(Lc),interp1(L,z)(Lc)
fix['value'] = eq.Pcoil(fix['r'],fix['z'])
fix['BC'] = np.array(['psi']*len(fix['r'])) 

rx,zx = 8.9,-8

fix['r'] = np.append(fix['r'],rx)
fix['z'] = np.append(fix['z'],zx)
fix['value'] = np.append(fix['value'],eq.Pcoil(sf.Xpoint[0],sf.Xpoint[1]))
fix['BC'] = np.append(fix['BC'],'psi')


fix['r'] = np.append(fix['r'],rx)
fix['z'] = np.append(fix['z'],zx)
fix['value'] = np.append(fix['value'],0)
fix['BC'] = np.append(fix['BC'],'Br')