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.
Calculations
-
Common-cause split
The independent and the shared part of a failure rate.
independent = λ (1 − β); common = λ β
Fault trees and reliability block diagrams logic.js Every app64-bit -
Gamma function
Γ(x), used for the mean life.
Lanczos approximation, g = 7, 9 coefficients; reflection below 0.5
Weibull life data weibull.js Every app64-bit -
Weibull distribution functions
Failure probability, reliability, density, hazard, quantile, mean and B-life.
F = 1 − e^(−(t ÷ η)^β); quantile = η (−ln(1 − F))^(1 ÷ β); mean = η Γ(1 + 1 ÷ β)
Weibull life data weibull.js Every app64-bit -
Log-likelihood
How well a shape and scale explain the failure and suspension times.
Σ failures ln f(t) + Σ suspended ln R(t)
Weibull life data weibull.js Every app64-bit -
Maximum-likelihood fit
Shape, scale and their confidence bounds from failure times, with suspensions.
g(β) = Σ tᵝ ln t ÷ Σ tᵝ − 1 ÷ β − mean ln t = 0; η = (Σ tᵝ ÷ r)^(1 ÷ β)
Weibull life data weibull.js Every app64-bit -
Median ranks
The plotting position of each failure, adjusted for suspended units.
F = (rank − 0.3) ÷ (n + 0.4); rank increment = (n + 1 − previous rank) ÷ (1 + units at or after this one)
Weibull life data weibull.js Every app64-bit -
Rank regression fit
Shape and scale from a straight line on the Weibull plot.
β = S_xy ÷ S_xx on (ln t, ln(−ln(1 − F))); η = e^(−a ÷ β)
Weibull life data weibull.js Every app64-bit -
Duration drawn for a task
One trial's duration of a task given as minimum, most likely and maximum.
u < f: min + √(u (max − min)(mode − min)); else max − √((1 − u)(max − min)(max − mode)); duration = round(v)
Schedule risk (Monte Carlo) simulate.js Every app64-bit -
Finish percentiles, mean and spread
The finish day at each confidence level over all trials.
P = sorted[⌈p × n⌉ − 1]; mean = Σ ÷ n; sd = √(Σ (x − mean)² ÷ n)
Schedule risk (Monte Carlo) simulate.js Every app64-bit -
Criticality and sensitivity
The share of trials in which a task was critical, and the correlation of its duration with the finish.
criticality = times critical ÷ n; sensitivity = Σ (d − d̄)(F − F̄) ÷ √(Σ (d − d̄)² × n × sd²)
Schedule risk (Monte Carlo) simulate.js Every app64-bit -
Source signals
Step, ramp, sine and pulse sources as functions of time.
sine: offset + amp × sin(2π f t + phase); ramp: v₀ + (v₁ − v₀)(t − t₀) ÷ (t₁ − t₀)
Lumped system models model.js Every app64-bit -
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 app64-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 app64-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 app64-bit -
Dense linear solve
Solves the Newton step.
Gaussian elimination with partial pivoting
Lumped system models solve.js Every app64-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 app64-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 app64-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 app64-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 app64-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 app64-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 app64-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 app64-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.