Up
  This is the old documentation.
Here's the link to the new documentation.
run{}
Specifications for the program execution (program flow)
Note: There are two syntaxes for run{} .
 New syntax (recommended syntax
for versions newer than 20200501)
 Deprecated syntax (used in versions
older than 20200430. Nevertheless, it will still work in later versions.)
run{
structure_only{
#
If present, calculation is aborted after structure setup, similarly to when the
command line flag s or structure
is set.
last_region = 5
# But differently from the command line flag, if last_region is present, partical structure
initialization is performed,
# i.e. the simulation prints out the structure up to
the (last) region index 5 (any integer
>= 1 can be specified, default is: 1000000 ).
}
# This is useful for debugging your structure definition, e.g. if you have
a 2D or 3D simulation with many material regions, contact regions, doping
regions and generation regions overlapping each other in a complictated way.
# The files in the output directory Structure/ will then reflect this partial initialization.
#
(Note that in case not all regions are used here, some initialization and output steps related to strain, poisson, current, quantum, cbr, optics, etc.
will be omitted in order to avoid inconsistencies.)
# Strain
strain{}
#
solves the strain equation
# Poisson equation
poisson{}
#
solves the Poisson equation
# Schroedinger equation
quantum{}
#
solves the Schrödinger equation
#
Exchangecorrelation effects (optional) can be included and are
calculated from the quantum density. Then the Schrödinger
#
equation is solved again but this time including the exchangecorrelation
potential energy.
# coupled CurrentPoisson equations
current_poisson{
#
solves the coupled current and Poisson equations selfconsistently
#
fast_poisson =
yes/no # (default is:
no ) If enabled, Newton iterations for Poisson in the middle of the classical currentPoisson iteration will be limited to 1.
# Note that enabling this setting may also influence stability of convergence or change the optimal value for alpha_fermi .
#
Typically, fast_poisson =
yes increases the number of iterations but
significantly reduces the overall execution time.
#
multi_stage_solve =
yes/no # (default is:
no ) Flag in order to solve classical current equation
first with
# recombination/generation
switched off in order to get a good starting point, and then with
# recombination/generation
switched on (if any recombination models are switched on).
# Can be used to improve convergence in some situations but may increase runtime in others.
#
system_solve =
yes/no #
Alternative new iteration method for classical currentPoisson (default is:
no )
# This Newton method may provide better convergence for some systems (but may require different values of convergence parameters).
# system_solve =
yes results in Fermi levels and
potential being simultaneously updated as a system of unknowns during the
iteration.
#
Irrespective of its value, system_solve always takes the value of current_repetitions
into account.
iterations =
30 # number of iterations
for currentPoisson solver (default is:
100 )
fermi_limit =
2.0 # [eV] Defines how far the
quasiFermi levels can move above the highest / below the lowest contact. (0.0
<= fermi_limit <= 10.0 ; default is: 2.0 )
# Except in case of huge bandgaps and extreme photogeneration, the defaults should not require any change.
# At the same time, in the absence of any externally induced photogeneration, these values could be set to zero in order to stabilize the iteration.
current_repetitions =
1 # number of
currentdensity iterations (default is: 1 ). The
current equations are repeatedly solved for the quasiFermi levels with the
densities fixed.
#
The current equation for the electrons and for the holes are solved
independently with a common and fixed recombination term.
# For each
iteration, the densities are adjusted according to the new quasiFermi levels of
the previous iteration.
# current_repetitions
defines number of these repetitions.
# If
generation/recombination is present, using a value >
1 (e.g. 5 )
may stabilize the iteration and
# sometimes enable faster
convergence (larger alpha_fermi may also be possible then).
limit_repetitions =
no #
yes / no (default is:
no ). If enabled, the currentdensity loop is exited early as soon as residual_fermi
is reached by the quasiFermi levels.
residual =
1e5
# (dimension dependent!!!)
residual occupation changes (default is:
1e5/cm^{2
} (1D),
1e3/cm
(2D), 1e3
[dimensionless]
(3D))
residual_fermi =
1e5 # residual
Fermi level changes (default is:
1e5 [eV] ). This value is also used during quantum_current_poisson .
alpha_fermi =
1.0e5
#
underrelaxation parameter for Fermi level [dimensionless] (0.00001 < alpha_fermi <=
1.0 , default is: 1.0 )
# The final quasiFermi level for electrons after each iteration is
calculated as follows:
# E_{F,n} = ( E_{F,n} of previous iteration ) * ( 1
 alpha_fermi ) + ( E_{F,n} of actual
iteration ) * alpha_fermi
# This Fermi level is then input to the next iteration.
# The same holds for the Fermi level E_{F,p }for holes.
# The value of alpha_fermi
will change due to alpha_scale
during the iterations. The actually used alpha_fermi
is now included in
# iteration_current_poisson.dat and
# iteration_quantum_current_poisson_details.dat .
alpha_iterations =
1000 # number of alpha iterations (default is:
1000 )
alpha_scale =
0.998 # alpha scale (default is:
0.998 [dimensionless] )
0.1 <= alpha_scale <= 1.0
# Both for classical and for quantum iterations, alpha_fermi will be reduced further as
# alpha_fermi < max( alpha_fermi * alpha_scale , 1e5)
# at each iteration step once the number of iterations exceeds alpha_iterations .
# Use this feature to improve convergence (particularly confergence of Fermi levels) towards the end of the iteration.
# Note that decreasing alpha_fermi too fast (a problem with
older versions) will result in the iteration stalling
# (only the residuals of the densities but none of the Fermi levels decrease).
# The total current equation may then not be properly conserved.
output_log
= yes
# Output of convergence of (classical) currentPoisson equation into 'iteration_current_poisson.dat ' (default:
yes ).
}
#
Note: Both conditions
specified by
residual and
residual_fermi must hold in order to consider a calculation as converged.
# Schroedinger equation
quantum_density{
#
solves the Schrödinger equations
(selfconsistent density/exchange)
iterations =
20
# see
quantum_poisson{}
residual =
1e5 # see
quantum_poisson{}
use_subspace
= yes/no
# see
quantum_poisson{}
subspace_iterations
= 1
# see
quantum_poisson{}
subspace_residual_factor =
1e12 # see
quantum_poisson{}
output_log
= yes/no # see
quantum_poisson{}
}
# coupled SchroedingerPoisson equations
#
When
quantum_poisson{} is desired, note that additionally either poisson {}
or
current_poisson{} is required.
quantum_poisson{
#
solves the SchrödingerPoisson equations
selfconsistently
iterations =
20
# number of iterations, i.e. selfconsistency cycles (default is: 30 )
residual =
1e5 #
(dimension dependent!!!)
residual
of the integrated total charge carrier density changes (default is:
1e5/cm^{2
} (1D),
1e3/cm
(2D), 1e3
[dimensionless]
(3D))
# (applies to exact Schrödinger equation, not to subspace Schrödinger
equation)
# Note: If you do not include enough eigenstates, the convergence
behavior might be affected as the occupation of the eigenstates is not
considered in a useful way.
use_subspace
= yes/no
# solve Schrödinger equation within subspace of eigenvectors of
previous iteration
# as long as achieved residual is larger than desired residual * residual_factor
# and at least in every second iteration (default is: yes)
subspace_iterations
= 1
# 1 <= subspace_iterations <= 1000
subspace_residual_factor =
1e12 #
controls number of subspace iterations (default is:
1e12
[dimensionless] ) 2.0 <=
subspace_residual_factor
#
# It holds for
use_subspace = yes :
# if (residual in densities > residual
* subspace_residual_factor)
{
# use only approximate quantum solutions
# } else {
# alternate one exact and subspace_iterations approximate quantum solutions
# }
# terminate iteration when residual in densities <
residual for exact quantum solution
#
#
Use subspace_iterations > 1
to further reduce computational load (i.e. runtime) from exact quantum solutions (the best value is systemdependent).
#
Note that the number of iterations may not change or even increase.
#
In rare cases (e.g. when a huge number of eigenvalues is computed), selecting use_subspace =
no may be faster.
output_log
= yes/no #
Output of convergence of SchrödingerPoisson equation (residuals for quantum_poisson )
into the logfile iteration_quantum.dat
(default is: yes )
}
# coupled SchroedingerCurrentPoisson equations
#
When
quantum_current_poisson{} is desired, note that additionally
either poisson {} or
current_poisson{} is required.
quantum_current_poisson{
#
solves the SchrödingerCurrentPoisson equations
selfconsistently
# In order to solve the SchrödingerCurrentPoisson equations, current_poisson
must be defined in the input file.
iterations =
20
# see quantum_poisson{}
residual =
1e5 #
see quantum_poisson{}
use_subspace
= yes/no
# see quantum_poisson{}
subspace_iterations
= 1 #
see quantum_poisson{}
subspace_residual_factor =
1e12 #
see quantum_poisson{}
fermi_limit =
2.0 # see
current_poisson{}
current_repetitions = 2 # number of
currentdensity iterations (default is: 2 ). The
current equation is repeatedly solved for the quasiFermi levels.
# For each
iteration, the densities are adjusted according to the new quasiFermi levels of
the previous iteration.
# current_repetitions
defines number of these repetitions.
# If
generation/recombination is present, using a value >
1 (e.g. 5 )
may stabilize the iteration and
# sometimes enable faster
convergence (larger alpha_fermi may also be possible then).
limit_repetitions =
no #
yes / no (default is:
no ). If enabled, the currentdensity loop is exited early as soon as residual_fermi
is reached by the quasiFermi levels.
residual_fermi =
1e5 # residual
Fermi level changes (default is: 1e5 [eV] )
alpha_fermi =
1.0e1
# The Fermi level is underrelaxed between repetitions using an underrelaxation
parameter for the Fermi levels.
# It
should be used once an oscillation of residuals is observed while
selfconsistently solving
# the
Poisson and Schrödinger (and current) equations to improve convergence.
# (default is: 1.0
[dimensionless] , possible range:
0.00001 <= alpha_fermi
<= 1.0 )
#
for further information please read comments on alpha_fermi
parameter above
alpha_iterations =
1000 # number of alpha iterations (default is:
1000 )
alpha_scale =
0.998 # alpha scale (default is:
0.998 [dimensionless] )
0.1 <= alpha_scale <= 1.0
# Both for classical and for quantum iterations, alpha_fermi will be reduced further as
# alpha_fermi < max( alpha_fermi * alpha_scale , 1e5)
# at each iteration step once the number of iterations exceeds alpha_iterations .
# Use this feature to improve convergence (particularly confergence of Fermi levels) towards the end of the iteration.
# Note that decreasing alpha_fermi too fast (a problem with
older versions) will result in the iteration stalling
# (only the residuals of the densities but none of the Fermi levels decrease).
# The total current equation may then not be properly conserved.
output_log
= yes/no #
Output of convergence of (quantum) currentPoisson equation (residuals for quantum_current_poisson )
into the logfile iteration_quantum_current_poisson.dat
(default is: yes )
}
#
Note: Both conditions specified by residual
and residual_fermi
are only checked between iterations but not between
repetitions.
# Optics
optics{}
# calculate optical properties, see optics{}
optical_device{}
# calculate optical properties, see optics{}
}
Examples
run{
structure_only{}
# If present, calculation is aborted after structure setup.
}
run{}
# just sets up the device geometry
run{
strain{} #
solves the strain equation
}
run{
strain{} #
solves the strain equation
quantum{} #
and
then the Schrödinger equation
}
run{ strain{}
# solves the strain equation poisson{} quantum_poisson{}
#
}
# solves the Schrödinger and Poisson equations selfconsistently
run{
strain{}
# solves the strain equation
current_poisson{}
# solves the coupled current and Poisson equations selfconsistently
quantum_current_poisson{}
# solves the Schrödinger, Poisson and current equations
selfconsistently
}
run{ quantum{} #
solves
the Schrödinger equation
optics{} #
calculates optical properties
}
Using the new syntax (quantum_poisson{} ,
quantum_current_poisson{} ), the classical computations (poisson{}
or current_poisson{} ) can be
specified independent from the quantum calculation to be performed, e.g. it
is now possible to combine poisson{}
with quantum_current_poisson{} to bypass the classical current calculations.
Restrictions
 Poisson: Only maximally one of
poisson{} and
current_poisson{} can be defined,
which defines the classical equation to be solved
(also as first stage before possibly solving any quantum mechanics).
If neither is set, only fixed potentials will be used.
 Quantum: If quantum mechanics is desired, one of
quantum{} ,
quantum_density{} ,
quantum_poisson{} , and
quantum_current_poisson{} must be set.
 The quantum equations to be solved  only quantum, quantum with selfconsistent density/exchange, selfconsistent quantumPoisson,
and selfconsistent quantumcurrentPoisson  are only defined by the choice of
quantum{} ,
quantum_density{} ,
quantum_poisson{} , and
quantum_current_poisson{} , irrespective of the choice of the
classical solution method.
Note that one of poisson{} and
current_poisson{} must be set when
quantum_poisson{} or
quantum_current_poisson{} is desired.
Use poisson{} in conjunction with
quantum_current_poisson{} to skip classical current calculations.
 Quantum with selfconsistent density/exchange is solved by selection of
quantum_density{} (users can change parameters in there as needed).
Further remarks
 20190124: At the end of
current_poisson{} , Poisson is now solved once to make the
band structure consistent with the Fermi levels. In case of incomplete
convergence, the partly converged output is then more in line with
physical intuition.
 Input residuals and tolerances are rescaled to various internal units (often in a dimensiondependent manner,
i.e. they are different for 1D, 2D and 3D simulations)
before being passed to lowlevel numerical routines like ARPACK, LAPACK, BLAS, nonlinear solvers, etc.
Therefore, diagnostic output from lowlevel numerical solvers usually contains values which are completely
different from those which are output by the highlevel physics routines or output into files.
 There are logfiles that track the converence behavior of the
iterations during the simulation.
The convergence information for the respective selfconsistent equations
can be plotted. It is best to use a logarithmic scale.
iteration_current_poisson.dat 
current_poisson{}

Convergence of coupled CurrentPoisson with classical
densities
iteration_quantum_density.dat 
quantum_density{} 
Convergence of Schrödinger equation with selfconsistent
density/exchange
iteration_quantum_poisson.dat 
quantum_poisson{} 
Convergence of outer iteration loop for SchrödingerPoisson
iteration_quantum_current_poisson.dat 
quantum_current_poisson{} 
Convergence of outer iteration loop,
i.e. for CurrentPoissonSchrödinger with quantum densities
iteration_quantum_current_poisson_details.dat 
quantum_current_poisson{}  Convergence of current equation, i.e. for CurrentPoisson with quantum densities
run{
# Strain
solve_strain{} #
solves the strain equation
# Poisson equation
solve_poisson{}
#
solves the Poisson equation
# Schroedinger equation
solve_quantum{}
#
solves the Schrödinger equation
#
Exchangecorrelation effects (optional) can be included and are
calculated from the quantum density. Then the Schrödinger
#
equation is solved again but this time including the exchangecorrelation
potential energy.
# coupled CurrentPoisson equations
solve_current_poisson{
#
solves the coupled current and Poisson equations selfconsistently
# It is also called once before
a SchrödingerPoissonCurrent selfconsistent iteration is started but
not during the latter.
#
fast_poisson =
yes/no # (default is:
no ) If enabled, Newton iterations for Poisson in the middle of the classical currentPoisson iteration will be limited to 1.
# Note that enabling this setting may also influence stability of convergence or change the optimal value for alpha_fermi .
#
Typically, fast_poisson =
yes increases the number of iterations but
significantly reduces the overall execution time.
#
multi_stage_solve =
yes/no # (default is:
no ) Flag in order to solve classical current equation
first with
# recombination/generation
switched off in order to get a good starting point, and then with
# recombination/generation
switched on (if any recombination models are switched on).
# Can be used to improve convergence in some situations but may increase runtime in others.
#
use_newmethod =
yes/no # Alternative new iteration method for classical currentpoisson (default is:
no )
# The Newton method may provide better convergence for some systems (but may require different values of convergence parameters).
# Note that classical
current_repetitions currently has no effect when the new method is selected.
iterations =
30 # number of iterations for currentPoisson solver (default is:
100 )
fermi_limit =
2.0 # [eV] Defines how far the
quasiFermi levels can move above the highest / below the lowest contact. (0.0
<= fermi_limit <= 10.0 ; default is: 2.0 )
# Except in case of huge bandgaps and extreme photogeneration, the defaults should not require any change.
# At the same time, in the absence of any externally induced photogeneration, these values could be set to zero in order to stabilize the iteration.
current_repetitions =
1 # number of
currentdensity iterations (default is: 1 ). The
current equations are repeatedly solved for the quasiFermi levels with the
densities fixed.
#
The current equation for the electrons and for the holes are solved
independently with a common and fixed recombination term.
# For each
iteration, the densities are adjusted according to the new quasiFermi levels of
the previous iteration.
# current_repetitions
defines number of these repetitions.
# If
generation/recombination is present, using a value >
1 (e.g. 5 )
may stabilize the iteration and
# sometimes enable faster
convergence (larger alpha_fermi may also be possible then).
limit_repetitions =
no # see
quantum_current_poisson{}
residual =
1e5
# (dimension dependent!!!)
residual occupation changes (default is:
1e5/cm^{2
} (1D),
1e3/cm
(2D), 1e3
[dimensionless]
(3D))
residual_fermi =
1e5 # residual
Fermi level changes (default is:
1e5 [eV] ). This value is also used during quantum_current_poisson .
alpha_fermi =
1.0e5
#
underrelaxation parameter for Fermi level [dimensionless] (0.00001 < alpha_fermi <=
1.0 , default is: 1.0 )
# The final quasiFermi level for electrons after each iteration is
calculated as follows:
# E_{F,n} = ( E_{F,n} of previous iteration ) * ( 1
 alpha_fermi ) + ( E_{F,n} of actual
iteration ) * alpha_fermi
# This Fermi level is then input to the next iteration.
# The same holds for the Fermi level E_{F,p }for holes.
# The value of alpha_fermi
will change due to alpha_scale
during the iterations. The actually used alpha_fermi
is now included in
# iteration_current_poisson.dat and
# iteration_quantum_current_poisson_details.dat .
alpha_iterations =
1000 # number of alpha iterations (default is:
1000 )
alpha_scale =
0.998 # alpha scale (default is:
0.998 [dimensionless] )
0.1 <= alpha_scale <= 1.0
# Both for classical and for quantum iterations, alpha_fermi will be reduced further as
# alpha_fermi < max( alpha_fermi * alpha_scale , 1e5)
# at each iteration step once the number of iterations exceeds alpha_iterations .
# Use this feature to improve convergence (particularly confergence of Fermi levels) towards the end of the iteration.
# Note that decreasing alpha_fermi too fast (a problem with
older versions) will result in the iteration stalling
# (only the residuals of the densities but none of the Fermi levels decrease).
# The total current equation may then not be properly conserved.
output_log
= yes
# Output of convergence of (classical) currentPoisson equation into 'iteration_current_poisson.dat ' (default:
yes ).
}
#
Note: Both conditions
specified by
residual and
residual_fermi must hold in order to consider a calculation as converged.
# coupled SchroedingerCurrentPoisson equations
outer_iteration{
#
solves the SchrödingerPoisson or SchrödingerCurrentPoisson equations
selfconsistently
# In order to solve the SchrödingerCurrentPoisson equations, current_poisson
must be defined in the input file.
iterations =
20
# see quantum_poisson{}
residual =
1e5 #
see quantum_poisson{}
use_subspace
= yes/no
# see quantum_poisson{}
subspace_iterations
= 1
#
see quantum_poisson{}
subspace_residual_factor =
1e12 #
see quantum_poisson{}
fixed_fermi_levels
= yes/no
# prevent update of Fermi levels. No selfconsistent current is computed.
(default is: no)
# This freezes all Fermi levels in the outer iteration, i.e. the Fermi levels calculated in the classical currentPoisson are not changed anymore during the outer iteration.
# As results, there is no selfconsistency between quantum densities and current equation anymore, but convergence typically is much better.
# The result is essentially a semiclassical approximation which works best if quantum effects do not change the densities too much.
# Note: If fixed_fermi_levels
= yes , then
current_repetitions , alpha_fermi , and
residual_fermi are ignored.
fermi_limit =
2.0 # see current_poisson{}
current_repetitions = 2
# see
quantum_current_poisson{}
limit_repetitions =
no # see
quantum_current_poisson{}
residual_fermi =
1e5 # see
quantum_current_poisson{}
alpha_fermi =
1.0e1
# see quantum_current_poisson{}
alpha_iterations =
1000 # see
quantum_current_poisson{}
alpha_scale =
0.998 # see
quantum_current_poisson{}
output_log
= yes/no #
Output of convergence of (quantum) currentPoisson equation (residuals for outer_iteration )
into the logfile
# iteration_quantum_current_poisson.dat
or
# iteration_quantum_poisson.dat
(default is: yes )
}
#
Note: both conditions specified by residual
and residual_fermi
are only checked between iterations but not between
repetitions.
Examples
run{}
# just sets up the device geometry
run{
solve_strain{} #
solves the strain equation
solve_quantum{} #
and
then the Schrödinger equation
}
run{
solve_poisson{}
solve_quantum{}
outer_iteration{}
#
solves the Schrödinger and Poisson equations selfconsistently
}
run{ solve_current_poisson{}
# solves the coupled current and Poisson equations selfconsistently solve_quantum{}
# solves the Schrödinger equation outer_iteration{}
# solves the Schrödinger, Poisson and current equations
selfconsistently }
Restrictions
 Poisson: Only maximally one of
solve_poisson{} and
solve_current_poisson{} can be defined,
which defines the classical equation to be solved
(also as first stage before possibly solving any quantum mechanics).
If neither is set, only fixed potentials will be used.
 Quantum: If quantum mechanics is desired,
solve_quantum{}
must be set.
 If, in addition to
solve_quantum{}
also outer_iteration{}
is set,
 the selfconsistent quantumPoisson equations are selfconsistently solved when
solve_poisson{} is set or
solve_current_poisson{}
is set with fixed_fermi_levels =
yes , and
 the selfconsistent quantumcurrentPoisson equations are
selfconsistently solved when solve_current_poisson{}
is set with fixed_fermi_levels =
no .

Note that one of
solve_poisson{} and
solve_current_poisson{} must be set in conjunction with outer_iteration{} .
And it is not possible to skip classical current calculation if the quantumcurrentPoisson equations
are to be solved.

If
outer_iteration{} is not set, solve_quantum{} solves quantum mechanics only, unless both
solve_poisson{} and
solve_current_poisson{} are not set as well.
In this case, quantum with selfconsistent density/exchange is solved using the default parameters from outer_iteration{} (parameters cannot be changed by users here).
