Applying external fields
It is possible to apply electric and magnetic fields to a material investigated by Fleur.
This is done by adding a fields
element in the calculationSetup
section of the input
file.
Applying magnetic fields
For the application of magnetic fields the fields
element in the calculationSetup
section
looks like:
<fields b_field="0.1"/>
Specifying a field in this way applies it to the whole unit cell. But it is also possible
to only apply a field to a certain atom. For this a special
element has to be inserted
into the respective atomSpecies
section directly below the prodBasis
and energyParameters
entries.
Such an element looks like:
<special b_field_mt="0.1"/>
If you are applying fields in Fleur you should also be aware that:
- The implementation actually only adds simple Zeeman terms to the potential, not proper -fields.
- The fields are not taken into account when calculating the density-potential integrals which enter the total energy..
- Magnetic fields can be applied in film and bulk setups.
Applying electric fields
There are two basic ways of specifying electric fields:
- The values of the sheets of charge for external electric fields is set by requiring charge neutrality. Thus, most easily you can add or subtract a fractional charge by changing the number of valence electrons. The resulting field is shown in the external electric field section of the out file.
<bzIntegration valenceElectrons="8.00100000" ...
Note that adding too much charge to the valence electrons will result in a Fleur error.
- For film unit cells more complex settings are possible using the
<fields>
tag in thecalculationSetup
section. This is done by placing a sheet of charge on either side of the film in the vacuum. In consequence an electric field perpendicular to the film surface is generated. To conserve charge neutrality of the unit cell the total charge added in this way has to be subtracted from the number ofvalenceElectrons
in the film.
In detail the setup for the application of an electric field in this way looks like:
<fields zsigma="0.0" sig_b_1="0.0" sig_b_2="0.0" autocomp="T"
dirichlet="F" eV="F">
<shape> shapestring </shape>
</fields>
The following attributes are provided:
zsigma
: The position of the sheets of charge relative to the vacuum boundary (set by default to 10 a.u. (= 5.291772 Å)).sig_b_1
andsig_b_2
: for charges on the upper and lower plates (default 0.0). Setting these to different values enables to place an asymmetric field.autocomp
: This switch makes sure that overall charge neutrality is automatically calculated.dirichlet
: This switch enables the use of Dirichlet boundary conditions.eV
: This switch is used to modify units in thedirichlet="T"
case.- In addition an (unlimited) number of
<shape>
tags can be given to specify inhomogenous fields.
Inhomogeneous fields can also be generated:
- 'sig_b_1/2' contain the additional (homogeneous) charge for the top and bottom sheet. By default, excess (positive/negative) charge of the film is compensated by equally charging the charge sheets; if 'autocomp' is false, the user has to do this manually. Note: Fleur requires an overall (film plus top plus bottom sheet) charge neutrality.
- The inhomogeneous charge can be placed using the
in which strings are supplied. These strings specify the inhomogenous charges using the key-words rect, circ, rectSinX, polygon, and datafile. Their detailed syntax is:
rect <sheet> <x>,<y> <width>,<height> <charge> [options]
circ <sheet> <x>,<y> <radius> <charge> [options]
rectSinX <sheet> <x>,<y> <width>,<height> <amplitude> <n> <delta> [options]
polygon <sheet> <n_points> <x1>,<x2> ... <x_n>,<y_n> <charge> [options]
datafile <filename> [zero_avg] [options]
Note that all positions and lengths are currently relative values (i.e. between 0 and 1). The sheet to be used can be set
using
Note: The regions can exceed the unit cell plane and then cut off, e.g.
circ top 0,0 0.25 0.5
places half an electron in a quarter circle with origin (0,0). Note, however, that circ creates a perfect circle only on the grid; this generates a circle and not an ellipse only if the ''k1d''/''k2d'' ratio matches the crystal's ''a''/''b'' ratio.
rectSinX creates a sinodal potential in ''x'' direction (constant in ''y'' direction for any ''x'' value), i.e. {}, where ''A'' is the amplitude; however, the argument in apwefl is not ''A'' directly but {}, where {} is the number of points in ''z'' direction. Contrary to circ and rect, charges are masked out without being redistributed to non-masked positions. It is {}, n is the order and delta ({}) the offset.
polygon creates a polygon-shaped charge distribution; note that the currently used algorithm does not always give the perfectly shaped polygon - and the edge points are not always included in the polygon.
The datafile reads the data from a file; if a zero_avg has been given, the charge is averaged to zero, i.e. only the inhomogeneous contributions are taken into account. The option replace/add is supported, but zero/not_zero is not. The syntax of the data file itself is as follows. First line: number of ''x'' and ''y'' points; second line: charge for point (x=1,y=2), third: (x=1,y=2) etc. The number of points must be 3*k1d and 3*k2d.
Example 1: To have two top plates (segments):
rect top 0, 0 0.5,1.0 0.2
rect top 0.5,0 0.5,1.0 -0.2
Example 2: To have a charged ring with 0.2e and -0.2e of charge evenly distributed outside this ring:
circ topBot 0.5,0.5 0.2 1 ! Create temporarily an inner ring
circ topBot 0.5,0.5 0.3 0.2 zero ! Create outer ring
circ topBot 0.5,0.5 0.2 0 replace ! Delete inner ring
rect topBot 0,0 1,1 -0.2 zero ! Place smeared opposite charge