Resources Numerical accuracy

Calculations

Every calculation under our calculation policies: what it works out, its formula and the precision it runs at. Open one to see its code as it is in the released app.

  • 6,917 calculations in 1,248 source files
  • 143 exact
  • 6,286 in 64-bit
  • 335 with a 32-bit step
  • Last reviewed

Calculations

  • Resistive element laws

    The flow through a resistor, damper, orifice, diode or user law for a given difference across it.

    resistor: i = v ÷ R; orifice: i = v ÷ √(K √(v² + ε²)); diode: i = Is (e^(v ÷ nVt) − 1), a straight line above 40 nVt

    Lumped system models model.js Every app
    64-bit
  • Storage elements

    Capacitors, masses, tanks, inductors and springs: what they store and how it enters the equations.

    capacitive: i + d(C v)/dt = 0; inductive: v + d(L i)/dt = 0; spring: L = 1 ÷ k

    Lumped system models model.js Every app
    64-bit
  • Reported flow through an element

    The current, heat flow, flow or force reported for an element.

    the element's law at the solved state; diode: Is (e^(min(v, 40 nVt) ÷ nVt) − 1)

    Lumped system models model.js Every app
    64-bit
  • Dense linear solve

    Solves the Newton step.

    Gaussian elimination with partial pivoting

    Lumped system models solve.js Every app
    64-bit
  • Newton iteration

    Finds the state that satisfies the equations at one time.

    J_ij = (F_i(x + h e_j) − F_i(x − h e_j)) ÷ 2h, h = 1e-7 × max(|x_j|, 1); stop when |Δxᵢ| ≤ rtol |xᵢ| + atol + 1e-11 × max(1, largest |x|)

    Lumped system models solve.js Every app
    64-bit
  • Operating point

    The steady state, or the state set by the given initial values.

    one Newton solve from zero

    Lumped system models solve.js Every app
    64-bit
  • One time step

    The state one step later.

    trapezoid: (2 ÷ h)(S − S₀) − Ṡ₀ + g = 0; backward Euler: (1 ÷ h)(S − S₀) + g = 0

    Lumped system models solve.js Every app
    64-bit
  • Step-size control

    Chooses the time step from an estimate of the error, when adaptive stepping is on.

    err = max |x(two half steps) − x(one step)| ÷ (rtol |x| + atol), ÷ 3 for the trapezoid; h ← h × clamp(0.9 err^(−1/3), 0.2, 5)

    Lumped system models solve.js Every app
    64-bit
  • Value between stored times

    A node value at a time between two computed points.

    y = y₀ + (y₁ − y₀)(t − t₀) ÷ (t₁ − t₀)

    Lumped system models solve.js Every app
    64-bit
  • Parameter expressions

    The value of a parameter written as an expression, such as 2*3.3e3.

    numbers, parameters, + − × ÷ ^, brackets, pi

    Lumped system models modelica.js Every app
    64-bit
  • Thermal conductance to resistance

    A thermal conductor from a model file as the engine's thermal resistance.

    R = 1 ÷ G

    Lumped system models modelica.js Every app
    64-bit

A calculation is added only after its source was read. Each statement can be checked in the code shown on its policy's page; the app repositories are public. When a release changes a calculation, its page says so until it has been read again.