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
-
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
-
Length of a position
The length of a pipe, truss or floor line along its points.
L = Σ √(Δx² + Δy²)
Stage lighting plot: positions, fixtures and loads addons/lighting/lib/model.js64-bit- CadCraft
-
Where a point is on a position
The distance along a position to the point nearest a fixture, and the fixture's distance from the line.
u = clamp((p − a)·(b − a) ÷ |b − a|², 0, 1); s = length before + u × |b − a|; off = |p − q|
Stage lighting plot: positions, fixtures and loads addons/lighting/lib/model.js64-bit- CadCraft
-
Position a fixture belongs to
The nearest named position within reach of a point.
nearest with off ≤ tol
Stage lighting plot: positions, fixtures and loads addons/lighting/lib/model.js64-bit- CadCraft
-
Fixture data checked
Checks a fixture's stored data: scale, wattage, DMX footprint and aim angle.
aim = ((aim mod 360) + 360) mod 360
Stage lighting plot: positions, fixtures and loads addons/lighting/lib/model.js64-bit- CadCraft
-
Wattage of a fixture
The watts of a fixture: its own value, or its type's typical value.
Stage lighting plot: positions, fixtures and loads addons/lighting/lib/model.js64-bit- CadCraft
-
Point at a distance along a position
The drawing point a given distance along a position's line.
u = clamp((s − run) ÷ l, 0, 1); p = a + (b − a) × u
Stage lighting plot: positions, fixtures and loads addons/lighting/main.js64-bit- CadCraft
-
Fixtures spread along a position
Places n fixtures evenly along a position.
sᵢ = L × (i + 0.5) ÷ n
Stage lighting plot: positions, fixtures and loads addons/lighting/main.js64-bit- CadCraft
-
A position moved, turned or scaled
Applies a move, rotation or scale to a position's points and its scale.
k′ = k × √(m₀² + m₁²); p′ = M · p
Stage lighting plot: positions, fixtures and loads addons/lighting/main.js64-bit- CadCraft
-
Fixture symbol turned to its aim
Rotates a fixture's symbol by its aim angle.
x′ = x cos a − y sin a; y′ = x sin a + y cos a
Stage lighting plot: positions, fixtures and loads addons/lighting/lib/draw.js64-bit- CadCraft
-
Position length in millimeters
The length of a position for the schedule and the capacity warning.
mm = length in drawing units ÷ k
Stage lighting plot: positions, fixtures and loads addons/lighting/lib/draw.js64-bit- CadCraft
-
Legend totals
The total number of fixtures and total watts at the foot of the legend.
total = Σ count; total watts = Σ watts
Stage lighting plot: positions, fixtures and loads addons/lighting/lib/draw.js64-bit- CadCraft
-
A drawing object as a nest loop
Turns a circle or closed polyline into a loop of points with bulges.
circle = (cx + r, cy) and (cx − r, cy), each with bulge 1
Nesting add-on: outlines in, placed copies out addons/nesting/lib/parts.js64-bit- CadCraft
-
Outline as chords for containment
Points along an outline, with each arc as 8 chords, used to test which outline contains which.
θ = 4 atan(b); r = c ÷ (2 sin(θ ÷ 2)); center = chord middle + normal × r cos(θ ÷ 2)
Nesting add-on: outlines in, placed copies out addons/nesting/lib/parts.js64-bit- CadCraft
-
Parts and their holes
Groups outlines into parts with holes and moves each part to its own corner.
parent = smallest larger outline containing the first point; shifted point = p − (x₀, y₀)
Nesting add-on: outlines in, placed copies out addons/nesting/lib/parts.js64-bit- CadCraft
-
A part's object placed on the sheet
Moves and turns one object of a part to where the engine placed it.
q = at + (x, y) + R(rot) · (p − origin)
Nesting add-on: outlines in, placed copies out addons/nesting/lib/parts.js64-bit- CadCraft
-
Sheet rectangles and labels
A rectangle for each sheet, side by side, and the part names over the copies.
xₖ₊₁ = xₖ + w + gap, gap = max(20, 0.1 × h) by default; label at the mean of the outline's points
Nesting add-on: outlines in, placed copies out addons/nesting/lib/parts.js64-bit- CadCraft
-
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
-
Relief valve area written to the symbol
Sizes a relief valve with the relief calculator and writes its orifice letter and area on the symbol.
area_mm2 = round(A × 1e6)
P&ID placement, zones and values written to the drawing addons/pid/main.js64-bit- CadCraft
-
Size units per drawing unit
How many inches or millimeters one drawing unit is, from the drawing's unit setting.
factor = (meters per drawing unit) ÷ 0.0254 or ÷ 0.001
P&ID line geometry and connections addons/pid/lib/core.js64-bit- CadCraft
-
Length of a line
The length of a P&ID line along its corner points.
length = Σ √(Δxᵢ² + Δyᵢ²)
P&ID line geometry and connections addons/pid/lib/core.js64-bit- CadCraft
-
Nearest point on a line
The point of a line closest to a given point, its distance, and how far along the line it lies.
u = clamp((p − a)·(b − a) ÷ |b − a|², 0, 1); point = a + u (b − a)
P&ID line geometry and connections addons/pid/lib/core.js64-bit- CadCraft
-
Label position on the longest segment
The middle and direction of a line's longest segment, where its line number is written.
mid = (a + b) ÷ 2; angle = atan2(Δy, Δx)
P&ID line geometry and connections addons/pid/lib/core.js64-bit- CadCraft
-
Numbers in CSV exports
How a number cell is written when a P&ID list is exported as CSV.
P&ID line geometry and connections addons/pid/lib/core.js64-bit- CadCraft
-
Cleaning a line's points
Checks a line's data and removes repeated corner points before it is stored.
P&ID line geometry and connections addons/pid/lib/lines.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.