shp.tf.fill() sf.eqwrite(sf, config='SXex') ''' inv.Lnorm = Lnorm sw = SWING(inv,sf) sw.flat_top() sw.output() for ends,name in zip([0,-1],['SOF','EOF']): inv.solve_slsqp(inv.swing['flux'][ends]) eq.run(update=False) sf.eqwrite(pf,config='SXex_{}'.format(name)) ''' rb.write_json(tf=shp.tf) loops.plot_variables(inv.Io, scale=1, postfix='MA') loops.plot_variables(inv.Lo, scale=1) sf.eqwrite(pf, config='SXex') pkl.write(data={'sf': sf, 'eq': eq, 'inv': inv}) # pickle data ''' eq.gen_opp() #rb.firstwall(calc=False,plot=True,debug=False) inv = INV(sf,eq,tf)
rb = RB(sf,setup) rb.generate(mc,plot=True,DN=False,debug=False) rb.get_sol(plot=True) #pl.plot(rb.segment['divertor']['r'],rb.segment['divertor']['z']) profile = Profile(config['TF'],family='S',part='TF',nTF=nTF,obj='L') shp = Shape(profile,eqconf=config['eq'],ny=3) shp.add_vessel(rb.segment['vessel_outer']) #shp.minimise(ripple=ripple,verbose=True) shp.tf.fill() ''' rb.write_json(tf=shp.tf) to = time() pf = PF(sf.eqdsk) eq = EQ(sf,pf,dCoil=0.5,boundary=sf.get_sep(expand=1.05),n=2.5e3) #eq.gen_opp() #sf.contour() #pf.plot(coils=pf.coil,label=True,current=True) inv = INV(sf,eq,shp.tf) sc = scenario(inv) sc.flat_top()