JGrebot / fcc-bz-mesh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fcc-bz-mesh

About

This repo allows to build, with GMSH python API, a mesh of a face cubic centered (f.c.c.) Brillouin Zone (BZ): full, 1/2, 1/8 and 1/48 of the BZ. Refinement box in the delta and L valley can optionnaly be added.

Dependency

Dependencies are the following:

matplotlib==3.5.2
numpy==1.22.4
gmsh=4.10.3=hc719622_0
# python-gmsh=4.10.3 (for conda environment only)

What is the BZ

With the file plot_bz_outline.py you can visualize the convex hull of the full BZ we wish to mesh.

Typing

python3 plot_bz_outline.py

gives

Creating meshes of the BZ

The file BZ.py is the main script. To see all options, just type:

python3 BZ.py --help

and read.

Though mesh_type you can select either 1, 1/2, 1/8 or 1/48 of the BZ. mesh_name controls the name of the written mesh. You can visualize the geometry and the mesh though -vm and -gm options. Then you can add refienements box with the --refine_L and --refine_delta options.

For instance,

python3 BZ.py -t 1 -n test-mesh-bz -lmin 3e-2 -lmax 10e-2 -vm --refine_delta 0.1 0.125 0.1 --refine_L 0.1 0.125 0.3

gives the following mesh:

python3 BZ.py -t 2 -n test-mesh-bz -lmin 3e-2 -lmax 10e-2 -vm --refine_delta 0.1 0.125 0.1 --refine_L 0.1 0.125 0.3

python3 BZ.py -t 8 -n test-mesh-bz -lmin 3e-2 -lmax 10e-2 -vm --refine_L 0.1 0.125 0.3

python3 BZ.py -t 48 -n test-mesh-bz -lmin 3e-2 -lmax 10e-2 -vm --refine_delta 0.1 0.125 0.1 --refine_L 0.1 0.125 0.3

What's next ?

You can now use this repo from my friend Rémi Helleboid in order to actually compute the band structure on the created mesh. And visualize the output with Paraview to get nice animations.

Other tools

With the script pathBZ.py you can easily create a list of points along a path of high-symmetry points in the BZ.
For example, if you want 1000 points along the path $L \Gamma XWKULWXK \Gamma$, the command is:
python pathBZ.py -p LGXWKULWXKG -nb 1000 -o my_path.csv
The result is stores in the file my_path.dat with a standard format:
0.250000 0.250000 0.250000
0.249732 0.249732 0.249732
0.249464 0.249464 0.249464
...


About

License:GNU General Public License v3.0


Languages

Language:Python 100.0%