Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build a supercell model #27

Open
kabume opened this issue Dec 30, 2021 · 3 comments
Open

How to build a supercell model #27

kabume opened this issue Dec 30, 2021 · 3 comments

Comments

@kabume
Copy link
Contributor

kabume commented Dec 30, 2021

How can we build a supercell model to calculate the edge states? like below:

----------
AAAAABBBBB
----------

e.g., A is a topological non-trivial photonic cell and B is trivial, and "----" means Bloch boundary conditions.

By the way, it seems that we cannot build a rectangular lattice, such as a1=[1, 0], a2=[0, 2], an error would appear:

ERROR: AssertionError: norm(b1) ≈ norm(b2)

Thanks!

@sp94
Copy link
Owner

sp94 commented Dec 30, 2021

Hi @kabume

There are two functions to make a solver:

solver = Solver(geometry, P) will make a solver with the k-vectors of the plane waves roughly in a circle around k=[0,0]. It assumes that b1 == b2

solver = Solver(geometry, P, Q) will make a solver with the k-vectors of the plane waves in a rhombus from k=±P*b1±Q*b2

For your problem, you probably want to use the second method since b1 != b2

(See the source here: https://github.com/sp94/Peacock.jl/blob/master/src/plane_wave_basis.jl#L57)

@kabume
Copy link
Contributor Author

kabume commented Dec 31, 2021

Thanks! I'm sorry for forgetting it. Would you mind showing an example of the supercell in the documentation? It would be friendly for a wider audience.

@sp94
Copy link
Owner

sp94 commented Feb 23, 2022

Hi @kabume
Sorry for the long delay. Did you make any progress? I may be able to share an example if you don't have one already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants