1
$\begingroup$

I tried to solve Schrödinger equation in 3D box using the NDEigensystem. My code is: {vals, funs} = NDEigensystem[{-1/ 2 (Div[Grad[u[x, y, z], {x, y, z}], {x, y, z}]), DirichletCondition[u[x, y, z] == 0, True]}, u[x, y, z], {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, 2]; How I can extract the numerical values of the u[x,y,z]? For example u[0,0,0?]

$\endgroup$

1 Answer 1

1
$\begingroup$
{vals, funs} = NDEigensystem[{-1/2 (Div[Grad[u[x, y, z], {x, y, z}], {x, y, z}]), 
  DirichletCondition[u[x, y, z] == 0, True]}, u[x, y, z], 
  {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, 2];

Then the value of u[0,0,0] for the eigenstates are

Table[funs[[i, 0]][0, 0, 0], {i, Length[funs]}]
(* {0.353627, 0.000205384} *)

You can also plot the solution:

Table[DensityPlot3D[Abs@funs[[i]], {x, -2, 2}, {y, -2, 2}, {z, -2, 2},
    PlotRange -> All, PlotLabel -> vals[[i]], 
    ImageSize -> Medium], {i, Length[vals]}] // Row

enter image description here

$\endgroup$
1
  • $\begingroup$ Hi, thanks a lot for answer :) $\endgroup$ May 31, 2016 at 7:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.