Skip to content

Main content

Time Step Last Short Step Length

Shorten an explicitly supplied nominal time step to end exactly at a specified integration boundary.

Loading tool…

Description

Choose a supplied simulation's final shortened time step.

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.

Choose a supplied simulation's final shortened time step.

When to use this tool

Use Time Step Last Short Step Length when you already have currentTime, endTime, nominalTimeStep and need to choose a supplied simulation's final shortened time step.

How to use the tool and how it works

  1. Enter currentTime, endTime, nominalTimeStep. 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 stepLength, reachesEnd. Inspect reachesEnd before interpreting the associated values.

Require end>=current and nominalTimeStep>0; step=min(nominal,end-current), reachesEnd=nominal>=end-current.1

Input fieldMeaning and unitsAccepted input
currentTimeCurrent TimeRequired. Finite number.
endTimeEnd TimeRequired. Finite number.
nominalTimeStepNominal Time StepRequired. Finite number; strictly above 0.
Output fieldInterpretationReturned shape
stepLengthmin(nominalTimeStep,endTime-currentTime), including zero at the endpoint.Required. Finite number.
reachesEndReaches EndRequired. Boolean.
json
{
  "input": {
    "currentTime": 0.9,
    "endTime": 1,
    "nominalTimeStep": 0.2
  },
  "output": {
    "stepLength": 0.09999999999999998,
    "reachesEnd": true
  }
}

Limitations and assumptions

  • At the end step is zero and reachesEnd=true. This does not advance a state, control local error or establish stability, convergence or an appropriate step.
  • 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/time-step-last-short-step-length — tool.io

Similar or alternative tools