set zwth=10
set taun=1e-6
set taup=1e-9
###########
go atlas
mesh space.mult=1.0 width=$zwth
x.mesh loc=0.0 spac=0.01
x.mesh loc=0.25 spac=0.01
x.mesh loc=1.0 spac=0.01
x.mesh loc=2.0 spac=0.005
x.mesh loc=2.5 spac=0.005
x.mesh loc=3.0 spac=0.005
x.mesh loc=3.25 spac=0.01
x.mesh loc=3.5 spac=0.01
x.mesh loc=4.0 spac=0.01
y.mesh loc=-0.11 spac=0.002
y.mesh loc=-0.1 spac=0.01
y.mesh loc=0.0 spac=0.005
y.mesh loc=0.02 spac=0.005
y.mesh loc=0.04 spac=0.005
y.mesh loc=0.06 spac=0.005
y.mesh loc=0.08 spac=0.005
y.mesh loc=0.8 spac=0.05
y.mesh loc=0.6 spac=0.05
y.mesh loc=1.0 spac=0.15
########Regions
region number=1 x.min=0 x.max=4 y.min=-0.11 y.max=0 material=Si3N4
###Channel
#region number=4 x.min=0.0 x.max=4.0 y.min=0.0 y.max=0.08 material=Si
####source and drain
region number=2 x.min=0.0 x.max=0.50 y.min=-0.05 y.max=0.0 material=Si
region number=3 x.min=3.5 x.max=4.0 y.min=-0.05 y.max=0.0 material=Si
#########Gate
region number=7 x.min=1.75 x.max=2.25 y.min=-0.1 y.max=-0.02 material=poly
####substrate
region number=5 x.min=0.0 x.max=4.0 y.min=0 y.max=1.0 material=Si
######Insulator
region number=6 x.min=1 x.max=3 y.min=-0.02 y.max=0 material=Si3N4
#####Electrodes
electrode name=source material=Aluminium x.min=0.0 x.max=0.5 y.min=-0.10 y.max=-0.045
electrode name=drain material=Aluminium x.min=3.50 x.max=4.0 y.min=-0.10 y.max=-0.045
electrode name=gate material=poly x.min=1.75 x.max=2.25 y.min=-0.1 y.max=-0.02
######Doping
doping uniform region=2 n.type conc=1e20
doping uniform region=3 n.type conc=1e20
doping uniform region=4 p.type conc=1e14
doping uniform region=5 p.type conc=1e14
doping uniform region=7 n.type conc=1e20
#doping uniform x.min=0.0 x.max=5.0 y.min=0.5 y.max=1.0 n.type conc=1e12
##### structure
save outf=GM_SiC.str
tonyplot GM_SiC.str
quit