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

  • Feed stream

    A feed's total flow and mole fractions from component flows, mass flows or a total with fractions.

    F = Σ nᵢ; zᵢ = nᵢ ÷ F; from mass: nᵢ = mᵢ ÷ Mᵢ

    Flowsheet solver and unit operations process/stream.js
    • CadCraft
    • BimCraft
    64-bit
  • Mass flow of a stream

    The mass flow in kg/s from the molar flow and composition.

    ṁ = F × Σ zᵢ Mᵢ

    Flowsheet solver and unit operations process/stream.js
    • CadCraft
    • BimCraft
    64-bit
  • Volume flow of a stream

    The volume flow in m³/s, phase by phase.

    Q = Σ_phases F × fraction × V_molar(T, P, x)

    Flowsheet solver and unit operations process/stream.js
    • CadCraft
    • BimCraft
    64-bit
  • Mixer

    The outlet of several streams mixed at the lowest inlet pressure.

    nᵢ = Σ F zᵢ; H_flow = Σ F H; outlet from a flash at that enthalpy

    Flowsheet solver and unit operations process/stream.js
    • CadCraft
    • BimCraft
    64-bit
  • Splitter

    Outlets that share one stream by given fractions.

    F_k = F × f_k ÷ Σ f

    Flowsheet solver and unit operations process/stream.js
    • CadCraft
    • BimCraft
    64-bit
  • Pump

    The shaft work and outlet state of a pump.

    w = V_liquid (P_out − P_in) ÷ η; W = F w; outlet at H_in + w

    Flowsheet solver and unit operations process/stream.js
    • CadCraft
    • BimCraft
    64-bit
  • Compressor and expander

    The work and outlet state from an isentropic step and an efficiency.

    h_s from a flash at P_out and the inlet entropy; compressor: h = H_in + (h_s − H_in) ÷ η; expander: h = H_in + η (h_s − H_in)

    Flowsheet solver and unit operations process/stream.js
    • CadCraft
    • BimCraft
    64-bit
  • Component splitter

    Two outlets that each take a set fraction of every component.

    aᵢ = F zᵢ fᵢ; bᵢ = F zᵢ (1 − fᵢ); Q = F_a H_a + F_b H_b − F H

    Flowsheet solver and unit operations process/stream.js
    • CadCraft
    • BimCraft
    64-bit
  • Two-stream heat exchanger

    The outlet states, duty, log-mean temperature difference, UA and smallest approach of a counter-current exchanger.

    duty = F_hot (H_in − H_out); LMTD = (ΔT₁ − ΔT₂) ÷ ln(ΔT₁ ÷ ΔT₂), or ΔT₁ when |ΔT₁ − ΔT₂| < 1e-9; UA = duty ÷ LMTD

    Flowsheet solver and unit operations process/stream.js
    • CadCraft
    • BimCraft
    64-bit
  • Inside diameter of a pipe size

    The inside diameter in meters of a nominal pipe size or a size in millimeters.

    D = (OD − 2 × wall) × 0.0254 (inches from the schedule 40 table); D = mm ÷ 1000

    Line sizing and pressure drop process/hydraulics.js
    • CadCraft
    • BimCraft
    64-bit
  • Colebrook–White friction factor

    The turbulent Darcy friction factor from the implicit Colebrook–White equation.

    1 ÷ √f = −2 log₁₀(ε ÷ (3.7D) + 2.51 ÷ (Re √f))

    Line sizing and pressure drop process/hydraulics.js
    • CadCraft
    • BimCraft
    64-bit
  • Swamee–Jain friction factor

    The turbulent Darcy friction factor from an explicit formula.

    f = 0.25 ÷ (log₁₀(ε ÷ (3.7D) + 5.74 ÷ Re^0.9))²

    Line sizing and pressure drop process/hydraulics.js
    • CadCraft
    • BimCraft
    64-bit
  • Friction factor

    The Darcy friction factor for any Reynolds number.

    Re < 2300: 64 ÷ Re; Re ≥ 4000: Swamee–Jain; between: (1 − w) × 64 ÷ 2300 + w × f(4000), w = (Re − 2300) ÷ 1700

    Line sizing and pressure drop process/hydraulics.js
    • CadCraft
    • BimCraft
    64-bit
  • Erosional velocity

    The velocity above which API RP 14E warns of erosion, in m/s.

    v_e = C × 0.3048 ÷ √(ρ × 0.062427961), C = 100

    Line sizing and pressure drop process/hydraulics.js
    • CadCraft
    • BimCraft
    64-bit
  • Pressure drop of one line

    Velocity, Reynolds number, friction factor and the friction, fitting and static parts of the pressure drop.

    A = πD² ÷ 4; v = ṁ ÷ (ρA); Re = ρvD ÷ μ; Δp = f (L ÷ D) ρv² ÷ 2 + K ρv² ÷ 2 + ρ g Δz

    Line sizing and pressure drop process/hydraulics.js
    • CadCraft
    • BimCraft
    64-bit
  • Fluid of a stream

    The density, mass flow and phase of a solved stream for the line calculation.

    ρ = mass flow ÷ volume flow; gas when vapor fraction ≥ 0.999, liquid when ≤ 0.001, else two-phase

    Line sizing and pressure drop process/hydraulics.js
    • CadCraft
    • BimCraft
    64-bit
  • Pipe in a flowsheet

    The outlet pressure of a pipe unit, with the gas density taken at the mean pressure.

    ρ_mean = ρ_in × (P_in + P_out) ÷ 2 ÷ P_in; repeat until |ΔP_out| < 1e-6 P_in

    Line sizing and pressure drop process/hydraulics.js
    • CadCraft
    • BimCraft
    64-bit
  • Length, rise and bends of a 3D pipe run

    A pipe run's length and rise in meters and its count of elbows, from its points in millimeters.

    L = Σ |pᵢ − pᵢ₋₁| ÷ 1000; Δz = (z_last − z_first) ÷ 1000; bend angle = acos(a·b ÷ (|a||b|))

    Line sizing and pressure drop process/model.js
    • CadCraft
    • BimCraft
    64-bit
  • Hydraulics of every linked line

    The pressure drop, velocity and erosion screening of each stream that has a line or a pipe run.

    Line sizing and pressure drop process/model.js
    • CadCraft
    • BimCraft
    64-bit
  • Stream table

    The table of streams drawn on the P&ID and exported: temperature, pressure, flows, velocity, line drop and composition.

    T (°C) = T − 273.15; P (bar) = P ÷ 1e5; mass (kg/h) = ṁ × 3600; rounded with toPrecision to 5, 3 or 4 significant digits

    Line sizing and pressure drop process/model.js
    • CadCraft
    • BimCraft
    64-bit
  • Pipe size for a velocity target

    The smallest nominal pipe size whose velocity is at or under the target.

    v = (ṁ ÷ ρ) ÷ (πD² ÷ 4) ≤ v_max, sizes tried from smallest to largest

    Line sizing and pressure drop process/synth.js
    • CadCraft
    • BimCraft
    64-bit
  • Rescaling a plant to a production rate

    The factor applied to the feed so a chosen stream carries the asked-for tonnes per day of a component.

    k = (t/d × 1000 ÷ 86400) ÷ (F zᵢ Mᵢ)

    Line sizing and pressure drop process/synth.js
    • CadCraft
    • BimCraft
    64-bit
  • Stream segments from enthalpies

    A process stream with phase change as a list of pieces with constant heat capacity flow rate.

    12 equal temperature steps; CP = |F (H_k − H_{k−1}) ÷ (T_k − T_{k−1})|

    Pinch analysis process/pinch.js
    • CadCraft
    • BimCraft
    64-bit
  • Problem table

    The minimum hot and cold utility and the pinch temperature for a minimum approach.

    shift hot streams by −ΔT_min⁄2 and cold by +ΔT_min⁄2; net_k = Σ (±CP)(T_hi − T_lo); Q_H = −min of the running sum; Q_C = last running sum + Q_H

    Pinch analysis process/pinch.js
    • CadCraft
    • BimCraft
    64-bit
  • Composite curves

    The hot and cold composite curves as lists of enthalpy and temperature points.

    H_{k+1} = H_k + (Σ CP of the streams present) × (T_{k+1} − T_k); cold curve shifted by Q_C

    Pinch analysis process/pinch.js
    • CadCraft
    • BimCraft
    64-bit
  • Area target

    The minimum heat-exchange area for the composite curves with vertical heat transfer.

    A = Σ_intervals (Σ_streams CPᵢ ΔTᵢ ÷ hᵢ) ÷ ΔT_lm, ΔT_lm = (d₀ − d₁) ÷ ln(d₀ ÷ d₁)

    Pinch analysis process/pinch.js
    • CadCraft
    • BimCraft
    64-bit
  • Minimum number of units

    The fewest exchangers, heaters and coolers for maximum energy recovery.

    above the pinch: streams + (1 if Q_H > 1e-9) − 1; below: streams + (1 if Q_C > 1e-9) − 1

    Pinch analysis process/pinch.js
    • CadCraft
    • BimCraft
    64-bit
  • Purchased cost of one item

    The purchased cost of an equipment item of a given size, in base-year dollars or scaled by a cost index.

    C₀ = 10^(K₁ + K₂ log₁₀ A + K₃ (log₁₀ A)²); C = C₀ × I_now ÷ I_base

    Capital and operating cost process/cost.js
    • CadCraft
    • BimCraft
    64-bit
  • Six-tenths scaling

    A known cost scaled to another size.

    C₂ = C₁ (A₂ ÷ A₁)^n, n = 0.6 unless given

    Capital and operating cost process/cost.js
    • CadCraft
    • BimCraft
    64-bit
  • Installed cost

    The installed plant cost from the purchased equipment total.

    installed = purchased × Lang factor (3.10 solid, 3.63 solid–fluid, 4.74 fluid)

    Capital and operating cost process/cost.js
    • CadCraft
    • BimCraft
    64-bit
  • Energy cost

    The cost of energy per hour and per year for a list of powers and prices.

    per hour = Σ |P| ÷ 1000 × price; per year = per hour × hours (8000 unless given)

    Capital and operating cost process/cost.js
    • CadCraft
    • BimCraft
    64-bit
  • Equipment cost table

    The cost of every item, the purchased total and the installed total.

    purchased = Σ cost of the rows; installed = purchased × Lang factor

    Capital and operating cost process/cost.js
    • CadCraft
    • BimCraft
    64-bit
  • Results table lines

    A result object as a flat list of named values for the calculator's table.

    number → +v.toPrecision(6); list of numbers → count, first and last to 5 digits

    Calculator results and export process/calc.js
    • CadCraft
    • BimCraft
    64-bit
  • CSV export of the results

    The results table as comma-separated text.

    Calculator results and export process/calc.js
    • CadCraft
    • BimCraft
    64-bit
  • Figure for the status bar

    The yearly emissions, installed cost or campaign length a run adds to the running totals.

    value = Number(the results line with that name)

    Calculator results and export process/calc.js
    • CadCraft
    • BimCraft
    64-bit
  • Molecular dynamics set-up

    The lattice spacing, cell count and cutoff of the Lennard-Jones liquid calculator.

    a = ∛(4 ÷ ρ); n = min(max(2 | n_typed, 2), 6); r_c = min(2.5, n a ÷ 2 − 1e-6)

    Calculator results and export process/calc.js
    • CadCraft
    • BimCraft
    64-bit
  • Column outlet compositions

    The outlet flows and mole fractions the column calculator lists.

    zᵢ → +zᵢ.toPrecision(5)

    Calculator results and export process/calc4.js
    • CadCraft
    • BimCraft
    64-bit
  • Pump power and suction head margin

    The hydraulic power of a pump and the margin between the available and required net positive suction head.

    power = ρ g Q H ÷ η; NPSH_r by straight-line interpolation between the maker's points; margin = NPSH_a − NPSH_r

    Calculator results and export process/calc4.js
    • CadCraft
    • BimCraft
    64-bit
  • Mesh energy against the plain sum

    The relative difference between the particle-mesh and plain Ewald reciprocal energies.

    |E_mesh − E_plain| ÷ |E_plain|

    Calculator results and export process/calc4.js
    • CadCraft
    • BimCraft
    64-bit
  • Coordinate rounding

    A coordinate or label value rounded for the drawing.

    f(v) = +v.toFixed(3); 0 when v is not finite

    Process diagram entities process/draw.js
    • CadCraft
    • BimCraft
    64-bit
  • Stream label

    The text under a stream arrow: its name, temperature in degrees Celsius and pressure in bar.

    T (°C) = T − 273.15; P (bar) = P ÷ 1e5; both to 3 decimals

    Process diagram entities process/draw.js
    • CadCraft
    • BimCraft
    64-bit
  • Point inside a node boundary

    Whether a tag or line label lies inside a hazard study node's region.

    count the sides whose ends straddle the point's height and cross to its right; inside when the count is odd

    Process diagram entities process/draw.js
    • CadCraft
    • BimCraft
    64-bit
  • Controller faceplate numbers

    The set point, measurement, output and error a controller faceplate shows from a simulation.

    error = set point − last measurement

    Process diagram entities process/draw.js
    • CadCraft
    • BimCraft
    64-bit
  • Atomic weights

    The atomic weight of each element the structure reader knows.

    H 1.008; C 12.011; N 14.007; O 15.999; S 32.06; Cl 35.45 …

    Molar mass and group-contribution estimates process/env/cheminfo.js
    • CadCraft
    • BimCraft
    64-bit
  • Molar mass

    The molar mass of a molecule in g/mol.

    M = Σ count × atomic weight

    Molar mass and group-contribution estimates process/env/cheminfo.js
    • CadCraft
    • BimCraft
    64-bit
  • Joback estimate

    Boiling point, critical temperature, pressure and volume, melting point, formation enthalpy and Gibbs energy, heat capacity and acentric factor of a molecule.

    T_b = 198 + Σ; T_c = T_b ÷ (0.584 + 0.965 Σ − Σ²); P_c = (0.113 + 0.0032 n_atoms − Σ)⁻²; ω = 3⁄7 × θ ÷ (1 − θ) × log₁₀(P_c ÷ 1.01325) − 1, θ = T_b ÷ T_c

    Molar mass and group-contribution estimates process/env/cheminfo.js
    • CadCraft
    • BimCraft
    64-bit
  • Component from a structure

    A component for the property package from the Joback estimate, with a quadratic heat-capacity fit.

    C_p ÷ R ≈ A + B T + C T² fitted at 11 temperatures from 300 to 800 K; h_f (J/mol) = H_f (kJ/mol) × 1000

    Molar mass and group-contribution estimates process/env/cheminfo.js
    • CadCraft
    • BimCraft
    64-bit
  • Dispersion coefficients

    The crosswind and vertical spread of the plume at a distance downwind, for a stability class and terrain.

    σy = ay·x·(1 + by·x)^ey; σz = az·x·(1 + bz·x)^ez

    Gaussian plume concentration and contours process/env/plume.js
    • CadCraft
    • BimCraft
    64-bit
  • Plume concentration at a point

    The concentration at a point downwind, crosswind and above ground from a continuous release.

    C = Q ÷ (2π·u·σy·σz) × exp(−y² ÷ 2σy²) × [exp(−(z − H)² ÷ 2σz²) + exp(−(z + H)² ÷ 2σz²)]

    Gaussian plume concentration and contours process/env/plume.js
    • CadCraft
    • BimCraft
    64-bit
  • Reach of a concentration level

    The farthest downwind distance where the ground-level centerline concentration is still at or above an endpoint.

    Gaussian plume concentration and contours process/env/plume.js
    • CadCraft
    • BimCraft
    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.