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

  • Checks against typed targets

    Compares the average, minimum, uniformity and power density with the targets the person typed.

    avg ≥ target; min ≥ target; min ÷ avg ≥ target; LPD ≤ limit

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Grid CSV

    Writes each grid point and its illuminance.

    x, y, z = round(mm); lux = value.toFixed(1)

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Lighting report CSV

    Writes one row per area with its totals and statistics, then every grid point.

    area and lux 1 decimal; lumens and watts 0; W/m² and min ÷ avg 2

    Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js
    • CadCraft
    • BimCraft
    64-bit
  • Inputs of an illuminance run

    The mounting height, working height, grid spacing and light loss factor asked for a run.

    mount ≥ 100 mm; work ≥ 0; spacing ≥ 50 mm; 0.05 ≤ LLF ≤ 1

    Luminaire files and point-by-point illuminance addons/lighting/main.js
    • CadCraft
    • BimCraft
    64-bit
  • Result printed in the command line

    The summary line of an illuminance run.

    min, avg, max: whole lux; uniformity 2 decimals; area and W/m² 1 decimal

    Luminaire files and point-by-point illuminance addons/lighting/main.js
    • CadCraft
    • BimCraft
    64-bit
  • Drawing units to millimeters on export

    Converts every exported symbol position, line vertex and symbol size to millimeters.

    mm = round(v × mmPerUnit, 3 decimals)

    DEXPI and PCF plant exchange files addons/pid/lib/dexpi-pid.js
    • CadCraft
    • BimCraft
    64-bit
  • Drawing extent on export

    The width and height stated for the exported drawing.

    w = ceil(mm(max x) + 50); h = ceil(mm(max y) + 50)

    DEXPI and PCF plant exchange files addons/pid/lib/dexpi-pid.js
    • CadCraft
    • BimCraft
    64-bit
  • Symbol position and size on import

    Places an imported plant item in the drawing at the file's position and size.

    x = x_file × perMm; l = SymbolSize × perMm

    DEXPI and PCF plant exchange files addons/pid/lib/dexpi-pid.js
    • CadCraft
    • BimCraft
    64-bit
  • Line ends moved onto connections on import

    Moves an imported line end onto the nearest symbol connection when it is close enough.

    moved when distance ≤ 0.6 × symbol size

    DEXPI and PCF plant exchange files addons/pid/lib/dexpi-pid.js
    • CadCraft
    • BimCraft
    64-bit
  • Numbers read from DEXPI attributes

    Turns an attribute's text into a number.

    DEXPI and PCF plant exchange files addons/pid/lib/interop/dexpi.js
    • CadCraft
    • BimCraft
    64-bit
  • Position and rotation of a plant item

    The location of an item and its rotation in the plane, read from its Position element.

    rotation = atan2(Reference.Y, Reference.X)

    DEXPI and PCF plant exchange files addons/pid/lib/interop/dexpi.js
    • CadCraft
    • BimCraft
    64-bit
  • Position and direction written to DEXPI

    Writes an item's location and its direction vector.

    Reference = (round(cos θ, 9 decimals), round(sin θ, 9 decimals), 0)

    DEXPI and PCF plant exchange files addons/pid/lib/interop/dexpi.js
    • CadCraft
    • BimCraft
    64-bit
  • Numbers written to PCF

    How a coordinate or a bore is written in a PCF file.

    text = round(n, 4 decimals)

    DEXPI and PCF plant exchange files addons/pid/lib/interop/pcf.js
    • CadCraft
    • BimCraft
    64-bit
  • End point lines read from PCF

    Reads a component's end point: three coordinates, a bore and an end type.

    DEXPI and PCF plant exchange files addons/pid/lib/interop/pcf.js
    • CadCraft
    • BimCraft
    64-bit
  • PCF units to millimeters

    Converts coordinates and bores from the units named in the file header to millimeters.

    x_mm = x × factor; factors: inch 25.4, foot 304.8, meter 1000, cm 10

    DEXPI and PCF plant exchange files addons/pid/lib/interop/pcf.js
    • CadCraft
    • BimCraft
    64-bit
  • Bend angle read from PCF

    Reads a component's angle in degrees.

    angle = value ÷ 100

    DEXPI and PCF plant exchange files addons/pid/lib/interop/pcf.js
    • CadCraft
    • BimCraft
    64-bit
  • Geometry checks on a PCF file

    Flags pipes with no length, elbows whose center is not equally far from both ends, and straight parts that change bore.

    |r₀ − r₁| > 0.01 × max(r₀, r₁, 1)

    DEXPI and PCF plant exchange files addons/pid/lib/interop/pcf.js
    • CadCraft
    • BimCraft
    64-bit
  • Length of a PCF component

    The straight distance between a component's two end points, in millimeters.

    length = √(Δx² + Δy² + Δz²)

    DEXPI and PCF plant exchange files addons/pid/lib/interop/pcf.js
    • CadCraft
    • BimCraft
    64-bit
  • Which PCF components meet

    Finds end points and branch points that coincide, and the ends left open.

    joined when √(Δx² + Δy² + Δz²) ≤ tol

    DEXPI and PCF plant exchange files addons/pid/lib/interop/pcf.js
    • CadCraft
    • BimCraft
    64-bit
  • Point lines written to PCF

    Writes an end point, branch point or center point line.

    DEXPI and PCF plant exchange files addons/pid/lib/interop/pcf.js
    • CadCraft
    • BimCraft
    64-bit
  • Pipe runs converted for the network

    Turns drawn pipe runs into polylines in millimeters with an elevation at every corner and an inside diameter per size.

    mm = drawing units × k × 25.4; z = z₀ − slope × (plan distance) × k × 25.4

    Water supply and duct network sizing addons/piping/lib/pipenet.js
    • CadCraft
    • BimCraft
    64-bit
  • Source matched to a run end

    Finds the run end nearest the point picked as the supply source.

    accepted when plan distance ≤ tol (60 mm by default)

    Water supply and duct network sizing addons/piping/lib/pipenet.js
    • CadCraft
    • BimCraft
    64-bit
  • Result rows in display units

    Converts each segment's flow to liters per second and its loss to kilopascals.

    L/s = m³/s × 1000; kPa = Pa ÷ 1000

    Water supply and duct network sizing addons/piping/lib/pipenet.js
    • CadCraft
    • BimCraft
    64-bit
  • Network CSV export

    The per-run results written as CSV.

    Water supply and duct network sizing addons/piping/lib/pipenet.js
    • CadCraft
    • BimCraft
    64-bit
  • Physical constants for water

    Gravity, water properties and unit factors used by the supply calculation.

    Water supply and duct network sizing addons/piping/lib/mep/flow.js
    • CadCraft
    • BimCraft
    64-bit
  • Hazen–Williams friction loss

    Pressure lost to friction per meter of water pipe.

    Δp/L = 10.67 × Q^1.852 ÷ (C^1.852 × D^4.871) × ρ g

    Water supply and duct network sizing addons/piping/lib/mep/flow.js
    • CadCraft
    • BimCraft
    64-bit
  • Darcy–Weisbach friction loss for water

    Pressure lost to friction per meter of water pipe from the friction factor.

    V = Q ÷ (πD² ÷ 4); Re = V D ÷ ν; Δp/L = (f ÷ D) × ρ V² ÷ 2

    Water supply and duct network sizing addons/piping/lib/mep/flow.js
    • CadCraft
    • BimCraft
    64-bit
  • Velocity in a pipe

    The mean velocity of a flow in a round pipe.

    V = Q ÷ (π D² ÷ 4)

    Water supply and duct network sizing addons/piping/lib/mep/flow.js
    • CadCraft
    • BimCraft
    64-bit
  • Demand from fixture units

    The design flow for a number of fixture units, read from a demand curve.

    s = ln(y₁ ÷ y₀) ÷ ln(x₁ ÷ x₀); q = y₀ × (fu ÷ x₀)^s

    Water supply and duct network sizing addons/piping/lib/mep/flow.js
    • CadCraft
    • BimCraft
    64-bit
  • Loss in fittings

    Pressure lost in a segment's bends, valves and the junction it leaves.

    Δp = (Σ K) × ρ V² ÷ 2; bend K = K₉₀ × min(1.5, angle ÷ 90)

    Water supply and duct network sizing addons/piping/lib/mep/flow.js
    • CadCraft
    • BimCraft
    64-bit
  • Flow, size and loss of one pipe segment

    Velocity, friction rate, the smallest size that passes, and the total pressure loss of a segment.

    Δp = rate × L + fittings + ρ g Δz

    Water supply and duct network sizing addons/piping/lib/mep/flow.js
    • CadCraft
    • BimCraft
    64-bit
  • Pressure lost to each outlet

    The pressure drop from the source to an outlet and what is left of the supply pressure.

    Δp = Σ segments on the path; left = available − Δp ÷ 1000

    Water supply and duct network sizing addons/piping/lib/mep/flow.js
    • CadCraft
    • BimCraft
    64-bit
  • Flow, size and loss of one duct segment

    Velocity, friction rate, equivalent diameter, needed diameter and pressure loss of a duct segment.

    by velocity: D = √(4Q ÷ (π v_max)); Δp = rate × L + fittings

    Water supply and duct network sizing addons/piping/lib/mep/flow.js
    • CadCraft
    • BimCraft
    64-bit
  • Critical path, damper pressures and fan pressure

    The duct path with the largest loss, the pressure each other terminal's damper must take up, and the fan's required pressure.

    damper = Δp_critical − Δp_terminal; fan = Δp_critical + equipment loss

    Water supply and duct network sizing addons/piping/lib/mep/flow.js
    • CadCraft
    • BimCraft
    64-bit
  • Duct diameter for a friction rate

    The round diameter that gives a target friction rate at a flow.

    Water supply and duct network sizing addons/piping/lib/mep/flow.js
    • CadCraft
    • BimCraft
    64-bit
  • Foot of a point on a run

    The nearest point of a 3D polyline to a point, as a distance along the run and a distance away.

    u = clamp((p − a)·v ÷ |v|², 0, 1); s = Σ earlier lengths + |v| u

    Water supply and duct network sizing addons/piping/lib/mep/network.js
    • CadCraft
    • BimCraft
    64-bit
  • Point at a distance along a run

    The 3D point a given distance along a polyline.

    Water supply and duct network sizing addons/piping/lib/mep/network.js
    • CadCraft
    • BimCraft
    64-bit
  • Bend angle at a corner

    The angle a run turns through at a corner, in degrees.

    angle = acos(u·v ÷ (|u| |v|)) × 180 ÷ π

    Water supply and duct network sizing addons/piping/lib/mep/network.js
    • CadCraft
    • BimCraft
    64-bit
  • Cut points and nodes

    Cuts runs where another run ends on them or a fixture connects, and merges nearby cut points into nodes.

    cut when distance ≤ tol; merged when distance ≤ tol

    Water supply and duct network sizing addons/piping/lib/mep/network.js
    • CadCraft
    • BimCraft
    64-bit
  • Segment length, rise and bends

    The length in meters, the rise and the bend angles of each segment between two nodes.

    length = Σ |vᵢ₊₁ − vᵢ| ÷ 1000; Δz = (z_b − z_a) ÷ 1000

    Water supply and duct network sizing addons/piping/lib/mep/network.js
    • CadCraft
    • BimCraft
    64-bit
  • Loads summed toward the source

    The total load (fixture units or flow) carried by each segment.

    sum(segment) = load at its far node + Σ sums of its children

    Water supply and duct network sizing addons/piping/lib/mep/network.js
    • CadCraft
    • BimCraft
    64-bit
  • Air properties and unit factors

    Standard-air properties, duct roughness values and the factors for cfm, L/s, inches of water, feet per minute, inches and millimeters.

    Water supply and duct network sizing addons/piping/lib/mep/sizing.js
    • CadCraft
    • BimCraft
    64-bit
  • Colebrook friction factor

    The Darcy friction factor for a Reynolds number and relative roughness.

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

    Water supply and duct network sizing addons/piping/lib/mep/sizing.js
    • CadCraft
    • BimCraft
    64-bit
  • Altshul–Tsal friction factor

    An explicit friction factor kept as a cross-check of the iterated one.

    f′ = 0.11 (ε ÷ D + 68 ÷ Re)^0.25; f = f′ if f′ ≥ 0.018, else 0.85 f′ + 0.0028

    Water supply and duct network sizing addons/piping/lib/mep/sizing.js
    • CadCraft
    • BimCraft
    64-bit
  • Friction loss of a round duct

    Friction rate, velocity, Reynolds number and friction factor for an airflow in a round duct.

    V = Q ÷ (πD² ÷ 4); Re = V D ÷ ν; rate = (f ÷ D) × ρ V² ÷ 2

    Water supply and duct network sizing addons/piping/lib/mep/sizing.js
    • CadCraft
    • BimCraft
    64-bit
  • Round diameter for a friction rate

    The round duct diameter that gives a target friction rate at an airflow.

    Water supply and duct network sizing addons/piping/lib/mep/sizing.js
    • CadCraft
    • BimCraft
    64-bit
  • Round equivalent of a rectangular duct

    The round diameter with the same friction and flow as a rectangle a × b.

    De = 1.30 (a b)^0.625 ÷ (a + b)^0.25

    Water supply and duct network sizing addons/piping/lib/mep/sizing.js
    • CadCraft
    • BimCraft
    64-bit
  • Flat-oval area, perimeter and round equivalent

    The area and perimeter of a flat-oval duct and its equivalent round diameter.

    A = πb² ÷ 4 + b(a − b); P = πb + 2(a − b); De = 1.55 A^0.625 ÷ P^0.25

    Water supply and duct network sizing addons/piping/lib/mep/sizing.js
    • CadCraft
    • BimCraft
    64-bit
  • Area and perimeter of a section

    The cross-section area, perimeter and equivalent diameter of a rectangular, round or oval size.

    rect: A = w h, P = 2(w + h); round: A = πw² ÷ 4, P = πw

    Water supply and duct network sizing addons/piping/lib/mep/sizing.js
    • CadCraft
    • BimCraft
    64-bit
  • Duct size by equal friction

    The stocked duct size for an airflow and a target friction rate, with its velocity and actual rate.

    Q = q × (cfm or L/s factor); size = first stocked size ≥ exact diameter

    Water supply and duct network sizing addons/piping/lib/mep/sizing.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.