# test title: test

go atlas simflags="-P 4"
#go atlas simflags="-V 5.30.0.R -P 4"

set	LN="01_TEG1"

#optimize
set qf1=-5.08362

set nta1=0.16e21
set wta1=0.018

set nga1=5e17
set wga1=0.29
set ega1=0.1

set ntd1=0.0e18
set wtd1=0.3
#set egd1=2.6
set ngd1=0e17
set egd1=0.2
set wgd1=0.12

mesh inf=$"LN".str width=20

# **** doping
doping	region=2 uniform conc=1.0e17 n.type
doping	region=2 gauss x.right=-4   conc=3e19 char=0.4 n.type
doping	region=2 gauss x.left=4   conc=3e19 char=0.4 n.type

# **** interface
#interface   y.min=-0.0001 y.max=0.0001 qf=1.0e5
interface x.min=-5.0 x.max=5.0 y.min=-0.03001 y.max=-0.02999 qf=$qf1

# **** material
material material=IGZO EG300=2.8 NC300=5.0e18 NV300=5.0e18 \
	 affinity=4.7 permittivity=12

	 material material=SiO2 permittivity=3.9

# **** IGZO.TOKYO mobility model
#mobility igzo.tokyo mun=55 mup=0.00001 tmun=0 tmup=0 \
#	 igzo.gamma0=-0.8 igzo.tgamma=330 igzo.ncrit=9.0e19
#mobility f.tofimun="mob_6c.c"
#mobility f.tofimun="mob_3.c"
mobility f.tofimun="IGOX.c"
#mobility f.tofimun="IGOX2.c"
#mobility f.tofimun="IGOX_scat.c"


# **** defects
#defects region=2 continuous numa=101 numd=101 \
#        afile=12_defacc.out dfile=13_defdon.out \
#        nta=6.0e20 ntd=1.0e18 wta=0.004 wtd=0.3 \
#        nga=1.0e17 ngd=1e17 ega=0 egd=2.6 wga=0.7 wgd=0.12 \
#        sigtae=1.0e-18 sigtah=1.0e-18 sigtde=1.0e-18 sigtdh=1.0e-18 \ 
#        siggae=1.0e-18 siggah=1.0e-18 siggde=1.0e-18 siggdh=1.0e-18

#optimize
defects region=2 continuous numa=101 numd=101 \
        afile=12_defacc.out dfile=13_defdon.out \
        nta=$nta1 ntd=$ntd1 wta=$wta1 wtd=$wtd1 \
        nga=$nga1 ngd=$ngd1 ega=$ega1 egd=$egd1 wga=$wga1 wgd=$wgd1 \
        sigtae=1.0e-18 sigtah=1.0e-18 sigtde=1.0e-18 sigtdh=1.0e-18 \ 
        siggae=1.0e-18 siggah=1.0e-18 siggde=1.0e-18 siggdh=1.0e-18

# **** contact
#contact name=gate workfun=4.3
#contact name=source workfun=4.29
#contact name=drain  workfun=4.29


# **** models
models fermi temp=303 print

#method newton itlimit=64
method  newton itlimit=64 climit=1e-4 gumits=100

probe name="ne_1n" n.conc x=0 y=-0.001
probe name="mob_1n" n.mob x=0 y=-0.001

#output e.field con.band val.band band.param e.mobility charge flowlines ox.charge


# **** solve

solve init
solve prev

#solve vgate = 0.0 vstep= 0.1 vfinal=10.0 name=gate
#solve vdrain= 0.1                        name=drain
#solve vgate = 0.0 vstep= 0.1 vfinal=10.0 name=gate
#solve vdrain= 0.1 vstep= 0.1 vfinal= 5.0 name=drain

solve vdrain=0.1 name=drain

#solve vgate=0.0 vstep=10 vfinal=20.0 name=gate
solve vgate=0.0 vstep=1.0 vfinal=8.0 name=gate
log off

#log   outf=id-vg_vd=001.log
log   outf=id-vg_vd=001.log no.trap
#solve vgate =20.0                        name=gate
#save  outf=vg1050vd2001.out master
#solve vgate =20.0 vstep=-1.0 vfinal=-5.0 name=gate
#save  outf=vg2100vd2001.out master
#solve vgate=20.0 vstep=-1.0 vfinal= 1.0 name=gate
solve vgate=8.0 vstep=-1.0 vfinal= 2.0 name=gate
#solve vgate=20.0 vstep=-1.0 vfinal= 0.0 name=gate
#solve vgate= 0.0 vstep=-1.0 vfinal=-5.0 name=gate
#solve vgate= 0.0 vstep=-1.0 vfinal=-2.0 name=gate
#solve vgate= 0.0 vstep=-1.0 vfinal=-2.0 name=gate

#optimize
#extract name="idvg" curve(v."gate",i."drain") outfile="idvg_calc_1sub.dat"
extract name="idvg" curve(v."gate",i."drain") outfile="idvg_calc_2onl.dat"

log off

quit
