Skip to content

Main content

Poisson Solver Cell Residual

Calculate a one-dimensional centered Laplacian minus source residual for the explicit convention u-double-prime=f.

Loading tool…

Description

Calculate a supplied one-dimensional Poisson cell residual.

Numerical physics calculations depend on discretization, index conventions, boundary conditions and model units. A local force kick is only part of an integration method, a stencil residual is not a solved field, and a one-sided power weight is not a spectral-density normalization. Floating-point resolution also limits grid and coordinate representations.

Calculate a supplied one-dimensional Poisson cell residual.

When to use this tool

Use Poisson Solver Cell Residual when you already have leftValue, centerValue, rightValue, gridSpacing, suppliedSource and need to calculate a supplied one-dimensional Poisson cell residual.

How to use the tool and how it works

  1. Enter leftValue, centerValue, rightValue, gridSpacing, suppliedSource. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read residual. Use the output convention below.

Require gridSpacing positive/finite; return (left-2*center+right)/spacing/spacing-suppliedSource.1

Input fieldMeaning and unitsAccepted input
leftValueLeft ValueRequired. Finite number.
centerValueCenter ValueRequired. Finite number.
rightValueRight ValueRequired. Finite number.
gridSpacingGrid SpacingRequired. Finite number; strictly above 0.
suppliedSourceSupplied SourceRequired. Finite number.
Output fieldInterpretationReturned shape
residual(leftValue-2*centerValue+rightValue)/gridSpacing²-suppliedSource for a uniform one-dimensional stencil.Required. Finite number.
json
{
  "input": {
    "leftValue": 0,
    "centerValue": 1,
    "rightValue": 4,
    "gridSpacing": 1,
    "suppliedSource": 2
  },
  "output": {
    "residual": 0
  }
}

Limitations and assumptions

  • Assumes the supplied uniform-grid scalar stencil and source sign. No boundary conditions, complete equation, solution, truncation error or convergence is verified.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use the complete discretized model, integration algorithm and boundary treatment. Assess convergence, conservation and stability with the full calculation; individual residuals, CFL components, relaxation terms and index mappings do not establish numerical accuracy or physical validity.

References

  1. Calculation and input contract: computational-physics/poisson-solver-cell-residual — tool.io

Similar or alternative tools