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

  • Coarsest-level solve

    Forward and back substitution with the stored factor.

    Geometric multigrid for the voxel stress model mg.js
    • PartCraft
    64-bit
  • Motion laws

    How far along its travel the joint is at each fraction of the time.

    linear: s; ease: s²(3 − 2s); sine: ½ − ½ cos(πs); round trip: 2s or 2 − 2s; value = from + (to − from) × law(k ÷ steps)

    Motion study of an assembly motion.js
    • PartCraft
    64-bit
  • Default tracked point

    The middle of a part's bounding box, tracked when no point is given.

    center = (min + max) ÷ 2 per axis

    Motion study of an assembly motion.js
    • PartCraft
    32-bit in part
  • Solids for the clearance check

    Rebuilds each part as a solid so the gap between parts can be measured at every step.

    Motion study of an assembly motion.js
    • PartCraft
    32-bit in part
  • Velocity and acceleration

    The rate of the joint value and each tracked point's velocity, speed and acceleration.

    v_k = (p_(k+1) − p_(k−1)) ÷ (t_(k+1) − t_(k−1)); a_k = (p_(k−1) − 2p_k + p_(k+1)) ÷ Δt²

    Motion study of an assembly motion.js
    • PartCraft
    64-bit
  • Peak speed, peak acceleration and travel

    The largest speed and acceleration of each tracked point and the length of its path.

    travel = Σ |p_k − p_(k−1)|

    Motion study of an assembly motion.js
    • PartCraft
    64-bit
  • Numbers in the CSV export

    Formats each time, value, position, speed and gap written to the CSV file.

    text = value.toFixed(5), trailing zeros removed

    Motion study of an assembly motion.js
    • PartCraft
    64-bit
  • Bilinear material constants

    Shear modulus, bulk modulus and hardening modulus from E, ν, yield stress and tangent modulus.

    G = E ÷ (2(1 + ν)); K = E ÷ (3(1 − 2ν)); H = E × E_t ÷ (E − E_t)

    Nonlinear and contact stress study nonlinear.js
    • PartCraft
    64-bit
  • Stress update at a Gauss point

    The stress, the new plastic strain and the algorithmic tangent for a given total strain.

    q = √(1.5 s:s); f = q − (σ_y + H α); Δγ = f ÷ (3G + H); σ = p 1 + (1 − 3GΔγ ÷ q) s

    Nonlinear and contact stress study nonlinear.js
    • PartCraft
    64-bit
  • Element tangent and internal force

    Integrates each element's tangent stiffness and internal force over its four Gauss points.

    K_e = Σ w Bᵀ D_ep B; f_e = Σ w Bᵀ σ; w = weight × det J

    Nonlinear and contact stress study nonlinear.js
    • PartCraft
    64-bit
  • Load-stepped Newton solve

    Raises the load in steps and iterates each step to equilibrium.

    r = λ f − f_int(u) (− contact); converged when |r| ÷ (λ |f|) < tol

    Nonlinear and contact stress study nonlinear.js
    • PartCraft
    64-bit
  • Von Mises stress and plastic strain per element

    The largest von Mises stress and the largest equivalent plastic strain among each element's Gauss points.

    vm_e = max over 4 points of vonMises(σ); α_e = max over 4 points of α

    Nonlinear and contact stress study nonlinear.js
    • PartCraft
    32-bit in part
  • Reported maximum stress, displacement and safety factor

    The peak von Mises stress and where it is, the peak displacement, and the smallest safety factor against yield.

    max σ_vm = largest element value; max |u| = largest nodal √(u_x² + u_y² + u_z²); safety = yield ÷ max σ_vm

    Nonlinear and contact stress study nl-worker.js
    • PartCraft
    32-bit in part
  • Support reactions

    The total force the supports carry, overall and per support group.

    R = Σ over constrained nodes of (f_int − f_applied)

    Nonlinear and contact stress study nl-worker.js
    • PartCraft
    64-bit
  • Element values averaged to nodes

    The nodal stress and plastic strain fields the plot colors by.

    node value = mean of the values of the elements that share the node

    Nonlinear and contact stress study nl-worker.js
    • PartCraft
    64-bit
  • Separating the pieces of a part

    Splits a part's surface mesh into its connected pieces so each can be meshed on its own for a contact study.

    vertices are the same when round(x × 10⁴), round(y × 10⁴), round(z × 10⁴) agree

    Nonlinear and contact stress study nl-worker.js
    • PartCraft
    32-bit in part
  • Density unit for the solver

    Converts the material's density from kg/m³ to the solver's tonnes per mm³.

    ρ_t/mm³ = ρ_kg/m³ × 1e-12

    Nonlinear and contact stress study nl-worker.js
    • PartCraft
    64-bit
  • Von Mises stress from CalculiX results

    The von Mises stress at each node from the six stress components of a results file.

    σ_vm = √(½((a − b)² + (b − c)² + (c − a)²) + 3(d² + e² + f²))

    Nonlinear and contact stress study nl-worker.js
    • PartCraft
    64-bit
  • Signed area of a pixel outline

    Tells an outer outline from a hole and gives the hole size used to drop specks.

    a = ½ × Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ); hole kept when 2 × √(|a| ÷ π) ≥ minHole

    Photo to sketch: outline fitting and scale photo-sketch.js
    • PartCraft
    64-bit
  • Outline simplification

    Keeps only the outline points that lie farther than the tolerance from the chord between their neighbors.

    d = |dx·(Qy − Ay) − dy·(Qx − Ax)| ÷ L; keep the farthest point when d > tol

    Photo to sketch: outline fitting and scale photo-sketch.js
    • PartCraft
    64-bit
  • Circle through outline points

    The center and radius of the circle that best fits a run of outline points, with its largest and root-mean-square deviation.

    u = x − x̄, v = y − ȳ; solve [Σu² Σuv; Σuv Σv²]·(u_c, v_c) = ½·(Σu³ + Σuv², Σv³ + Σvu²); r = mean distance to the center

    Photo to sketch: outline fitting and scale photo-sketch.js
    • PartCraft
    64-bit
  • Line through outline points

    The direction of the straight line that best fits a run of outline points, through their centroid.

    θ = ½ × atan2(2·Σuv, Σu² − Σv²); d = (cos θ, sin θ)

    Photo to sketch: outline fitting and scale photo-sketch.js
    • PartCraft
    64-bit
  • Corner where two fitted lines meet

    Places a corner of the sketch at the intersection of the two fitted lines on either side of it.

    den = u_d × v_d; t = ((v_p − u_p) × v_d) ÷ den; corner = u_p + t·u_d

    Photo to sketch: outline fitting and scale photo-sketch.js
    • PartCraft
    64-bit
  • Arc ends and refit

    Extends each arc along the outline while the points stay on its circle, fits the circle again and puts the two end points on it.

    grow while | |P − c| − r | ≤ min(0.75, tol ÷ 2); end = c + r·(P − c) ÷ |P − c|

    Photo to sketch: outline fitting and scale photo-sketch.js
    • PartCraft
    64-bit
  • Squaring of near-horizontal and near-vertical lines

    Makes a line that is within the squaring angle of horizontal or vertical exactly so, by giving both ends the same coordinate.

    angle = |atan2(B_y − A_y, B_x − A_x)| in degrees; shared y = (A_y + B_y) ÷ 2 or shared x = (A_x + B_x) ÷ 2

    Photo to sketch: outline fitting and scale photo-sketch.js
    • PartCraft
    64-bit
  • Scale of a silhouette

    Millimeters per pixel from one stated length, and the mapping of pixel coordinates to sketch coordinates.

    mm = stated length ÷ pixel extent; X = (x − x₀) × mm; Y = (y₁ − y) × mm

    Photo to sketch: outline fitting and scale photo-sketch.js
    • PartCraft
    64-bit
  • Scale of a pen drawing

    Millimeters per pixel for traced pen lines, from one stated length and the extent of the traced lines and arcs.

    extent from line ends, arc ends and arc centers; mm = stated length ÷ extent

    Photo to sketch: outline fitting and scale photo-sketch.js
    • PartCraft
    64-bit
  • Density unit change

    Converts a material's density from kg/m³ to tonnes/mm³, the unit the solver uses.

    ρ (t/mm³) = ρ (kg/m³) × 1e-12

    Contact and magnet study results phys-worker.js
    • PartCraft
    64-bit
  • Element values averaged to nodes

    Gives each node the mean of the values of the elements that share it.

    value at a node = Σ element values ÷ number of elements at the node

    Contact and magnet study results phys-worker.js
    • PartCraft
    64-bit
  • Maximum stress, plastic strain and displacement

    The maxima the study reports, and where they occur.

    |u| = √(u_x² + u_y² + u_z²); maximum over the elements (stress, plastic strain) and over the nodes (displacement)

    Contact and magnet study results phys-worker.js
    • PartCraft
    64-bit
  • Per-vertex result arrays

    Copies the nodal stress, plastic strain, displacement size and displacement vector to the vertices of the plot mesh.

    Contact and magnet study results phys-worker.js
    • PartCraft
    32-bit in part
  • Placing a part's mesh in the assembly

    Moves each mesh node of a placed part to the assembly frame with the instance's 4 × 4 matrix.

    x′ = M · (x, y, z, 1)

    Contact and magnet study results phys-worker.js
    • PartCraft
    64-bit
  • Contact penalty stiffness

    Chooses the stiffness of the contact springs for each pair of touching faces when none is given.

    k_n = autoPenalty(min(E_slave, E_master), h_min, factor); factor = 100 (frictionless) or 1000 (bonded)

    Contact and magnet study results phys-worker.js
    • PartCraft
    64-bit
  • Total contact force and peak pressure

    Adds the force at every contact point and finds the highest contact pressure.

    F = Σ forceᵢ; p_max = max pressureᵢ

    Contact and magnet study results phys-worker.js
    • PartCraft
    64-bit
  • Maximum flux density, forces and region areas

    The largest flux density of a magnet study and where it is, the force on each requested body, and the area of each region.

    B_max = max over the elements of |B|; region area = Σ element areas

    Contact and magnet study results phys-worker.js
    • PartCraft
    64-bit
  • Flux density and potential fields

    The flux density of every element and the magnetic vector potential of every node, as returned to the page.

    Contact and magnet study results phys-worker.js
    • PartCraft
    32-bit in part
  • Maxima from a results file read back

    The largest displacement and von Mises stress in a CalculiX results file read back onto the study's mesh.

    σ_vm = √(½·((a − b)² + (b − c)² + (c − a)²) + 3·(d² + e² + f²)); |u| = √(u_x² + u_y² + u_z²)

    Contact and magnet study results phys-worker.js
    • PartCraft
    64-bit
  • Dot product in chunks

    Each thread sums its share of a dot product in chunks of 4096 entries.

    P_c = Σ aᵢ·bᵢ over chunk c

    Threaded solver kernels and conjugate gradients pool.js
    • PartCraft
    64-bit
  • Sum of the chunk partials

    Adds the chunk sums of a dot product in chunk order on the coordinating thread.

    a·b = Σ P_c

    Threaded solver kernels and conjugate gradients pool.js
    • PartCraft
    64-bit
  • Conjugate-gradient update

    Advances the solution and the residual by one step and sums the new residual's square.

    x += α·p; r −= α·q; P_c = Σ rᵢ²

    Threaded solver kernels and conjugate gradients pool.js
    • PartCraft
    64-bit
  • Sparse matrix times vector

    y = A·x for a matrix stored row by row, with the rows split between the threads.

    y_r = Σ_k v_k · x[col_k]

    Threaded solver kernels and conjugate gradients pool.js
    • PartCraft
    64-bit
  • Voxel stiffness times vector

    y = K·x for a voxel model without assembling K: each node gathers the contributions of its elements.

    y_n = Σ over elements at n of s_e · (K_e · x_e) rows of n, plus the 3 × 3 penalty block of a constrained node

    Threaded solver kernels and conjugate gradients pool.js
    • PartCraft
    64-bit
  • Node-block preconditioner and smoother

    Multiplies each node's three values by its 3 × 3 block, or adds a damped correction ω·M·(b − r).

    dst = M·src or dst += ω · M · (b − src)

    Threaded solver kernels and conjugate gradients pool.js
    • PartCraft
    64-bit
  • Constraint projection

    Sets the values of inactive nodes to zero and applies each constrained node's 3 × 3 projector.

    v_n = 0 (inactive); v_n ← P_n · v_n (constrained)

    Threaded solver kernels and conjugate gradients pool.js
    • PartCraft
    64-bit
  • Multigrid restriction

    Carries a residual from a fine grid to the grid of half the resolution.

    r_c(N) = Σ over the 27 fine neighbors of w · r_f; w = product per axis of 1 (same node) or ½ (between nodes)

    Threaded solver kernels and conjugate gradients pool.js
    • PartCraft
    64-bit
  • Multigrid prolongation

    Adds a coarse-grid correction to the fine grid by linear interpolation.

    x_f(n) += w · Σ x_c over the 1, 2, 4 or 8 coarse nodes around n; w = ½ per axis in which n lies between coarse nodes

    Threaded solver kernels and conjugate gradients pool.js
    • PartCraft
    64-bit
  • Geometric stiffness times vector

    y = s·(G ⊗ I₃)·x from per-element blocks, used by the buckling study.

    y_n = s · Σ over elements at n of Σ_b G_e[a, b] · x_b

    Threaded solver kernels and conjugate gradients pool.js
    • PartCraft
    64-bit
  • Conjugate gradients for a voxel model

    Solves K·u = f for a voxel stress model on the thread pool.

    res = ‖r‖ ÷ ‖b‖; stop when res < tol; α = (r·z) ÷ (p·Kp); β = (r·z)_new ÷ (r·z)_old

    Threaded solver kernels and conjugate gradients pool.js
    • PartCraft
    64-bit
  • Conjugate gradients for a sparse matrix

    Solves A·x = b for an assembled sparse matrix on the thread pool.

    res = ‖r‖ ÷ ‖b‖; stop when res < tol; α = (r·z) ÷ (p·Ap)

    Threaded solver kernels and conjugate gradients pool.js
    • PartCraft
    64-bit
  • Scale factors

    The three factors a scale feature multiplies by, from the feature or from its shrinkage allowance.

    Scale feature for printing print-features.js
    • PartCraft
    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.