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.
Dirichlet walls and eliminated unknowns
Section titled “Dirichlet walls and eliminated unknowns”For , keep only the interior samples with . The centered kinetic matrix is
The missing endpoint values are zero, not extra unknowns. This produces an ordinary Hermitian eigenproblem. Keeping endpoint rows that impose 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 . The left kinetic row is , with , while an interior row has coefficients .
This sample-space matrix is not symmetric in the Euclidean inner product. With trapezoidal weights
it satisfies . Transforming by 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.
Periodic and twisted endpoints
Section titled “Periodic and twisted endpoints”For a ring of length , use distinct samples , , without storing the endpoint a second time. A twist obeys . Consequently,
for a nearest-neighbor kinetic stencil with . These corner entries are conjugates. Its plane-wave modes have and discrete kinetic energies . At , 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 and . 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, has norm and usually obeys for regular nonsingular states. That does not mean the original -wave function must vanish.
Exercises
Section titled “Exercises”A free twisted-ring matrix has corner entries both equal to . 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 is real, so or modulo . In general use conjugate corner phases, with their orientation fixed by .
References
Section titled “References”- 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.