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
-
Row spacing without winter shade
The distance between ground rows that leaves no shade at the winter solstice.
h = slant × sin β; shadow = h ÷ tan α × max(0, cos Δaz); pitch = slant × cos β + shadow
Solar array layout on roofs and ground pv.js64-bit- BimCraft
- CivilCraft
-
Ground rows of tables
The tables and modules of a ground array with their corners, the pitch and the ground cover ratio.
table width = n × across + (n − 1) × gap; row origin = origin − facing × pitch × r; GCR = slant ÷ pitch
Solar array layout on roofs and ground pv.js64-bit- BimCraft
- CivilCraft
-
Compass frame of the site
The north and east unit vectors in the model's plan.
north = n ÷ |n|; east = (north_y, −northₓ)
Sun position and light on a tilted plane for solar pv-sun.js64-bit- BimCraft
- CivilCraft
-
Clock hour for a solar hour
The clock time at which the sun's time is a given hour.
clock = solar − (equation of time + 4 × longitude − 60 × time zone) ÷ 60
Sun position and light on a tilted plane for solar pv-sun.js64-bit- BimCraft
- CivilCraft
-
Sun direction in model axes
The sun's altitude, azimuth and direction for a solar hour, turned to the model's north.
dir = east × dₓ + north × d_y, with d_z unchanged; ω = 15° × (solar hour − 12)
Sun position and light on a tilted plane for solar pv-sun.js64-bit- BimCraft
- CivilCraft
-
Daily extraterrestrial radiation
The energy on a horizontal plane above the atmosphere in one day.
δ = 23.45° × sin(2π(284 + n) ÷ 365); ω_s = acos(−tan φ · tan δ); H₀ = 24 ÷ π × G_on ÷ 1000 × (cos φ cos δ sin ω_s + ω_s sin φ sin δ)
Sun position and light on a tilted plane for solar pv-sun.js64-bit- BimCraft
- CivilCraft
-
Monthly diffuse fraction
The share of a month's daily light that is diffuse, from the clearness index.
ω_s ≤ 81.4°: 1.391 − 3.56 k + 4.189 k² − 2.137 k³; else 1.311 − 3.022 k + 3.427 k² − 1.821 k³
Sun position and light on a tilted plane for solar pv-sun.js64-bit- BimCraft
- CivilCraft
-
Hourly share of the day's light
The share of a day's total and diffuse light that falls in one hour.
r_d = π ÷ 24 × (cos ω − cos ω_s) ÷ (sin ω_s − ω_s cos ω_s); r_t = (a + b cos ω) × r_d
Sun position and light on a tilted plane for solar pv-sun.js64-bit- BimCraft
- CivilCraft
-
Hourly light from a typed monthly total
Spreads a typed daily total over the hours and splits it into diffuse and direct light.
I = H × r_t ÷ Σ r_t; I_d = min(I, H_d × r_d ÷ Σ r_d); DNI = min((GHI − DHI) ÷ cos z, 0.8 × G_on)
Sun position and light on a tilted plane for solar pv-sun.js64-bit- BimCraft
- CivilCraft
-
Light on a tilted plane
The direct, sky and ground-reflected light on a module plane in one hour.
beam = DNI × cos θ; sky = DHI × (1 + cos β) ÷ 2; ground = GHI × ρ × (1 − cos β) ÷ 2; IAM = max(0, 1 − b₀(1 ÷ cos θ − 1))
Sun position and light on a tilted plane for solar pv-sun.js64-bit- BimCraft
- CivilCraft
-
Site position and time zone
The latitude, longitude, north direction and time zone used for the sun.
time zone = round(longitude ÷ 15) unless given
Solar arrays on the model pv-calc.js64-bit- BimCraft
-
Model triangles in millimeters
Every placed triangle of the model that can shade or carry modules.
mm = mesh position × unit in mm
Solar arrays on the model pv-calc.js32-bit in part- BimCraft
-
Array tilt and power
The tilt, azimuth and peak power recorded for a planned array.
tilt = acos(clamp(n_z, −1, 1)) × 180 ÷ π; kWp = modules × Wp ÷ 1000
Solar arrays on the model pv-calc.js64-bit- BimCraft
-
Array definition stored in the file
The text that records an array's plane, module size and module centers.
normal, u, v: round to 1e-6; module centers and table corners: round to 0.1 mm
Solar arrays on the model pv-calc.js64-bit- BimCraft
-
Arrays read back from the file
Rebuilds each array's modules and corners from its stored definition.
corner = c ± u × across ÷ 2 ± v × along ÷ 2
Solar arrays on the model pv-calc.js64-bit- BimCraft
-
Module frames in the level's axes
Turns module centers and the array's directions from model axes into the level's own axes for the stored solids.
point′ = S⁻¹ · p; direction′ = S⁻¹ · d − S⁻¹ · 0
Solar arrays on the model pv-calc.js64-bit- BimCraft
-
Shade fraction of an array
The shaded share of each array for every month and hour.
fraction = Σ (table fraction × table samples) ÷ Σ samples
Solar arrays on the model pv-calc.js64-bit- BimCraft
-
Overcurrent device size
The smallest standard device that is at least the required current.
smallest x in the list with x ≥ amps − 1e-9
Solar one-line currents, devices and wires pv-oneline.js64-bit- BimCraft
-
Wire size
The smallest wire whose ampacity, after derating, is at least the required current.
smallest wire with ampacity × derate ≥ amps − 1e-9
Solar one-line currents, devices and wires pv-oneline.js64-bit- BimCraft
-
A run on the diagram
Records one run with its current, required current, device and wire.
device and wire from the required current; stored current and required current rounded to 0.1 A
Solar one-line currents, devices and wires pv-oneline.js64-bit- BimCraft
-
DC currents of an array
The current of one string circuit and of the array's combined output, with the required values.
per circuit = I_sc factor × continuous factor × I_sc; output = strings × I_sc; required = factor × output
Solar one-line currents, devices and wires pv-oneline.js64-bit- BimCraft
-
Run from the DC disconnect to the inverter
The current, device and wire of the run into each inverter.
Solar one-line currents, devices and wires pv-oneline.js64-bit- BimCraft
-
AC current of an inverter
The output current of one inverter at the service voltage.
I = P_ac × 1000 ÷ (V × √3) for three-phase; I = P_ac × 1000 ÷ V for single-phase
Solar one-line currents, devices and wires pv-oneline.js64-bit- BimCraft
-
Grid position from GeoTIFF tags
The transform from cell column and row to map coordinates.
x₀ = tie_X − tie_I × scale_X; y₀ = tie_Y + tie_J × scale_Y; pixel-is-point: x₀ −= ½(a + b), y₀ −= ½(d + e)
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
Cell size
The single cell size of a square, north-up grid.
cell = a when b = d = 0 and |a + e| < 1e-9 × |a|
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
ASCII grid header
The size, cell size and lower-left corner of an ASCII grid.
corner = center − cell ÷ 2 when the header gives cell centers
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
ASCII grid position
The transform of an ASCII grid, with its origin at the top-left corner.
top = yll + rows × dy
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
Elevation from a stored sample
Turns one stored sample into an elevation, or into no value.
z = v × scale + offset
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
Reading a window of cells
Reads part of the grid, optionally every step-th cell, into an array of elevations.
columns = ceil((c₁ − c₀) ÷ step); rows = ceil((r₁ − r₀) ÷ step)
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
Lowest and highest elevation
The minimum and maximum elevation shown for a grid.
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
Position of a georeferenced picture
The transform and bounding box of a picture read at a reduced size.
sₓ = width ÷ w, s_y = height ÷ h; affine = [x₀, a·sₓ, b·s_y, y₀, d·sₓ, e·s_y]
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
Sun direction for a rendering
The direction to the sun in the 3D view's axes.
model = east × dₓ + north × d_y, with d_z kept; view = (mₓ, m_z, −m_y), normalized
Rendering: sun direction, lamps and painted faces render-bim.js32-bit, display only- BimCraft
-
Lamps from light fixtures
A lamp for each light fixture: where it is, how bright and how wide.
lumens = stored value, else watts × 80, else 800; position = middle of the fixture's box, just under it
Rendering: sun direction, lamps and painted faces render-bim.js32-bit, display only- BimCraft
-
Which side of an element a face is
Names the axis of the element's placement that a face normal runs along, to pick the material painted on that side.
axis = the placement column with the largest |n · column|
Rendering: sun direction, lamps and painted faces paint-bim.js32-bit, display only- BimCraft
-
Cabinet footprints in the plan
Each counter-ready cabinet's footprint, as a rectangle or an L, in the level's plan.
(X, Y) = (pₓ + x·cos r − y·sin r, p_y + x·sin r + y·cos r), then the level's inverse matrix
Countertop outline and quantities res-counter.js64-bit- BimCraft
-
Countertop runs
The outline, area and perimeter of each joined run of cabinets with the overhang added.
front edge points += overhang × outward normal; run = union of the footprints
Countertop outline and quantities res-counter.js64-bit- BimCraft
-
Point in a run
Tests whether a point is inside a run's outline or on its edge.
even-odd ray test, or within 1 mm of an edge
Countertop outline and quantities res-counter.js64-bit- BimCraft
-
Countertop quantities
The area, perimeter and front edge length stored for a countertop.
Area = round(mm² ÷ 10⁶, 6) m²; FrontEdge = Σ lengths of the cabinets' front edges
Countertop outline and quantities res-counter.js64-bit- BimCraft
-
Default dormer sizes
The width, height, pitches, overhang and wall thickness a new dormer starts with.
gable pitch = atan(8 ÷ 12) in degrees; shed pitch = atan(3 ÷ 12) in degrees; sizes = inches × 25.4
Dormer geometry res-dormer.js64-bit- BimCraft
-
Dormer planes, walls and cut
Every polygon of the dormer in 3D and the outline of the hole in the roof.
t_v = T × √(1 + s_m²); shed: y_back = (H + t_vd) ÷ (s_m − s_d); gable: y_ridge = (H + s_d × w ÷ 2) ÷ s_m
Dormer geometry res-dormer.js64-bit- BimCraft
-
A sloped polygon as a solid
Sets up the frame and profile of a planar polygon swept straight up.
n = unit((p₁ − p₀) × (p₂ − p₀)); x = unit(Z × n); y = n × x; sweep = (Z·x, Z·y, Z·n)
Dormer geometry res-dormer.js64-bit- BimCraft
-
From the walls' level to the roof's level
Moves the dormer's points and directions into the axes of the level that holds the roof.
M = roof level⁻¹ × walls level; direction = M·v − M·0
Dormer geometry res-dormer.js64-bit- BimCraft
-
Hole in the roof slab
The outline and depth of the opening that the dormer cuts in its roof face.
outline = M_slab · cut; depth = cutZ₁ − cutZ₀
Dormer geometry res-dormer.js64-bit- BimCraft
-
Device spot on the nearest wall face
The wall face nearest the pointer, the distance along it and the direction the device faces.
s = clamp((p − a)·u, 0, L); distance to face = ||(p − a)·n| − t ÷ 2|; angle = atan2(side·n_y, side·nₓ)
Electrical devices: positions, loads and circuit amps res-elec.js64-bit- BimCraft
-
Point on a wall face
The plan point on a wall's face at a distance along the wall.
at = a + s·u + side × (t ÷ 2)·n
Electrical devices: positions, loads and circuit amps res-elec.js64-bit- BimCraft
-
Stored device position and body
The device's placement, box and the X, Y and Angle kept for it.
placement angle = angle × 180 ÷ π − 90; X, Y = round(mm ÷ unit, 6); Angle = round(degrees, 4)
Electrical devices: positions, loads and circuit amps res-elec.js64-bit- BimCraft
-
Ceiling height of a level
The height ceiling-mounted devices are placed at.
middle value of the sorted wall heights; else max(2000, level height − 300)
Electrical devices: positions, loads and circuit amps res-elec.js64-bit- BimCraft
-
Nominal voltage of a device
The voltage used for a circuit's current, from the device kind and the unit system.
metric: 230 V, three-phase socket 400 V; feet and inches: 120 V, cooker, heater, charger and three-phase socket 240 V
Electrical devices: positions, loads and circuit amps res-elec.jsExact- BimCraft
-
Circuit schedule
The device count, load, current and voltage of each circuit.
watts = Σ load; volts = highest nominal voltage on the circuit; amps = watts ÷ volts, to 1 decimal
Electrical devices: positions, loads and circuit amps res-elec.js64-bit- BimCraft
-
Device schedule total
The rows of the device schedule and the total load.
total watts = round(Σ load)
Electrical devices: positions, loads and circuit amps res-elec.js64-bit- BimCraft
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.