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
-
Cable length through each run
For each cable, the runs it passes through and its length in each.
length in a run = Σ segment length × 1000 over that run's segments on the path
Conduit and tray fill, cable schedule addons/electrical/lib/mep/carrier.js64-bit- CadCraft
- BimCraft
-
Cable schedule length
The length of each cable in the schedule, with slack and an allowance at each end.
length m = (route mm × (1 + slack) + 2 × ends mm) ÷ 1000, rounded to 0.1
Conduit and tray fill, cable schedule addons/electrical/lib/mep/carrier.js64-bit- CadCraft
- BimCraft
-
Cable list read from CSV
Reads cable tags, outside diameters and counts from a CSV file.
Conduit and tray fill, cable schedule addons/electrical/lib/mep/carrier.js64-bit- CadCraft
- BimCraft
-
A run moved, turned or scaled
Applies a move, rotation, scale or mirror to a run's centerline and its scale.
p′ = M · p; sc = √|det M|; k′ = k ÷ sc; z′ = z × sc
Duct runs, fittings and schedule addons/hvac/lib/duct.js64-bit- CadCraft
-
Section width in drawing units
The drawn width of a duct section.
width = w ÷ k
Duct runs, fittings and schedule addons/hvac/lib/duct.js64-bit- CadCraft
-
Branches found on mains
Finds where a run's end sits on another run's centerline, the angle between them and how far the branch is cut back.
sin = |t_main × t_branch|; cut = (W_main ÷ 2) ÷ sin; opening = W_branch ÷ sin; angle = round(asin(sin) × 180 ÷ π × 10) ÷ 10
Duct runs, fittings and schedule addons/hvac/lib/duct.js64-bit- CadCraft
-
Elbows, transitions and straight pieces
The fittings of a run and the start and end of each straight piece along its centerline.
T = R tan(θ ÷ 2), R = r × W; mitred: T = (W ÷ 2) tan(θ ÷ 2); elbow length = R θ or 2T; transition L = max(max(ΔW ÷ 2, ΔH) ÷ tan 15° ÷ k, minimum)
Duct runs, fittings and schedule addons/hvac/lib/duct.js64-bit- CadCraft
-
Length in feet or meters
Converts a length in drawing units to feet or meters.
feet = du × k ÷ 12; meters = du × k ÷ 1000
Duct runs, fittings and schedule addons/hvac/lib/duct.js64-bit- CadCraft
-
Sheet-metal area of a length of duct
The surface area of a length of duct in square feet or square meters.
ft² = perimeter × du × k ÷ 144; m² = perimeter × du × k ÷ 1e6
Duct runs, fittings and schedule addons/hvac/lib/duct.js64-bit- CadCraft
-
Elbow area and angle
The sheet-metal area of an elbow and the angle in its name.
area = perimeter × centerline length; name angle = round(θ × 180 ÷ π)
Duct runs, fittings and schedule addons/hvac/lib/duct.js64-bit- CadCraft
-
Transition area
The sheet-metal area of a transition between two sizes.
rectangular: bottom + top + two sides as trapezoids over their slant lengths; other: (pₐ + p_b) ÷ 2 × slant length
Duct runs, fittings and schedule addons/hvac/lib/duct.js64-bit- CadCraft
-
Straight pieces
The length and area of each straight piece of a run.
du = s₁ − s₀; length = lenOut(du); area = perimeter × du
Duct runs, fittings and schedule addons/hvac/lib/duct.js64-bit- CadCraft
-
Schedule totals
The total duct length, total sheet-metal area and number of fittings.
length = Σ rows; area = Σ duct areas + Σ fitting areas
Duct runs, fittings and schedule addons/hvac/lib/duct.js64-bit- CadCraft
-
A run in the other unit system
Converts a run's sizes and airflows between inches with cfm and millimeters with L/s.
size × 25.4 or ÷ 25.4; airflow × 0.47194745 or ÷ 0.47194745
Duct runs, fittings and schedule addons/hvac/lib/duct.js64-bit- CadCraft
-
A typed duct size
Reads a size such as 24x12 or Ø14.
Duct runs, fittings and schedule addons/hvac/main.js64-bit- CadCraft
-
A point pulled onto a run's centerline
Moves a point picked inside a duct's outline onto its centerline, to start or end a branch there.
inside when distance ≤ W ÷ 2 + 1e-9
Duct runs, fittings and schedule addons/hvac/main.js64-bit- CadCraft
-
Schedule table in the drawing
The rows of the duct schedule placed in the drawing.
shown length and area = value.toFixed(1), trailing zeros removed
Duct runs, fittings and schedule addons/hvac/main.js64-bit- CadCraft
-
Schedule CSV
Writes the duct schedule as CSV.
length, perimeter, area: 3 decimals; velocity: 0 decimals (inch units) or 2; friction rate: 4 decimals
Duct runs, fittings and schedule addons/hvac/main.js64-bit- CadCraft
-
Liters per second in one cfm
The factor that converts airflow from cubic feet per minute to liters per second.
1 cfm = 0.3048³ ÷ 60 × 1000 L/s = 0.4719474432 L/s exactly
Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js64-bit- CadCraft
-
Millimeters per drawing unit
The factors that take a run's coordinates, sizes and airflow to millimeters and L/s.
draw = k × 25.4 (inch) or k; size = 25.4 or 1; lps = CFM_LPS or 1
Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js64-bit- CadCraft
-
Turn at a corner
The angle a run turns through at a corner, in degrees.
turn = acos(u·v ÷ (|u| |v|)) × 180 ÷ π
Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js64-bit- CadCraft
-
Runs handed to the engine
Each run's vertices in millimeters, its section size in millimeters, and its free ends with their airflow.
vertex mm = p × draw; w mm = w × size; z mm = z × draw
Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js64-bit- CadCraft
-
Fan point matched to a run end
Finds the run end the fan sits on and takes its height.
nearest end by √(Δx² + Δy²); accepted when ≤ 60 mm
Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js64-bit- CadCraft
-
Terminal airflows
The airflow in L/s at each free end of the network.
L/s = q × lps factor of the run
Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js64-bit- CadCraft
-
Pascals to inches of water
Converts a pressure in pascals to inches of water gauge.
in. w.g. = Pa ÷ 249.08891
Duct network pressure: drawing adapter addons/hvac/lib/ductnet.jsExact- CadCraft
-
Network result CSV
Writes the result rows as CSV.
length 2 decimals; airflow 1; velocity 2; rate 3; pressures 1
Duct network pressure: drawing adapter addons/hvac/lib/ductnet.js64-bit- CadCraft
-
Numbers read from an IES file
Splits the numeric part of an IES file into numbers.
Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js64-bit- CadCraft
- BimCraft
-
IES candela values and luminaire size
Scales the candela table and converts the luminous opening to millimeters.
cd = value × multiplier × ballast factor; lumens = lamps × lumens per lamp; size mm = value × 304.8 (feet) or × 1000 (meters)
Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js64-bit- CadCraft
- BimCraft
-
Full set of horizontal planes
Mirrors the horizontal planes of a symmetric IES file to cover 0 to 360 degrees.
quadrant: a, 180 − a, 180 + a, 360 − a; bilateral: a, 360 − a
Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js64-bit- CadCraft
- BimCraft
-
EULUMDAT lamp flux and watts
Adds up the lamp flux and wattage of the lamp sets in an EULUMDAT file.
lumens = Σ |count| × flux; watts = Σ watts
Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js64-bit- CadCraft
- BimCraft
-
EULUMDAT candela scale
Turns the file's cd per 1000 lm values into candela.
cd = value × (lumens ÷ 1000) × (LORL ÷ 100) × conversion factor
Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js64-bit- CadCraft
- BimCraft
-
Position in an angle table
Finds the two table angles on either side of an angle and the fraction between them.
f = (x − a_lo) ÷ (a_hi − a_lo)
Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js64-bit- CadCraft
- BimCraft
-
Candela in a direction
The luminous intensity at a vertical and horizontal angle, interpolated from the table.
I = (1 − f_h) (I₀₀ (1 − f_v) + I₀₁ f_v) + f_h (I₁₀ (1 − f_v) + I₁₁ f_v)
Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js64-bit- CadCraft
- BimCraft
-
Luminaire axes
The nadir, C0 and C90 directions of an aimed and rotated luminaire.
n = aim ÷ |aim|; r₀ = axis − (axis·n) n, normalized; r = r₀ cos t + (n × r₀) sin t
Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js64-bit- CadCraft
- BimCraft
-
Illuminance at a point
The direct illuminance in lux at a point on a surface from all luminaires.
E = LLF × Σ I(γ, C) × scale × cos θ ÷ d², d in meters
Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js64-bit- CadCraft
- BimCraft
-
Calculation grid
The points the illuminance is computed at: cell centers inside the area at the working height.
nₓ = max(1, round(width ÷ spacing)); x = x₀ + (width ÷ nₓ) × (i + 0.5)
Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js64-bit- CadCraft
- BimCraft
-
Minimum, average, maximum and uniformity
The statistics of the grid values.
avg = Σ E ÷ n; uniformity = min ÷ avg; min ÷ max
Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js64-bit- CadCraft
- BimCraft
-
Area and lighting power density
The area in square meters, the total lumens and watts, and the watts per square meter.
area m² = |Σ (xᵢ yᵢ₊₁ − xᵢ₊₁ yᵢ)| ÷ 2e6; LPD = watts ÷ area
Luminaire files and point-by-point illuminance addons/lighting/lib/mep/photometry.js64-bit- CadCraft
- BimCraft
-
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.js64-bit- CadCraft
- BimCraft
-
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.js64-bit- CadCraft
- BimCraft
-
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.js64-bit- CadCraft
- BimCraft
-
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.js64-bit- CadCraft
- BimCraft
-
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.js64-bit- CadCraft
- BimCraft
-
A click landing on a connection, end or line
Finds the connection point, line end or point on a line within reach of a click.
nearest within tol; a point on a line is ranked with distance + 0.1 × tol
P&ID placement, zones and values written to the drawing addons/pid/main.js64-bit- CadCraft
-
A line cut around an inline symbol
Cuts a process line either side of a symbol placed on it, so the symbol's ends meet the line's.
u = (b − a) ÷ |b − a|; cut points = at ± u × half
P&ID placement, zones and values written to the drawing addons/pid/main.js64-bit- CadCraft
-
A symbol's connection landed on a picked point
Moves a new symbol so its nearest connection sits exactly on the connection or line end that was clicked.
offset = R(rot) · connection × size; at = picked − offset
P&ID placement, zones and values written to the drawing addons/pid/main.js64-bit- CadCraft
-
Scale of an imported DEXPI drawing
The drawing units per millimeter used to place an imported P&ID.
k = 1 ÷ (millimeters per drawing unit)
P&ID placement, zones and values written to the drawing addons/pid/main.js64-bit- CadCraft
-
Imported stream table values
Converts stream temperature, pressure and flows to display units and writes them into a table in the drawing.
°C = K − 273.15 (1 decimal); bar = Pa ÷ 1e5 (3); kg/h = kg/s × 3600 (1); kmol/h = mol/s × 3.6 (3); fractions 3 and 4 decimals
P&ID placement, zones and values written to the drawing addons/pid/main.js64-bit- CadCraft
-
Drawing coordinates for the area calculator
Hands the symbols' positions and the meters per drawing unit to the hazardous-area calculator.
toMetres = (millimeters per drawing unit) ÷ 1000
P&ID placement, zones and values written to the drawing addons/pid/main.js64-bit- CadCraft
-
Consequence zones drawn to scale
Draws each zone of the consequence calculator as a circle or polygon at the picked point.
k = 1000 ÷ (millimeters per drawing unit); center = at + (cx, cy) × k; radius = r × k
P&ID placement, zones and values written to the drawing addons/pid/main.js64-bit- CadCraft
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.