How Do You Set Boundary Conditions for an Infinite Wall Potential in NDSolve?

  • Mathematica
  • Thread starter serelha
  • Start date
  • Tags
    Mathematica
In summary: I think you should try a different potential.Thanks for your help.In summary, NDSolve can solve a Schrodinger equation for an infinite wall potential at r = R, but you need to specify boundary conditions.
  • #1
serelha
5
0
I am trying to use NDSolve to solve a Schrodinger equation.

My question is that if I want to solve the Schrodinger equation for an infinite wall potential at r = R, I would want my wave function to die at r = R.

Here is the code that I know for a square well potential;


NDSolve[ f''[r] + 2*mu*Energy - 2*mu*VOO[r]f[r] == 0, f[0] == 1.,
f'[0] == 0.0]


However, I do not know how to define specially boundary conditions for the finite wall problem.

If you have any suggestion, I will appreciate it.


Thanks
 
Physics news on Phys.org
  • #2
You can do it two ways.

You can either assume a solution in the exponentially decaying region and match that to your function in the 'well' part of the potential (i.e. this will define some boundary conditions at your finite wall)

OR

you can solve the whole thing numerically but then you need to think about a method to find the energy eigenvalues (i.e. you will probably need to vary the energy in order to get exponentially decaying solutions in the appropriate region, rather than decaying and increasing)
 
  • #3
FunkyDwarf said:
You can do it two ways.

You can either assume a solution in the exponentially decaying region and match that to your function in the 'well' part of the potential (i.e. this will define some boundary conditions at your finite wall)

OR

you can solve the whole thing numerically but then you need to think about a method to find the energy eigenvalues (i.e. you will probably need to vary the energy in order to get exponentially decaying solutions in the appropriate region, rather than decaying and increasing)
Thanks for your help.

I want to solve the whole system numerically, and I have already tried the method that you suggested. In this problem since I want to calculate the phase shift, I can vary the energy as much as I want.

Here is a sample code mu = 6.;
width = 5.;
R = width;

Vb = 4./(2*mu*R^2);
Vs = -10./(2*mu*R^2) + Vb;

p = .3;
Energy = p^2/(2*mu);VCC[r_] =
Vs*UnitStep[width - r] +Vb*UnitStep[r - width];
eps = .01;

"Numerical Results"
system1 = {RC''[r] + (-2*mu*(VCC[r] - Energy))*RC[r] == 0,
RC[eps] == 1.0, RC'[eps] == 0.0 };
syssol1 =
NDSolve[system1, { RC[r]}, { r, eps, 50./p}, MaxSteps -> 10000000];

Plot[Evaluate[{ RC[r]} /. syssol1], {r, eps, 10.0/p},
PlotRange -> {-100, 100}]

No matter how you vary p parameter here, you always get an increasing solution. However, what I want a decaying around R, which is physical.
 
  • #4
I think for starters your boundary conditions are wrong. If you are using a second order DE with no first order derivative that means at some point you made the substitution R = u(r)/r, this implies your near zero solution should be zero:

R(r) ~ r^l
u(r) = r^l+1 so near r = 0, u(r) = 0 and u'(r) = 1.

Also you will never get the growing solution equal to exactly zero unless you are exactly at the energy eigenvalue. You can test this with your code by modeling the hydrogen case and using known analytic solutions to compare with.
 
  • #5
Thanks for your respond..

Regarding the boundary conditions;

my original differential equation is Bessel differential equations, so as you guessed I did substitution R[r]=RC[r]/r, however, the boundary conditions are correct for L = 0 (s-wave). The conditions that you suggested are correct for L>0 solutions (p, d, f...waves). As I said I tried to give a simple example to discuss.

Regarding the solution with p=0.4;

functions becomes constant for r=>R, but not zero as you could see in the attachment. Do you think this corresponds to the physical solution, I am skeptical about it.

Thanks
 

Attachments

  • Untitled-1.jpg
    Untitled-1.jpg
    4.4 KB · Views: 493
  • #6
Here is the Schrodinger equation I mentioned

Manipulate[
m = 6.;
R = 5.;

Vs2 = 4./(2*m*R^2);
Vs = -10./(2*m*R^2) + Vs2;


VCC[r_] = Vs*UnitStep[R - r] + Vs2*UnitStep[r - R];

L = 0;

system = {RC''[r] +
2/r*RC'[r] + (-L*(L + 1)/r^2 - 2*mu*(VCC[r] - Energy))*RC[r] ==
0, RC[0.001] == 1.0, RC'[0.001] == 0.0 };


syssol =
NDSolve[system, {RC[r]}, { r, 0.001, 1000.}, MaxSteps -> 10000000];

Plot[Evaluate[{RC[r]} /. syssol], {r, 0.001, 200.0},
PlotRange -> {-1.1, 1.1}]
, {Energy, 0.001, 0.012, 1/100}]

The value that you point out p = 0.4 corresponds an energy value the same as the barrier, so the particle is not bounded for that value.
 
  • #7
See Landau Lifgarbagez Vol 3, section 32:

If you have the full radial Schrod equation (where you've not done any transformations) the solution near the origin (for a potential V(r) such that r^2 V(r) vanishes near the origin) is R ~ r^l.
 
  • #8
You are right, but L=0 here. So the boundary conditions are correct. If L>0, then the w.f vanishes at the origin.
 
  • #9
Yes but your two equations are inconsistent, in the step well case the equation appears transformed (no first derivative term), in the other one it is not yet the BCs are the same, thus something is wrong.

In any event the real answer (which I missed because I'm currently working on a relativistic problem and that's messing with my head a bit) is that you are only looking at positive energies.

If you want bound state solutions use this code:

Manipulate[mu=6.;

R=5.;
Vs2=4./(2*mu*R^2);
Vs=-10./(2*mu*R^2)+Vs2;
VCC[r_]=Vs*UnitStep[R-r]+Vs2*UnitStep[r-R];
L=0;
system={RC''[r]+2/r*RC'[r]+(-L*(L+1)/r^2-2*mu*(VCC[r]-Energy))*RC[r]==0,RC[0.001]==1.0,RC'[0.001]==0.0};
syssol=NDSolve[system,{RC[r]},{r,0.001,1000.},MaxSteps->10000000];
Plot[Evaluate[{RC[r]}/.syssol],{r,0.001,200.0},PlotRange->{-1.1,1.1}],{Energy,-.1,0.12,1/10000}]

You also had mu and m as different things but I assume they are the same as m lacked a numeric definition so i fixed that.

It's a rather finicky system: your ground state is somewhere between E = -0.0021 and E = -0.002
 

Related to How Do You Set Boundary Conditions for an Infinite Wall Potential in NDSolve?

1. How do I use the NDSolve function in Mathematica?

To use the NDSolve function in Mathematica, you first need to define the differential equation you want to solve. Then, you can use the NDSolve function and input the differential equation, initial conditions, and any other relevant parameters. The function will then return a solution for the differential equation.

2. How do I plot the solution to my differential equation using NDSolve?

To plot the solution to your differential equation, you can use the Plot or ListPlot functions in Mathematica. You can input the solution returned by NDSolve and specify the range of values you want to plot. This will generate a plot of the solution over the specified range.

3. How can I add constraints or boundary conditions to my differential equation when using NDSolve?

You can add constraints or boundary conditions to your differential equation by using the NDSolve function's option "Method". Within this option, you can specify the desired constraints or boundary conditions using the "EventLocator" or "DiscontinuityHandler" options, among others.

4. How do I solve a system of differential equations using NDSolve?

To solve a system of differential equations, you can use the NDSolve function and input multiple differential equations, initial conditions, and any other relevant parameters. The function will then return a solution for each of the differential equations in the system.

5. Can I use NDSolve to solve partial differential equations?

Yes, NDSolve can be used to solve partial differential equations. However, the method for solving partial differential equations is different from that of ordinary differential equations, and you may need to specify additional parameters or options in the NDSolve function. It is recommended to consult the Mathematica documentation for more information on solving partial differential equations using NDSolve.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
550
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
691
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
5K
Replies
1
Views
929
Back
Top