go atlas
init inf= double_gate.str
output band.par con.band val.band
# set material models
models cvt srh print
contact name=gate n.poly
interface qf=3e10
method newton
solve init
# Bias the drain
solve vdrain=0.1
# Ramp the gate
log outf=double_gate.log master
solve vgate=0 vstep=0.25 vfinal=3.0 name=gate
save outf=double_gate_1.str
# plot results
tonyplot double_gate.log -set double_gate_log.set
# extract device parameters
extract name="nvt" (xintercept(maxslope(curve(abs(v."gate"),abs(i."drain")))) \
- abs(ave(v."drain"))/2.0)
extract name="nbeta" slope(maxslope(curve(abs(v."gate"),abs(i."drain")))) \
* (1.0/abs(ave(v."drain")))
extract name="ntheta" ((max(abs(v."drain")) * $"nbeta")/max(abs(i."drain"))) \
- (1.0 / (max(abs(v."gate")) - ($"nvt")))
quit