Custom sine basis

48 views
Skip to first unread message

Dmitriy Samosvat

unread,
Aug 27, 2025, 6:49:11 AMAug 27
to deal.II User Group
Hello!
I am trying to solve the 30-band kp model for silicon. I wrote some code that solves this problem using Lagrangian finite elements. The picture for the sqrt(|<psi | psi >|) wave function is in the attached file. It is clear that there are oscillations for the ground state, which in theory should not be there. I want to rewrite this problem for the standing wave basis, but when I try with this basis, I do not get the correct eigenvalues ​​and wave functions. Tell me what to fix in my code? If this piece of code is not enough, I can send you the full version
sine.cpp

Dmitriy Samosvat

unread,
Aug 27, 2025, 6:49:11 AMAug 27
to deal.II User Group
Hello!
I am trying to solve the 30-band kp model for a silicon quantum well. I managed to get the ground state for the electron wave function. However, it has oscillations. I think a more physical basis for this problem would be the sines (standing waves) basis (instead of Lagrangian finite elements). However, when I try to use the sines basis, it gives incorrect eigenvalues. I am sending you the file with the wave function and the sines basis. I would be grateful if you could tell me how to fix my code.
sine.cpp
graph_c1.jpg

Dmitriy Samosvat

unread,
Aug 27, 2025, 7:32:09 AMAug 27
to deal.II User Group
Here is my buggy eigenvalues with sine basis

среда, 27 августа 2025 г. в 13:49:11 UTC+3, Dmitriy Samosvat:
eigenvalues_bug.txt

Wolfgang Bangerth

unread,
Aug 27, 2025, 1:42:24 PMAug 27
to dea...@googlegroups.com
I think this is asking too much of the people on this forum -- you'll
have to debug things yourself first.

But a good starting point would be to take your element, a mesh with one
or perhaps four cells, create a DoFHandler with it, create a solution
vector that corresponds to a function you know, and then output the
solution with DataOut::build_patches() using a high value for the
subdivisions. This way you get to see the solution on a subdivided mesh.
Compare that to what you expect and make sure the shape functions are
correct. Then repeat this by using a DataPostprocessor object that
outputs the gradient of your shape functions. Chances are that the
mistake is in one of these two steps.

Best
W.

Reply all
Reply to author
Forward
0 new messages