def __init__(self, config, family='S', nTF=16, obj='L'): self.nTF = nTF self.config = config datadir = trim_dir('../../Data') file = 'salome_input' # config # +'_{}{}{}'.format(family,nTF,obj) self.filename = datadir + '/' + file + '.json' self.profile = Profile(config['TF'], family=family, load=True, part='TF', nTF=nTF, obj=obj, npoints=250) setup = Setup(config['eq']) self.sf = SF(setup.filename) self.tf = TF(self.profile, sf=self.sf) self.pf = PF(self.sf.eqdsk) self.PF_support() # calculate PF support seats self.CS_support() # calculate CS support seats self.Gravity_support() self.cage = coil_cage(nTF=nTF, rc=self.tf.rc, ny=3, plasma={'config': config['eq']}, coil=self.tf.x['cl']) self.eq = EQ(self.sf, self.pf, dCoil=0.5, sigma=0, boundary=self.sf.get_sep(expand=0.5), n=1e3) self.eq.plasma() self.ff = force_feild(self.pf.index, self.pf.coil, self.eq.coil, self.eq.plasma_coil)
tf.energy(nTF,Iturn=134*68e3) pl.plot(tf.Rmid,tf.Zmid) ''' #setup = Setup('SN') #sf = SF(setup.filename) #eq = EQ(sf,pf,sigma=0.2,boundary=rb.get_fw(expand=0.25),n=7.5e4) #eq.plotj(trim=True) #pl.plot(sf.rbdry,sf.zbdry,color=0.75*np.ones(3),lw=1.5) for conf in ['SN', 'X', 'SFm', 'SX', 'SXex']: # print(conf) setup = Setup(conf) sf = SF(setup.filename) pf = PF(sf.eqdsk) rb = RB(setup, sf) rb.firstwall(calc=False, plot=True, debug=False) rb.vessel() pf.plot(coils=pf.coil, label=True, plasma=False, current=False) tf = TF(nTF=18, shape={ 'vessel': rb.loop, 'pf': pf, 'fit': False, 'setup': setup, 'plot': True, 'config': conf, 'coil_type': 'A' }) tf.fill()