Beispiel #1
0
import seaborn as sns
rc = {
    'figure.figsize': [7 * 10 / 16, 7],
    'savefig.dpi': 250,  #*12/16
    'savefig.jpeg_quality': 100,
    'savefig.pad_inches': 0.1,
    'lines.linewidth': 1
}
sns.set(context='poster',
        style='white',
        font='sans-serif',
        palette='Set2',
        font_scale=0.75,
        rc=rc)
Color = cycle(sns.color_palette('Set2'))

text = linelabel(Ndiv=20, value='')

nTF = 18

for eq in ['DEMO_SN_SOF', 'DEMO_SN_EOF']:
    config = {'TF': 'demo', 'eq': eq}
    config, setup = select(config, nTF=nTF, update=False)
    sf = SF(setup.filename)
    sf.get_boundary(plot=True, alpha=1 - 1e-5)
    text.add(eq)
    sf.sol(plot=True)

text.plot()
pl.axis('equal')
pl.axis('off')
Beispiel #2
0
    config = 'DEMO_SNb'
    setup = Setup(config)
    sf = SF(setup.filename)
    sf.get_boundary(plot=True)

    pf = PF(sf.eqdsk)
    eq = EQ(sf, pf, limit=[4.5, 14.5, -8, 8], n=1e4)
    rb = RB(setup, sf)
    #sf.contour(plot_vac=True)

    #sf.get_legs(debug=True)

    rb.set_firstwall(sf.eqdsk['xlim'], sf.eqdsk['ylim'])
    pl.plot(rb.Rb, rb.Zb)

    sf.sol(dr=3e-3)
    rb.get_sol(plot=True)

    pl.plot(sf.eqdsk['xlim'], sf.eqdsk['ylim'])

    r = demo.parts['Vessel']['r']  # set vessel boundary
    z = demo.parts['Vessel']['z']

    r, z = geom.offset(r, z, 0.2)  # 200mm offset from vessel
    r, z = geom.rzSLine(r, z, npoints=20)
    rb.loop = geom.Loop(r, z)

    #sf.sol(plot=True)
    '''
        nTF = 18
        tf = TF(shape={'vessel':rb.loop,'pf':pf,'sf':sf,'fit':True,