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

  • Reactions and compliance

    The support reactions and the work of the loads.

    R = (K u − f) projected on the held directions; compliance = Σ fᵢ uᵢ

    Voxel stress analysis: elements, loads, reactions and modes fea.js
    • PartCraft
    64-bit
  • Field value at a point

    Interpolates a nodal result at a point inside the grid.

    value = Σ wᵢ vᵢ ÷ Σ wᵢ over the active corners of the cell

    Voxel stress analysis: elements, loads, reactions and modes fea.js
    • PartCraft
    64-bit
  • Lumped mass

    The mass at each node for the modal analysis.

    node mass = Σ over its elements of ρ h³ ÷ 8

    Voxel stress analysis: elements, loads, reactions and modes fea.js
    • PartCraft
    64-bit
  • Natural frequencies

    The lowest natural frequencies and mode shapes.

    f = √λ ÷ (2π); stop when |λ − λ(previous)| ≤ 1e-6 × λ for every wanted mode

    Voxel stress analysis: elements, loads, reactions and modes fea.js
    • PartCraft
    64-bit
  • Mesh volume and mass

    The volume and mass reported with a study.

    volume = elements × h³; mass (kg) = volume × ρ (t/mm³) × 1000

    Voxel stress analysis: elements, loads, reactions and modes fea.js
    • PartCraft
    64-bit
  • Minimum safety factor

    The yield stress divided by the largest nodal von Mises stress.

    safety = S_y ÷ σ_max

    Voxel stress analysis: 32-bit steps in loads and results fea.js
    • PartCraft
    32-bit in part
  • Values on the plot mesh

    Stress, displacement size and displacement vector at each vertex of the plot mesh, read by the hover probe and the legend.

    Voxel stress analysis: 32-bit steps in loads and results fea.js
    • PartCraft
    32-bit in part
  • Force and pressure on faces

    Shares a force or a pressure over the nodes of the picked faces.

    node force = magnitude × weightᵢ ÷ Σ weight × direction; pressure magnitude = p × area

    Voxel stress analysis: 32-bit steps in loads and results fea.js
    • PartCraft
    32-bit in part
  • Cylinder surface

    A triangle surface of a cylinder with n sides.

    (r cos(2π i ÷ n), r sin(2π i ÷ n))

    CraftScript meshes and element kernels cs-lib-mesh.js
    • PartCraft
    64-bit
  • Sphere surface

    A triangle surface of a sphere from rings and segments.

    CraftScript meshes and element kernels cs-lib-mesh.js
    • PartCraft
    64-bit
  • Structured hexahedron grid

    Node coordinates and elements of a box divided into equal cells.

    x = o + l × i ÷ n

    CraftScript meshes and element kernels cs-lib-mesh.js
    • PartCraft
    64-bit
  • Voxel mesh nodes

    Node coordinates of a voxel grid as a script mesh.

    x = origin + i × h

    CraftScript meshes and element kernels cs-lib-mesh.js
    • PartCraft
    64-bit
  • Hexahedron stiffness for a script

    The 24 × 24 stiffness of a cube of side h.

    K = E × h × K_unit

    CraftScript meshes and element kernels cs-lib-mesh.js
    • PartCraft
    64-bit
  • Hexahedron stress operator for a script

    The matrix that turns a cube's nodal displacements into stresses at its corners and center.

    σ = (E ÷ h) × S u

    CraftScript meshes and element kernels cs-lib-mesh.js
    • PartCraft
    64-bit
  • Mean stress of quadratic tetrahedra

    Each element's stress as the average of its four Gauss points.

    σ_e = ¼ Σ σ_gauss

    CraftScript meshes and element kernels cs-lib-mesh.js
    • PartCraft
    64-bit
  • Voxel element stress for a script

    Stress components and von Mises stress at the center of each voxel element.

    σ = (E ÷ h) × S_center u_e

    CraftScript meshes and element kernels cs-lib-mesh.js
    • PartCraft
    64-bit
  • Voxel solve for a script

    Solves a voxel model for displacements with the multigrid conjugate gradient solver.

    CraftScript meshes and element kernels cs-lib-mesh.js
    • PartCraft
    64-bit
  • Lattice Boltzmann fields for a script

    Velocity and density of every cell as tensors.

    CraftScript meshes and element kernels cs-lib-mesh.js
    • PartCraft
    64-bit
  • Fluid properties

    Density and viscosity of air and water at 20 °C.

    ρ_air = p ÷ (R T); μ_air = μ₀ (T ÷ T₀)^1.5 (T₀ + S) ÷ (T + S)

    Flow study: lattice Boltzmann solver flow.js
    • PartCraft
    64-bit
  • Lattice links and boundary terms

    Connects each fluid cell to its neighbors and sets the term of every boundary link.

    moving wall: a = 6 wᵢ (cᵢ · u); interpolated wall when |q − ½| > 1e-6, q clamped to [0.001, 1]

    Flow study: lattice Boltzmann solver flow.js
    • PartCraft
    64-bit
  • Population arriving from a boundary

    The value a boundary link returns to its cell.

    q < ½: 2q f_o + (1 − 2q) f_behind; q ≥ ½: (f_o + (2q − 1) f_q) ÷ (2q); pressure: −f_o + 2 wᵢ ρ_w (1 + 4.5 (c·u)² − 1.5 u²)

    Flow study: lattice Boltzmann solver flow.js
    • PartCraft
    64-bit
  • Initial state and relaxation times

    Fills every cell with the equilibrium for the starting velocity and sets the two relaxation rates.

    f_eq = wᵢ (1 + 3 c·u + 4.5 (c·u)² − 1.5 u²); τ⁻ = ½ + Λ ÷ (τ − ½)

    Flow study: lattice Boltzmann solver flow.js
    • PartCraft
    64-bit
  • One time step: stream and collide

    Pulls the populations into each cell, takes density and velocity, and relaxes toward equilibrium.

    ρ = Σ fᵢ; u = (Σ cᵢ fᵢ + F ÷ 2) ÷ ρ

    Flow study: lattice Boltzmann solver flow.js
    • PartCraft
    64-bit
  • Collision with an eddy viscosity

    The collision used in turbulent runs, with a per-cell viscosity and a stabilizer.

    τ = ½ + 3(ν + ν_t); τ_s = ¼ + √(1/16 + 4.5 √2 C² |Π| ÷ ρ); τ = max(τ, τ_s)

    Flow study: lattice Boltzmann solver flow.js
    • PartCraft
    64-bit
  • Mass through boundaries and force on walls

    Sums the net mass rate per boundary group and the momentum-exchange force on the part.

    mass = Σ (f_in − f_out); F = −Σ cᵢ (f_in + f_out)

    Flow study: lattice Boltzmann solver flow.js
    • PartCraft
    64-bit
  • Stepping to a steady state

    Repeats time steps until the velocity field stops changing.

    res = √(Σ |u − u_prev|² ÷ Σ |u|²) ÷ steps between checks

    Flow study: lattice Boltzmann solver flow.js
    • PartCraft
    64-bit
  • Lattice units from physical ones

    Chooses the lattice speed, viscosity, relaxation time and time step for a cell size, speed and fluid.

    Re_cell = U dx ÷ ν; u = min(0.05, √(0.03 ÷ k), 0.5 Re_cell); τ = 3 u ÷ Re_cell + ½; dt = u dx ÷ U

    Flow study: lattice Boltzmann solver flow.js
    • PartCraft
    64-bit
  • Face normal and area

    The area-weighted outward normal of a face, its area and how flat it is.

    area = Σ |nₜ| ÷ 2; flatness = |Σ nₜ| ÷ (2 × area)

    Flow study: fluid cells, openings and wall distances flow-domain.js
    • PartCraft
    64-bit
  • Area of an opening's holes

    The area of the holes in a flat face, which is the opening's true area.

    loop area = ½ Σ (pₐ × p_b) · n; holes = Σ −area over clockwise loops

    Flow study: fluid cells, openings and wall distances flow-domain.js
    • PartCraft
    64-bit
  • Lid cells over an opening

    Finds the cells just behind a flat face that cover its holes.

    raster area = hole pixels × (h ÷ 2)²

    Flow study: fluid cells, openings and wall distances flow-domain.js
    • PartCraft
    64-bit
  • Wall distance along a link

    Where the link from a fluid cell to a solid cell crosses the part's surface.

    t = (e₂ · (tv × e₁)) ÷ (e₁ · (d × e₂))

    Flow study: fluid cells, openings and wall distances flow-domain.js
    • PartCraft
    64-bit
  • Frontal area

    The area of the part seen along the flow, used as the reference area for drag and lift coefficients.

    area = covered pixels × pixel size², pixel size = larger extent ÷ 1024

    Flow study: fluid cells, openings and wall distances flow-domain.js
    • PartCraft
    64-bit
  • Automatic cell size

    Picks the cell size that gives about a target number of cells in the grid box.

    h = ∛(volume ÷ target), rounded up to 1, 1.25, 1.5, 2, 2.5, 3, 4, 5, 6, 8 or 10 times a power of ten

    Flow study: fluid cells, openings and wall distances flow-study.js
    • PartCraft
    64-bit
  • Cell count estimate

    The number of grid cells a study will use.

    n = ⌈extent ÷ h − 1e-6⌉ + margin cells, per axis

    Flow study: fluid cells, openings and wall distances flow-study.js
    • PartCraft
    64-bit
  • Lift direction

    The direction lift is measured along, made square to the flow.

    l = l₀ − (l₀ · d) d, then divided by its length

    Flow study: fluid cells, openings and wall distances flow-study.js
    • PartCraft
    64-bit
  • Inlet flow and speed

    Each inlet's flow rate, mean speed and the speed set on its lattice links.

    Q = v × A (or the given Q); U = Q ÷ A; link speed = Q × (A_face ÷ A) ÷ (lattice link area × dx²); D = √(4A ÷ π)

    Flow study: results in physical units flow-worker.js
    • PartCraft
    64-bit
  • Speed and pressure scales

    The factors between lattice and physical speed and pressure, and the density set at each outlet.

    c_u = dx ÷ dt; c_p = ρ c_u²; ρ_outlet = 1 + 3 (p − p_ref) ÷ c_p

    Flow study: results in physical units flow-worker.js
    • PartCraft
    64-bit
  • Second steady-state test

    Watches the pressure drop or the drag force between checks before the run is accepted as steady.

    |q − q_prev| ÷ max(|q|, 1e-30) < 1e-4 on two checks in a row

    Flow study: results in physical units flow-worker.js
    • PartCraft
    64-bit
  • Mass flow, mean pressure and pressure drop

    The mass and volume flow through each opening, its mean pressure, and the pressure drop between inlets and outlets.

    ṁ = lattice mass × ρ dx³ ÷ dt; p = p_ref + (mean ρ − 1) ÷ 3 × c_p; Δp = flow-weighted mean inlet p − outlet p

    Flow study: results in physical units flow-worker.js
    • PartCraft
    64-bit
  • Force, drag and lift coefficients

    The force on the part in newtons and, for external flow, drag, lift and their coefficients.

    F = lattice force × ρ dx⁴ ÷ dt²; C_d = F · d ÷ (½ ρ U² A)

    Flow study: results in physical units flow-worker.js
    • PartCraft
    64-bit
  • Reynolds number

    The Reynolds number of the study.

    Re = U √(4A ÷ π) ÷ ν (internal); Re = U L ÷ ν (external)

    Flow study: results in physical units flow-worker.js
    • PartCraft
    64-bit
  • Inflow eddy viscosity

    The turbulence level given to inflows in a turbulent run.

    ν_t = max(3ν, √1.5 × 0.09^0.25 × I × u × ℓ), I = 5 % (internal) or 1 % (external)

    Flow study: results in physical units flow-worker.js
    • PartCraft
    64-bit
  • Mass balance

    The share of the inflow that does not leave through the outlets.

    balance = (ṁ_in − ṁ_out) ÷ ṁ_in

    Flow study: results in physical units flow-ui.js
    • PartCraft
    64-bit
  • The mesh handed to the flow solver

    Builds the job for a flow study from the part and the study's settings.

    Flow study: 32-bit steps in the mesh and the result fields flow-study.js
    • PartCraft
    32-bit in part
  • Cell fields, maximum speed and pressure range

    Velocity and pressure of every cell in physical units, and the largest speed and lowest and highest pressure the results state.

    v = u × c_u; p = p_ref + (ρ − 1) ÷ 3 × c_p; v_max = max |v|

    Flow study: 32-bit steps in the mesh and the result fields flow-worker.js
    • PartCraft
    32-bit in part
  • Pressure on the part's surface

    The static pressure at each vertex of the plot mesh, sampled a little way into the fluid.

    p = Σ (wᵢ + 1e-6) pᵢ ÷ Σ (wᵢ + 1e-6) over the fluid cells around the sample point

    Flow study: 32-bit steps in the mesh and the result fields flow-worker.js
    • PartCraft
    32-bit in part
  • Result probe

    Shows the speed, velocity and pressure of the cell under the pointer, or the surface pressure.

    speed = √(v_x² + v_y² + v_z²)

    Flow study: 32-bit steps in the mesh and the result fields flow-ui.js
    • PartCraft
    32-bit in part
  • Lattice Mach number warning

    The fastest cell's speed as a share of the lattice speed of sound.

    Ma = v_max × dt ÷ dx × √3

    Flow study: 32-bit steps in the mesh and the result fields flow-ui.js
    • PartCraft
    32-bit in part
  • Model constants

    The constants of the turbulence model.

    c_w1 = c_b1 ÷ κ² + (1 + c_b2) ÷ σ

    Flow study: turbulence model and wall functions flow-turb.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.