2.6.7. import{} (optional)¶
Specifications for importing data from a file or generating them from an analytic function, e.g. electrostatic potential, alloy profile, strain profile, doping profile, generation rate profile, electron or hole Fermi level profile.
Once a file has been imported or a function has been defined, it can be used several times, e.g. the same file could include the alloy concentration of a ternary for different region objects.
Data with dimensionality deviating from the simulation dimension can also be imported, e.g. an absorption spectrum for solar cell modeling.
- directory
- value:
string
- example:
“D:\import_files\”
Name of directory where files to be imported are located (if data are imported from files)
- file{}
- name
- example:
“1D_import”
Name for referencing the imported data in the input file, e.g. “imported_potential_profile_2D”
- filename
- example:
“D:\any_filename.fld”
Name of file which is imported. If an absolute path is included here, the entry in directory specified above is ignored.
- alternative:
“any_filename.fld”
Name of file which is imported. The file should be located here: directory\filename
- format
- options:
AVS
DAT
Format of the file to be imported. At the moment only AVS format and a simple .dat format are supported.
- number_of_dimensions
- options:
1
2
3
Explicit specification of the number of dimensions. Can be only used for .dat files.
(Optional, default value is given by dimensionality of simulation defined in global{})
- scale
- examples:
1.6022e-19
-1
- default:
1
Imported data is multiplied by this scaling factor (optional) .
Useful to correct unit of imported data, e.g. conversion from [Joule] to [eV].
- analytic_function{}
define analytic functions to be imported here. Does not need to be defined if data are imported from files.
- name
- example:
“Analytic_Potential”
Name for referencing the imported function in the input file, e.g. “analytic_function_gaussian”
- function
- example:
“1+2*x^2+exp(y)”
String defining the function in case only one component needs to be defined, otherwise use component.
Note
Syntax allowed for functions:
white spaces are ignored
valid operators are “+”, “-”, “*”, “/” and “^”
multiplication signs always have to be spelled out (i.e. “5*x” is valid, “5x” is not)
variable names are fixed to “x”, “y” and “z” (capital letters are also allowed)
additional functions also available (e.g. “exp” , “sqrt”, “sin”, see full list below), have to be followed by brackets (“exp(x)” is valid, “exp x” is not)
global variables are allowed if preceded by “$” (e.g. “$PI”)
exponential notation (“2e-3” or “4E10”) is allowed
- label
- example:
“potential_label”
Label (optional) to be displayed in legend in case only one component is defined, otherwise see component.
- component{}
In case multiple components are needed, define one component group for each component.
- function_i
- example:
“1D_import”
String defining the function for this component.
- label
- example:
“component_label”
Label (optional) to be displayed in legend for this component.
- output_imports{}
Output all imported data including scale factor.
The filenames correspond to the entry given in name = ….
The files will be written to a folder called Imports/.
- Operators and Functions supported by
analytic_function
(sorted with decreasing precedence)Operators
power (exponentiation)
^
multiplication, division
*
/
plus and minus
+
-
round arithmetic brackets
(
)
Following functions (sorted with decreasing precedence) are supported:
sqrt()
square root \(\sqrt{\text{ }}\)
cbrt()
cubic root \(\sqrt[3]{\text{ }}\)
exp()
exponential function \(\exp({\text{ }})\)
log()
natural logarithm \(\log\)
ln()
natural logarithm \(\ln\)
log2()
decadic logarithm (base 2) \(\log_{2}\)
log10()
decadic logarithm (base 10) \(\log_{10}\)
sin()
sine \(\sin({\text{ }})\)
cos()
cosine \(\cos({\text{ }})\)
tan()
tangent \(\tan({\text{ }})\)
asin()
acrsine \(\sin^{-1}({\text{ }})\)
acos()
arccosine \(\cos^{-1}({\text{ }})\)
atan()
arctangent \(\tan^{-1}({\text{ }})\)
sinh()
hyperbolic sine \(\sinh({\text{ }})\)
cosh()
hyperbolic cosine \(\cosh({\text{ }})\)
tanh()
hyperbolic tangent \(\tanh({\text{ }})\)
asinh()
inverse hyperbolic sine \(\sinh^{-1}({\text{ }})\)
acosh()
inverse hyperbolic cosine \(\cosh^{-1}({\text{ }})\)
atanh()
inverse hyperbolic tangent \(\tanh^{-1}({\text{ }})\)
erf()
error function \(\text{erf}({\text{ }})\)
erfc()
complementary error function \(\text{erfc}({\text{ }})\)
gamma()
Gamma function \(\Gamma({\text{ }})\)
fdm3half()
complete Fermi–Dirac integral \(F_{-3/2}({ })\) of order -3/2 (includes the \(1/\Gamma(-1/2)\) prefactor)
fdmhalf()
complete Fermi–Dirac integral \(F_{-1/2}({ })\) of order -1/2 (includes the \(1/\Gamma(1/2)\) prefactor)
fdzero()
complete Fermi–Dirac integral \(F_{0}({ })\) of order 0 (includes the \(1/\Gamma(1)=1\) prefactor)
fdphalf()
complete Fermi–Dirac integral \(F_{1/2}({ })\) of order 1/2 (includes the \(1/\Gamma(3/2)\) prefactor)
fdp3half()
complete Fermi–Dirac integral \(F_{3/2}({ })\) of order 3/2 (includes the \(1/\Gamma(5/2)\) prefactor)
abs()
absolute value \(|{\text{ }}|\)
floor()
floor function floor(x): largest integer \(\le x\)
ceil()
ceiling function ceil(x): smallest integer \(\ge x\)
round()
rounds the number to the nearest integer
sign()
sign function
heaviside()
Heaviside step function (corresponds to
isnotnegative()
)
ispositive()
check if value is positive
isnegative()
check if value is negative
iszero()
check if value is zero
isnotpositive()
check if value is not positive
isnotnegative()
check if value is not negative (corresponds to
heaviside()
)
isnotzero()
check if value is not zero