Boundary-value problems find a field or potential satisfying equations in the interior and fixed values or fluxes at domain edges. A grid solver converges by repeatedly reducing an equation residual. It is not enough that the picture stops changing: the boundary constraints, residual tolerance, mesh spacing, and iteration cap define what result the solver is allowed to claim.
Think like a programmer
Represent constrained boundary cells separately from interior unknowns. Each iteration produces a fresh candidate grid or a documented in-place update order; then reapply constraints and record a residual history. Stop only at a declared tolerance or report iteration-cap failure. A low residual measures discrete equation satisfaction, so keep mesh refinement evidence separate from iteration convergence.
Model checklist
Inputs
Grid geometry and spacing, PDE/discrete stencil, boundary values or fluxes, material coefficients, initial guess, update order, tolerance, and iteration cap.
State
Interior unknowns, immutable boundary data, current grid, residual history, iteration count, and convergence status.
Rule
Relax or solve only interior equations, reapply constraints, and calculate a residual on the updated grid.
Constrained cells remain exact; residual meets tolerance or status reports failure; constant/linear analytic fixtures are recovered where applicable; finer meshes change the physical quantity of interest by a documented amount.
For a source-free one-dimensional potential, the continuous condition is
The exact solution is linear, making it an ideal regression fixture for a discrete solver. In two dimensions, a common five-point Laplacian residual at an interior cell is the sum of four neighbours minus four times the centre (scaled by grid spacing). A relaxation update tries to reduce that value while fixed boundaries remain untouched. Residual norms such as maximum absolute value answer “how well does this grid satisfy its discrete equations?”; they do not answer “how close is this grid to the continuum solution?” without refinement.
Try this experiment
Prediction: A finer grid can resolve geometry better but generally increases unknown count and may need more relaxation work; exact boundary values remain unchanged at every resolution.
Set left and right endpoint potentials to 0 V and 10 V, predict the value halfway across the one-dimensional source-free domain, and use it as a test fixture. Write one assertion that pins every boundary cell, one residual-norm check after iterations, and one comparison between two grid spacings. State what the solver reports if its cap is reached before tolerance.
Where this model breaks
Convergence can be slow, grid errors remain after residual is small, and discontinuous materials or curved complex boundaries need more advanced discretization. Iteration order can affect reproducibility and convergence rate. Real measurements require uncertain boundary data, sources, nonlinear material laws, and model-validation evidence; a converged numerical field is still conditional on all of those inputs.
Summary
Solve numerical boundary problems with immutable constraints, explicit residuals, declared termination, and separate mesh-refinement evidence. Never convert “many iterations” or a smooth rendering into a convergence claim.
Glossary
Boundary value: imposed edge condition.
Residual: remaining equation error.
Relaxation: iterative grid update.
Mesh refinement: comparison of results as grid spacing decreases.
Tolerance: declared maximum acceptable residual or change.
Iteration cap: maximum work allowed before reporting non-convergence.
Self-check
Which cells must never change?
What should end iterations?
Why is a low residual not the full error?
Which analytic fixture tests a source-free one-dimensional potential?
Sources
W. H. Press et al., Numerical Recipes, iterative relaxation and residual checks.
R. J. LeVeque, Finite Difference Methods for Ordinary and Partial Differential Equations, boundary-value verification.
Model contract
Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.
Quantities you set or measure, with units and useful bounds.
State
Values the program must retain to reproduce the next result.
Rule
The relationship or update that turns inputs and state into a result.
Check
A known limit, unit check, invariant, or measured result that can expose a bad model.
Implement the idea as a model
For Numerical Boundary Problems, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Electric Potential and Capacitance, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.
Guided experiment
Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.
Where this model breaks
This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.
Summary
Treat Numerical Boundary Problems as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.
Glossary
Input: a measured value or chosen parameter supplied to a model.
State: the smallest set of values needed to continue or reproduce a model.
Validation: comparing an output with a known result, limit, invariant, or measurement.
Self-check
Which values are inputs, and which values must remain state?
What observable result would tell you the model is behaving as expected?
Which assumption would you test first before applying the model to a real system?
Model review: turn Numerical Boundary Problems into a test
Solve potential grids with fixed boundaries, visible residuals, and declared convergence criteria.
Name the inputs and units that the electric potential and capacitance model needs.
Separate the state you must keep from values you can calculate when needed.
Write one rule that maps the current state and inputs to an observable result.
Choose a limiting case, unit check, invariant, or known result before trusting an output.
State one assumption you would change before using this simplified model for a real decision.