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

schrodinger equation mode solving #42

Merged
merged 10 commits into from
Apr 11, 2023

Conversation

simbilod
Copy link
Contributor

@simbilod simbilod commented Mar 22, 2023

beginning some code to mode solve for simple quantum mechanical problem

@HelgeGehring am I implementing the below correctly? (worrying about signs and units, I need to make the potential unrealistically large to see the right spectrum. In finite-difference there is a division by the grid spacing on the K0 derivative term that makes the units work out)

image

Weak form:

image

adapted from your example and https://physics.stackexchange.com/questions/618172/weak-solution-of-schr%C3%B6dinger-equation#:~:text=%CF%88m(x)%3D%E2%88%9A,n%CF%80x%2FL)., adding potential term

@HelgeGehring
Copy link
Owner

I've adjusted the numbers to https://young.physics.ucsc.edu/115/quantumwell.pdf and switched it to a dense solver

the dense solver is quite nice for development (but sadly too slow for most stuff), as it avoids some problems of sparse solvers, no need to guess the eigenvalue and it also shows the full spectrum

@HelgeGehring HelgeGehring added the enhancement New feature or request label Mar 22, 2023
@simbilod
Copy link
Contributor Author

I've had good luck using shift-invert mode on sparse eigensolvers, and shift-invert targeting a number lower than my smallest eigenvalue (e.g. energy at the bottom of the well). The spectrum of the 1D time-independent Shrodinger Equation is simpler than the Maxwell wave equation

@simbilod simbilod mentioned this pull request Mar 22, 2023
@HelgeGehring
Copy link
Owner

Yeah, we should try the sparse now :)
Using the dense solver is just easier for getting the equations right :)

@HelgeGehring HelgeGehring merged commit 9aa738e into HelgeGehring:main Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants