3
Test your code. "I don't know if my linear algebra routines work or not" is a problem you can solve easily. It is easy to check if you have computed the correct eigenvalues or not; just check that $VDV^{-1}=H$, or if you don't fancy the inversion $HV=VD$. If you are not sure that your individual pieces work, you are walking in the dark.
Possibly a hot take: ...
2
As David said, absorbing boundary conditions won't be completely reflectionless. That said, we can reduce relfections quite a bit, which helps to avoid influence from the boundaries while the particle still travelling inside.
Since this is a time dependent problem, one simple choice of boundary conditions will look like this.
At the left boundary:
$$\frac{\...
2
I don't have enough reputation to comment, but I wanted to give a basic complement of gIS's answer.
Simply put, if we have the decomposition over $V=V_1\otimes V_2$, which we represent with, say, the reshaping [2,4,2,4] why do we einsum over the first and third indices for trace over $V_1$ and second and fourth for trace over $V_2$? Maybe this is obvious ...
2
How can I evaluate more accurate energy eigenvalues from Schrodinger equation using shooting method?
Your problem was the lower limit of integration. It should have been $-x_e$ instead of 0, since $x_e$ is the equilibrium point for the potential and not the minimum distance.
After correcting that, you get the following
#%% Solution
xe, lam = 1.0, 6.0 # parameters for potential
xmax = 10
# Bval, Bval2 = wavefunction values at x = bound1, bound2
bound1, ...
1
Problem solved: I just have to include the solution of the homogeneous equation into the solution of the differential equation.
The solution to the differential equation is
$$V_H(r) = -\frac{K}{r} - \frac{r+1}{r} \exp(-2r).$$
By requiring that $\lim_{r \to 0} V_H(r)$ is real we get $K=-1$ and
$$V_H(r) = \frac{1}{r} - \frac{r+1}{r} \exp(-2r).$$
1
Your whole code is not understandable to me. Try this alternative components:
int grid(int i, double a, double h)
{
return a+i*h;
}
int index(int i, int j, int N)
{
return i*N+j;
}
//potential function. returns the integral over the grid square indexed by i
double V(int i, double x0, double hx, int j, double y0, double hy)
{
double xi=grid(i,...
1
I think your approach is very good. Several studies show that doing something stays deeper in memory than reading about it and testing things for yourself will give you a good intuitive feeling. Now, to your questions:
Is MATLAB capable of all this? Yes, it has strong numerical and GUI capabilities
If not, what is? As mentioned by Abdullah Ali Sivas, you ...
1
I can describe the simplified version of this algorithm which might help you to understand what's going on here. Let's you have this Time-dependent Schrodinger equation:
$$i \hbar \partial_{t} \Psi = -\frac{\hbar^{2}}{2m} \nabla^{2} \Psi$$
For a moment forget about potential cause that complicate things here, which might be necessarily helpful for ...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
quantum-mechanics × 97computational-physics × 21
matlab × 12
python × 12
ode × 8
linear-algebra × 7
eigenvalues × 7
eigensystem × 7
c++ × 6
pde × 5
finite-difference × 5
matrix × 4
boundary-conditions × 4
parallel-computing × 4
numerics × 4
simulation × 4
monte-carlo × 4
computational-chemistry × 4
differential-equations × 4
wave-propagation × 4
density-functional-theory × 4
finite-element × 3
software × 3
c × 3
runge-kutta × 3