How to use this calculator
Solve a two-dimensional Poisson problem on a small square grid with prescribed zero values on all four edges.
- Enter Interior nodes per direction, Interior source values, Grid spacing. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Square Poisson grid with zero boundary explained
This finite-difference model solves the negative Laplacian on a square interior grid with zero values fixed along the boundary. It reports the full row-major solution, a center value, the maximum, and the residual of the discrete equations.
Inputs, symbols, and units
n— Interior nodes per direction- Square grid has n² unknown interior nodes. Enter a whole number.
source— Interior source values- Row-major forcing f in minus-Laplacian(u)=f. Use comma-separated values in the stated order.
stepSize— Grid spacing- Equal x and y spacing in coordinate units.
Formula and method
4uᵢⱼ−uᵢ₋₁ⱼ−uᵢ₊₁ⱼ−uᵢⱼ₋₁−uᵢⱼ₊₁=h²fᵢⱼ for −∇²u=f.
Only interior values are entered. Boundary values are zero, and the n interior positions span a square of side (n+1)h.
A worked scenario
Interior nodes per direction = 3; Interior source values = [1, 1, 1, 1, 1, 1, 1, 1, 1]; Grid spacing = 0.25.
- Middle interior value: 0.070312 solution units
- Maximum interior value: 0.070312 solution units
- Discrete residual infinity norm: 5.55111512e-17 scaled equation units
- Complete interior grid: 0.0429687500000, 0.0546875000000, 0.0429687500000, 0.0546875000000, 0.0703125000000, 0.0546875000000, 0.0429687500000, 0.0546875000000, 0.0429687500000 row major, x varying fastest
A 3-by-3 interior grid with h=0.25 and unit source has center value 0.0703125.
Assumptions and edge cases
At most 49 interior unknowns. Curved domains, nonzero boundaries and continuum discretization errors require another model.
Reading the outputs
Middle and maximum values are in solution units. The residual checks the scaled discrete equations rather than the continuous PDE. The complete solved vector or profile is also listed in the original component order, so no coordinate is hidden.
Frequently asked questions
Where are boundary values entered?
They are fixed at zero by this problem definition.
Which sign of Poisson equation is used?
The source equals minus the Laplacian.
Does a zero residual mean the PDE is exact?
No. It means the finite-difference linear equations were solved accurately.
How do I use the Square Poisson grid with zero boundary calculator?
Enter Interior nodes per direction, Interior source values, Grid spacing. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Square Poisson grid with zero boundary?
Interior nodes per direction = 3; Interior source values = [1, 1, 1, 1, 1, 1, 1, 1, 1]; Grid spacing = 0.25. Middle interior value: 0.070312 solution units Maximum interior value: 0.070312 solution units Discrete residual infinity norm: 5.55111512e-17 scaled equation units Complete interior grid: 0.0429687500000, 0.0546875000000, 0.0429687500000, 0.0546875000000, 0.0703125000000, 0.0546875000000, 0.0429687500000, 0.0546875000000, 0.0429687500000 row major, x varying fastest A 3-by-3 interior grid with h=0.25 and unit source has center value 0.0703125.
Background or definition reference: MIT numerical PDE lecture notes.
Read our calculation methodology.