Skip to content

Boundary Conditions in Computation

Boundary conditions enter a numerical Hamiltonian through its endpoint rows, trial functions, or interface equations. They are part of the physical model. A large matrix with the wrong endpoint rule is a highly resolved calculation of a different problem. This page translates the physical boundary conditions into discrete operations and verification tests.

Required background. Boundary conditions supplies the physical domains and flux requirements; array representations supplies weighted inner products.

For ψ(0)=ψ(L)=0\psi(0)=\psi(L)=0, keep only the NN interior samples with h=L/(N+1)h=L/(N+1). The centered kinetic matrix is

T=ℏ22mh2(2−1−12⋱⋱⋱−1−12).T=\frac{\hbar^2}{2mh^2} \begin{pmatrix} 2&-1&&\\-1&2&\ddots&\\&\ddots&\ddots&-1\\&&-1&2 \end{pmatrix}.

The missing endpoint values are zero, not extra unknowns. This produces an ordinary Hermitian eigenproblem. Keeping endpoint rows that impose ψ=0\psi=0 while leaving incompatible endpoint columns in a matrix can destroy symmetry or introduce spurious eigenvalues. Eliminate constrained degrees of freedom consistently.

For nonzero prescribed boundary values in an inhomogeneous boundary-value solve, elimination contributes known terms to the right-hand side. A stationary eigenfunction of a homogeneous quantum domain does not normally have an arbitrary nonzero endpoint value prescribed independently of its amplitude.

Neumann conditions and the discrete metric

Section titled “Neumann conditions and the discrete metric”

For a grid including both endpoints, reflecting ghost values enforces ψ′(0)=ψ′(L)=0\psi'(0)=\psi'(L)=0. The left kinetic row is t(2ψ0−2ψ1)t(2\psi_0-2\psi_1), with t=ℏ2/(2mh2)t=\hbar^2/(2mh^2), while an interior row has coefficients (−t,2t,−t)(-t,2t,-t).

This sample-space matrix is not symmetric in the Euclidean inner product. With trapezoidal weights

W=hdiag⁡(1/2,1,…,1,1/2),W=h\operatorname{diag}(1/2,1,\ldots,1,1/2),

it satisfies T†W=WTT^\dagger W=WT. Transforming by W1/2W^{1/2} restores an ordinary Hermitian representation. Check the constant vector: the free Neumann kinetic operator must annihilate it. This catches a mistakenly retained Dirichlet endpoint term.

Other discretizations, such as cell-centered finite volumes or variational finite elements, implement Neumann data differently. Their endpoint formulas and metrics must be derived together; combining a row from one scheme with weights from another is not justified.

For a ring of length LL, use NN distinct samples xj=jhx_j=jh, h=L/Nh=L/N, without storing the endpoint LL a second time. A twist obeys ψ(x+L)=eiθψ(x)\psi(x+L)=e^{i\theta}\psi(x). Consequently,

T0,N−1=−te−iθ,TN−1,0=−teiθT_{0,N-1}=-t e^{-i\theta}, \qquad T_{N-1,0}=-t e^{i\theta}

for a nearest-neighbor kinetic stencil with N>2N>2. These corner entries are conjugates. Its plane-wave modes have kn=(2πn+θ)/Lk_n=(2\pi n+\theta)/L and discrete kinetic energies 4tsin⁡2(knh/2)4t\sin^2(k_nh/2). At θ=0\theta=0, the constant mode has zero energy.

The same phase on both corner entries generally makes the operator non-Hermitian. A twist can also be distributed through link phases by a gauge transformation, but the total phase around the ring must remain the same. Compare spectra under that redistribution as a gauge-consistency check.

Artificial boxes, interfaces, and outgoing waves

Section titled “Artificial boxes, interfaces, and outgoing waves”

A bound state on the infinite line is often approximated by distant Dirichlet walls. Increase the box at fixed spatial resolution and monitor the target energy and tail weight. A small wavefunction value at one endpoint can be misleading if the boundary accidentally lies near a node. Inspect the tail over a region and compare several box sizes.

At a finite step in a constant-mass potential, impose continuity of ψ\psi and ψ′\psi'. At a delta interaction, the derivative jumps; matching methods implements that condition explicitly. Variable-mass kinetic operators require their own flux-continuity rule and must not inherit the constant-mass derivative rule without derivation.

A hard wall reflects a propagating packet. Enlarging the box only delays its return. Use absorbing boundaries when an open evolution is intended, and measure artificial reflection. Absorption deliberately creates a non-Hermitian effective problem; its spectrum and norm tests differ from those of a closed box.

For radial problems, regularity applies to the correct radial variable. In three dimensions, u(r)=rR(r)u(r)=rR(r) has norm ∫∣u∣2dr\int|u|^2dr and usually obeys u(0)=0u(0)=0 for regular nonsingular states. That does not mean the original ss-wave function R(0)R(0) must vanish.

A free twisted-ring matrix has corner entries both equal to −teiθ-t e^{i\theta}. For which twists is that compatible with Hermiticity, and what is the general repair?

Solution

The two entries can be equal and conjugate only when eiθe^{i\theta} is real, so θ=0\theta=0 or π\pi modulo 2π2\pi. In general use conjugate corner phases, with their orientation fixed by ψ(x+L)=eiθψ(x)\psi(x+L)=e^{i\theta}\psi(x).

  • LeVeque, R. J., Finite Difference Methods for Ordinary and Partial Differential Equations, SIAM, 2007, author resources — endpoint stencils and discrete stability.
  • Trefethen, L. N., Spectral Methods in MATLAB, SIAM, 2000, author resources — periodic grids and boundary-value discretization.