A Byte of PhysicsLogo

Numerical boundary problems

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.
Output
Approximate field, residual norm, iteration status, boundary check, and mesh-refinement comparison.
Check
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

\[ rac{d^2V}{dx^2}=0,qquad V(0)=V_L,quad V(L)=V_R\]

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

Sources

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.

\[\text{observable output} = f(\text{inputs},\,\text{state})\]
Inputs
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

  1. Which values are inputs, and which values must remain state?
  2. What observable result would tell you the model is behaving as expected?
  3. 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.

  1. Name the inputs and units that the electric potential and capacitance model needs.
  2. Separate the state you must keep from values you can calculate when needed.
  3. Write one rule that maps the current state and inputs to an observable result.
  4. Choose a limiting case, unit check, invariant, or known result before trusting an output.
  5. State one assumption you would change before using this simplified model for a real decision.

Share to: