# this script is used to plot J-V and V-P curves # after voltage sweep in DEVICE # #clear; #closeall; # dim=getnamed('CHARGE simulation region','dimension');# 3 is 3D, 0,1,2 are 2D if(dim!='3D'){ area = getnamed('CHARGE','norm length')*getnamed("CHARGE simulation region","x span"); } if(dim=='3D'){ area = getnamed("CHARGE simulation region","x span")*getnamed("CHARGE simulation region","y span"); } if(area<1e-14){ ?"please set correct simulation dimension"; } # J_base = pinch( getdata("CHARGE","base.I"))/area; V_base = pinch(getdata("CHARGE","base.Vs"));#get source voltage # J-V plot(V_base,J_base*0.1,"Voltage [volts]", "Current Density [mA/cm^2]"); # p=-J_base*V_base;# the negative sign is to take into account of the current flow direction at low voltage plot(V_base,p*0.1,"Voltage [volts]", "Power [mW/cm^2]");