- #1
diegzumillo
- 173
- 18
Hi there,
I was expecting to find a "simulations forums" somewhere here, if there is a better place for this thread please let me know :)
OK, here's the problem: I'm trying to make a simulation with PYthon, at first with a square potential, for simpler potential/boundary conditions. But I'm new on this numerical stuff, so I'm studying about solving PDEs numerically and all, and this is the equation I have arrived:
(with the indices i,j and l associated with x,y and t respectively)
[tex]\Psi^{l+1}_{i,j}=\frac{i\Delta t \hbar}{m (\Delta x)^2}(\Psi^{l}_{i+1,j}+\Psi^{l}_{i-1,j}+\Psi^{l}_{i,j+1}+\Psi^{l}_{i,j-1}-4\Psi^{l}_{i,j})+\Psi^{l-1}_{i,j}+\frac{2\Delta t}{i\hbar}V^{l}_{i,j}\Psi^{l}_{i,j}[/tex]
(it may not visualize correctly)
From this equation I see that it needs two previous steps to calculate a new one. So my initial conditions must fill the first two steps? Is this how I create a moving Gaussian, for example? by making the first two steps gaussians with a displacement between them? I'm a little lost here :P
I was expecting to find a "simulations forums" somewhere here, if there is a better place for this thread please let me know :)
OK, here's the problem: I'm trying to make a simulation with PYthon, at first with a square potential, for simpler potential/boundary conditions. But I'm new on this numerical stuff, so I'm studying about solving PDEs numerically and all, and this is the equation I have arrived:
(with the indices i,j and l associated with x,y and t respectively)
[tex]\Psi^{l+1}_{i,j}=\frac{i\Delta t \hbar}{m (\Delta x)^2}(\Psi^{l}_{i+1,j}+\Psi^{l}_{i-1,j}+\Psi^{l}_{i,j+1}+\Psi^{l}_{i,j-1}-4\Psi^{l}_{i,j})+\Psi^{l-1}_{i,j}+\frac{2\Delta t}{i\hbar}V^{l}_{i,j}\Psi^{l}_{i,j}[/tex]
(it may not visualize correctly)
From this equation I see that it needs two previous steps to calculate a new one. So my initial conditions must fill the first two steps? Is this how I create a moving Gaussian, for example? by making the first two steps gaussians with a displacement between them? I'm a little lost here :P