Skip to content

Main content

Mesh Cell Flux Residual Tool

Check a supplied signed finite-volume flux balance; face areas must already be included in fluxes.

Loading tool…

Description

Return a finite-volume source/flux residual.

A simulation update combines supplied states, fluxes, forces and time conventions. Local integration and interface terms can be evaluated independently, while a full solver must also supply consistent fields, boundary conditions, conservation and convergence behavior.

Return a finite-volume source/flux residual.

When to use this tool

Use Mesh Cell Flux Residual when checking one explicitly supplied integration, flux or lattice-population contribution.

How to use the tool and how it works

  1. Enter outwardFaceFluxes, sourceRate, cellVolume. 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 netOutwardFlux, sourceIntegrated, residual. Use the output convention below.

Return a finite-volume source/flux residual. Require cellVolume > 0; netOutwardFlux = sum(outwardFaceFluxes), sourceIntegrated = sourceRate*volume, residual = outward-source.1

Input fieldMeaning and unitsAccepted input
outwardFaceFluxesOutward Face FluxesRequired. Array of finite number; maximum items 256.
sourceRateSource RateRequired. Finite number.
cellVolumeCell VolumeRequired. Finite number; strictly above 0.
Output fieldInterpretationReturned shape
netOutwardFluxNet Outward FluxRequired. Finite number.
sourceIntegratedSource IntegratedRequired. Finite number.
residualSigned difference in the direction stated above, with matching units.Required. Finite number.
json
{
  "input": {
    "outwardFaceFluxes": [
      2,
      -1,
      3
    ],
    "sourceRate": 0.5,
    "cellVolume": 6
  },
  "output": {
    "netOutwardFlux": 4,
    "sourceIntegrated": 3,
    "residual": 1
  }
}

Limitations and assumptions

  • Face fluxes must already be integrated and consistently outward-signed; geometry and conservation of a complete mesh are not 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 and validate the complete numerical method with its state initialization, boundary conditions and physical model for a reliable simulation.

References

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

Similar or alternative tools