1 #==============================================================================
2 # GSS example: PN Diode simulation
3 # On the first step, we will generate simulation structure for the diode.
4 # Then the generated CGNS file will be used on later steps.
5 #==============================================================================
7 # Create an initial simulation mesh
8 MESH Type=GSS ModelFile=pn.cgns Triangle="pzA"
9 XMESH WIDTH=3.0 N.SPACES=30
10 YMESH DEPTH=3.0 N.SPACES=30
12 # Region and electrode statements
13 REGION Label=Si Material=Si
14 SEGMENT Label=Anode Location=TOP X.MIN=0.0 X.MAX=1.0
15 SEGMENT Label=Cathode Location=BOTTOM
16 SEGMENT Label=Probe Direction=Vertical X=0.5 Y.top=-0.1 Y.bottom=-2
18 # Specify impurity profiles
19 PROFILE Type=Uniform Ion=Donor N.PEAK=1E15 X.MIN=0.0 X.MAX=3.0 \
20 Y.TOP=0.0 Y.BOTTOM=-3.0
21 PROFILE Type=Gauss Ion=Acceptor N.PEAK=1E18 X.MIN=0.0 X.MAX=1.0 \
22 Y.TOP=0.0 Y.BOTTOM=0.0 X.CHAR=0.2 Y.JUNCTION=-0.5
24 #------------------------------------------------------------------------------
25 set Carrier = pn # specify carrier type
26 set LatticeTemp = 3e2 # specify initial temperature of device at 300K.
27 set DopingScale = 1e18
29 #------------------------------------------------------------------------------
30 # no voltage source is needed here.
32 #------------------------------------------------------------------------------
33 # specify boundary condition.
34 boundary Type = OhmicContact ID=Anode Res=0 Cap=0 Ind=0
35 boundary Type = OhmicContact ID=Cathode Res=0 Cap=0 Ind=0
37 #------------------------------------------------------------------------------
38 # drive command, specify the solving process.
40 REFINE Variable=Doping Measure=SignedLog Dispersion=3 #refine by doping
43 # specify DDM method,this is the default solver.
44 METHOD Type=DDML1 Scheme=Newton NS=LineSearch LS=GMRES #Fermi=On
45 SOLVE Type=EQUILIBRIUM #compute equilibrium state
46 REFINE Variable=Potential Measure=Linear Dispersion=0.1 #refine by potential
49 SOLVE Type=EQUILIBRIUM #compute equilibrium state again on the refined mesh
50 # plot simulation variables
51 PLOT PS.OUT=a.ps Variable=Na Resolution=RES.High AzAngle=40 ElAngle=40 Style=Color
52 PLOT Variable=Nd Resolution=RES.High AzAngle=40 ElAngle=40 Style=Color
53 PLOT Variable=ElecDensity Resolution=RES.High Measure=SignedLog AzAngle=40 ElAngle=40
54 PLOT Variable=HoleDensity Resolution=RES.High Measure=SignedLog AzAngle=40 ElAngle=40
55 PLOT Variable=Potential Resolution=RES.High AzAngle=40 ElAngle=40
56 PLOT Variable=Temperature Resolution=RES.High AzAngle=40 ElAngle=40
57 # export mesh and solution
58 EXPORT CoreFile=pn.cgns AscFile=pn.tif VTKFile=pn.vtk