This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
qcl:sweeping_variables [2019/03/13 14:43] thomas.grange |
qcl:sweeping_variables [2020/06/09 13:12] (current) admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Sweeping variables ====== | ====== Sweeping variables ====== | ||
- | The nextnanomat graphical user interface allows to sweep any variable of the nextnano.QCL input file. Algebraic expressions are also supported. | + | The nextnanomat graphical user interface allows to sweep any variable of the nextnano.NEGF input file. Algebraic expressions are also supported. |
- | The template feature of nextnanomat is documented here: [[http://www.nextnano.com/dokuwiki/doku.php?id=nnm:template |here]]. | ||
First, the variable to be swept has to be declared in the input file: | First, the variable to be swept has to be declared in the input file: | ||
Line 11: | Line 11: | ||
<Constant> | <Constant> | ||
<Name Comment="Correlation Length for interface roughness">$Lcorrel</Name> | <Name Comment="Correlation Length for interface roughness">$Lcorrel</Name> | ||
- | <Value Unit="">5</Value> | + | <Value Unit="">5</Value> |
- | <ListOfValues>2,3,5,7,10,15</ListOfValues><!--Optional flag. Read in by nextnanomat template-tab.--> | + | |
</Constant> | </Constant> | ||
</Variables> | </Variables> | ||
</code> | </code> | ||
+ | |||
+ | Then in the template tab of nextnanomat, the defined variable can be sweep. More information about the template feature of nextnanomat is documented [[http://www.nextnano.com/dokuwiki/doku.php?id=nnm:template |here]]. | ||
+ | |||
+ | {{ :qcl:template.png?direct&1000 |}} | ||
+ | |||
+ | === Algebraic expressions === | ||
+ | Calculations are also supported as a function of a sweeping variable, using the following syntax: | ||
+ | <code> | ||
+ | <Variables> <!--Declaration of variables used in the Input-file.--> | ||
+ | <Constant> | ||
+ | <Name Comment="Scaling factor.">$x</Name> | ||
+ | <Value Unit="">1</Value> | ||
+ | </Constant> | ||
+ | </Variables> | ||
+ | ... | ||
+ | | ||
+ | <Superlattice> | ||
+ | <Layer> | ||
+ | <Material>barrier</Material> | ||
+ | <Thickness unit="nm">$(x*4.1)</Thickness> | ||
+ | </Layer> | ||
+ | |||
+ | <Layer> | ||
+ | <Material>well</Material> | ||
+ | <Thickness unit="nm">$(x*16.0)</Thickness> | ||
+ | </Layer> | ||
+ | |||
+ | <Layer> | ||
+ | <Material>barrier</Material> | ||
+ | <Thickness unit="nm">$(x*4.3)</Thickness> | ||
+ | </Layer> | ||
+ | |||
+ | <Layer> | ||
+ | <Material>well</Material> | ||
+ | <Thickness unit="nm">$(x*8.9)</Thickness> | ||
+ | </Layer> | ||
+ | |||
+ | <Layer> | ||
+ | <Material>barrier</Material> | ||
+ | <Thickness unit="nm">$(x*2.46)</Thickness> | ||
+ | </Layer> | ||
+ | |||
+ | <Layer> | ||
+ | <Material>well</Material> | ||
+ | <Thickness unit="nm">$(x*8.15)</Thickness> | ||
+ | </Layer> | ||
+ | ... | ||
+ | </code> | ||
+ | For example, above all the layers of the structure are scaled with the same factor. | ||
+ | |||
+ | More complicated functions can be used, such as for a example: | ||
+ | <code> | ||
+ | <Layer> | ||
+ | <Material>barrier</Material> | ||
+ | <Thickness unit="nm">$(4.1*exp(-(x-1)^2/sigma^2))</Thickness> | ||
+ | </Layer> | ||
+ | </code> | ||
+ | |||
+ | The syntax of all possible expressions can be found on [[http://mathparser.org/mXparser]]. | ||
+ |