User Tools

Site Tools


qcl:sweeping_variables

This is an old revision of the document!


Sweeping variables

The nextnanomat graphical user interface allows to sweep any variable of the nextnano.QCL input file. Algebraic expressions are also supported.

First, the variable to be swept has to be declared in the input file:

  <Variables> <!--Declaration of variables used in the Input-file.-->
    <Constant>
      <Name Comment="Correlation Length for interface roughness">$Lcorrel</Name>
      <Value Unit="">5</Value>          
    </Constant>
  </Variables> 

Then in the template tab of nextnanomat, the defined variable can be sweep. More information about the template feature of nextnanomat is documented here.

Algebraic expressions

Calculations are also supported as a function of a sweeping variable, using the following syntax:

<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>
...

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:

	<Layer>
		<Material>barrier</Material>
		<Thickness unit="nm">$(4.1*exp(-(x-1)^2/sigma^2))</Thickness>
	</Layer>

The syntax of all possible expressions can be found on http://mathparser.org/mXparser.

qcl/sweeping_variables.1552494540.txt.gz · Last modified: 2019/03/13 16:29 by thomas.grange