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
-
Values in the shared problem list
The found and required values attached to a failed concrete check or drift.
utilization rounded to 0.0001; drift rounded to 0.01 mm
Numbers in the frame analysis report frame/frame-concrete.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Slab and wall rows of the report
For each slab or wall: its largest deflection, its largest positive and negative moments, twisting moment and shear.
max and min of the plates' center values; Q = √(Qx² + Qy²); w = largest node displacement; kN·m/m = N·mm/mm ÷ 1000, 2 decimals
Numbers in the frame analysis report frame/plate-draw.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Values in a slab problem
The required and provided steel, or the shear and its strength, attached to a failed slab check.
steel rounded to 0.1 mm²/m; shear to 0.1 kN/m
Numbers in the frame analysis report frame/slab-design.js64-bit- CadCraft
- BimCraft
- DetailCraft
-
Deflected shape
The members' deflected shape, enlarged so it can be seen.
drawn point = point + scale × displacement; scale = 0.015 × model size ÷ largest displacement
Analysis results drawn on the model frame/frame-draw.js32-bit, display only- CadCraft
- BimCraft
- DetailCraft
-
Force diagram beside a member
A filled diagram of one internal force drawn square to each member, with its largest value labeled.
height = value × 0.08 × model size ÷ largest value
Analysis results drawn on the model frame/frame-draw.js32-bit, display only- CadCraft
- BimCraft
- DetailCraft
-
Plate contours
Each plate as two triangles colored by its corner values, with the largest values labeled.
color = ramp(|value| ÷ largest |value|); kN·m/m = N·mm/mm ÷ 1000
Analysis results drawn on the model frame/plate-draw.js32-bit, display only- CadCraft
- BimCraft
- DetailCraft
-
Points written to a file
Each point's northing, easting and elevation as text.
text = v.toFixed(3); 0 when |v| < 0.0005
Layout point files and as-built comparison layout/layout-points.js64-bit- CadCraft
- BimCraft
-
Points read from a file
Turns the northing, easting and elevation text of a row into numbers.
x = Number(E); y = Number(N); z = Number(Z) or none
Layout point files and as-built comparison layout/layout-points.js64-bit- CadCraft
- BimCraft
-
Difference between a design and an as-built point
The offsets in x, y and height, the horizontal and 3D distance, and whether the point is within tolerance.
dh = √(dx² + dy²); d3 = √(dh² + dz²); out when dh > tol or |dz| > tolZ
Layout point files and as-built comparison layout/layout-points.js64-bit- CadCraft
- BimCraft
-
Matching points by nearness
Pairs each design point with the closest unused as-built point within a radius.
pairs sorted by horizontal distance, taken closest first; radius = 10 × tol by default
Layout point files and as-built comparison layout/layout-points.js64-bit- CadCraft
- BimCraft
-
Summary of the comparison
The counts, the largest horizontal and height differences and the root mean square of the horizontal differences.
rms = √(Σ dh² ÷ n)
Layout point files and as-built comparison layout/layout-points.js64-bit- CadCraft
- BimCraft
-
Comparison table
The rows of the comparison as text for the page and the CSV.
text = v.toFixed(3)
Layout point files and as-built comparison layout/layout-points.js64-bit- CadCraft
- BimCraft
-
Day of the year
The day number of a date.
N = days before the month + day (+1 after February in a leap year)
Sun position for shadows m3d/sun.jsExact- CadCraft
- BimCraft
- ModelCraft
- CivilCraft
-
Equation of time and declination
How far sun time runs ahead of clock time, and the sun's angle above the equator, for the date.
γ = 2π ÷ (365 or 366) × (N − 1 + (hour − 12) ÷ 24); eqtime = 229.18 × (0.000075 + 0.001868 cos γ − 0.032077 sin γ − 0.014615 cos 2γ − 0.040849 sin 2γ)
Sun position for shadows m3d/sun.js64-bit- CadCraft
- BimCraft
- ModelCraft
- CivilCraft
-
Hour angle and altitude
The sun's height above the horizon.
tst = hour × 60 + eqtime + 4 × lon − 60 × tz; H = tst ÷ 4 − 180°; cos Z = sin φ sin δ + cos φ cos δ cos H; altitude = 90° − Z
Sun position for shadows m3d/sun.js64-bit- CadCraft
- BimCraft
- ModelCraft
- CivilCraft
-
Azimuth
The sun's compass direction, in degrees clockwise from north.
azimuth = atan2(sin H, cos H sin φ − tan δ cos φ) + 180°, wrapped to 0…360
Sun position for shadows m3d/sun.js64-bit- CadCraft
- BimCraft
- ModelCraft
- CivilCraft
-
Direction toward the sun
The unit vector shadows are cast from, in model axes (north is +Y, east is +X).
dir = (sin a cos alt, cos a cos alt, sin alt)
Sun position for shadows m3d/sun.js64-bit- CadCraft
- BimCraft
- ModelCraft
- CivilCraft
-
Unit vector
A vector scaled to length 1.
n = a ÷ |a|; [0, 0, 0] when |a| ≤ 1e-15
3D vectors, planes and transforms m3d/vec.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
-
Polygon normal
The unit normal of a polygon given by its corner points.
N = Σ (pᵢ − pᵢ₊₁) × (pᵢ + pᵢ₊₁) taken per axis, then normalized
3D vectors, planes and transforms m3d/vec.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
-
Polygon area in 3D
The area of a flat polygon in space.
area = |Σ (pᵢ − pᵢ₊₁) × (pᵢ + pᵢ₊₁)| ÷ 2
3D vectors, planes and transforms m3d/vec.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
-
Plane through a point
A plane as a unit normal and an offset, with the normal's sign made canonical.
n·p = d; first component of n with |n| > 1e-9 is made positive
3D vectors, planes and transforms m3d/vec.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
-
Same plane test
Whether two planes are the same plane.
|n₁·n₂| > 1 − 1e-9 and |d₁ × sign(n₁·n₂) − d₂| ≤ 1e-6
3D vectors, planes and transforms m3d/vec.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
-
Closest points of a line and a segment
The nearest points between a ray's line and an edge.
den = (d·d)(u·u) − (d·u)²; t = (B·E − C·D) ÷ den; s = (A·E − B·D) ÷ den, clamped to [0, 1]
3D vectors, planes and transforms m3d/vec.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
-
Closest points of two lines
The nearest points between two infinite lines, or nothing when they are parallel.
den = A·C − B²; parallel when |den| < 1e-14 × A × C
3D vectors, planes and transforms m3d/vec.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
-
Ray and plane
The point where a ray's line meets a plane.
t = (d_plane − n·o) ÷ (n·dir); p = o + t × dir
3D vectors, planes and transforms m3d/vec.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
-
Ray and triangle
The distance along a ray to a triangle, or nothing when it misses.
Möller–Trumbore: det = e₁·(d × e₂); u, v, t from three scalar triple products ÷ det
3D vectors, planes and transforms m3d/vec.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
-
Rotation about an axis through a point
The 4×4 matrix that turns geometry by an angle about an axis through a given point.
M = T(about) × R(axis, θ) × T(−about), R from Rodrigues' formula
3D vectors, planes and transforms m3d/vec.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
-
Transform a point
A point moved by a 4×4 matrix.
p′ = (M × [x, y, z, 1]) ÷ w
3D vectors, planes and transforms m3d/vec.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
-
Inverse of a 4×4 matrix
The matrix that undoes a transform, used to move points into a group's own coordinates.
M⁻¹ = adj(M) ÷ det(M), with det from twelve 2×2 minors
3D vectors, planes and transforms m3d/vec.js64-bit- CadCraft
- BimCraft
- ModelCraft
- TakeoffCraft
- CivilCraft
-
Unit constants
The Boltzmann constant, Coulomb constant, acceleration factor and pressure factor for reduced and real units.
real: kB = 0.0019872041 kcal/mol/K; ke = 332.0637; accel = 418.4; pressure = 68568.4 atm per kcal/mol/ų
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Complementary error function
erfc(x), used for the real-space part of the Ewald sum.
erfc(x) ≈ t × exp(−x² + P₉(t)), t = 1 ÷ (1 + |x| ÷ 2); 2 − that for x < 0
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Pair parameters and the cutoff shift
σ and ε for each pair of atom types and the energy subtracted so the pair energy is zero at the cutoff.
σᵢⱼ = (σᵢ + σⱼ) ÷ 2; εᵢⱼ = √(εᵢ εⱼ); shift = 4 εᵢⱼ (s² − s), s = (σᵢⱼ ÷ r_c)⁶
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Kinetic energy
The kinetic energy of the system in its energy unit.
KE = ½ Σ mᵢ (vx² + vy² + vz²) ÷ accel
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Temperature
The instantaneous temperature from the kinetic energy.
T = 2 KE ÷ (dof × kB), dof = max(1, 3N − 3 − constraints)
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Pair forces and energies
The Lennard-Jones and real-space Coulomb force, energy and virial of one pair of atoms.
U = 4ε(s⁶² − s⁶) − shift, s⁶ = (σ² ÷ r²)³; Coulomb: ke qᵢqⱼ erfc(αr) ÷ r; excluded pairs: −ke qᵢqⱼ erf(αr) ÷ r
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Bond stretch
The energy, force and virial of each harmonic bond.
U = ½ k (r − r₀)²; F = −k (r − r₀) ÷ r along the bond
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Bond angles
The energy, forces and virial of each harmonic angle.
θ = acos(a·b ÷ (|a||b|)); U = ½ k (θ − θ₀)²; dU/dcos = −k (θ − θ₀) ÷ sin θ
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Dihedral angles
The energy and forces of each periodic dihedral.
φ = atan2(|b₂| b₁·n₂, n₁·n₂); U = k_d (1 + cos(nφ − δ))
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Ewald reciprocal sum and self term
The long-range part of the Coulomb energy and force.
E = (2π ke ÷ V) Σ_k exp(−k² ÷ 4α²) ÷ k² × |S(k)|², |n|² ≤ kmax²; self = −ke α ÷ √π × Σ q²
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Pressure
The virial pressure of the box.
P = (2 KE + W) ÷ (3V) × unit factor
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Time stepping, thermostats and barostat
Advances the system by velocity Verlet, with optional temperature and pressure coupling.
v += ½ dt a; x += dt v; forces; v += ½ dt a; Berendsen λ = √(1 + dt÷τ (T₀÷T − 1)); μ = ∛(max(0.5, 1 − dt÷τ_p κ (P₀ − P)))
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Radial distribution function
g(r): how many atoms sit at each distance, relative to an ideal gas of the same density.
g(b) = count(b) ÷ (frames × shell × N_A × (N_B, or N_A − 1 for one type) ÷ V), shell = 4⁄3 π ((b+1)³ − b³) dr³
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Mean-square displacement and diffusion
The mean-square displacement over time and the diffusion coefficient from its slope.
D = (n Σtm − Σt Σm) ÷ (n Σt² − (Σt)²) ÷ 6 over the chosen part of the samples
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Mass density
The density of the box in g/cm³ (real units).
ρ = Σm ÷ 0.602214076 ÷ V (amu per ų to g/cm³)
Molecular dynamics molecular/md.js64-bit- CadCraft
- BimCraft
-
Fast Fourier transform
The in-place radix-2 transform used on each axis of the charge mesh.
Molecular dynamics molecular/pme.js64-bit- CadCraft
- BimCraft
-
Cardinal B-spline
The weight of a charge on a mesh point.
M₂(u) = 1 − |u − 1|; Mₙ(u) = u ÷ (n−1) × Mₙ₋₁(u) + (n−u) ÷ (n−1) × Mₙ₋₁(u−1)
Molecular dynamics molecular/pme.js64-bit- CadCraft
- BimCraft
-
B-spline moduli
The correction 1 ÷ |b(m)|² applied to each mesh wave vector.
Molecular dynamics molecular/pme.js64-bit- CadCraft
- BimCraft
-
Particle-mesh Ewald energy and forces
The reciprocal Coulomb energy and the force on every charge from a mesh instead of the plain sum.
E = ½ Σ_m G(m) |Q̂(m)|², G = ke ÷ (πV) × exp(−π² m² ÷ α²) ÷ m² × B(m)
Molecular dynamics molecular/pme.js64-bit- CadCraft
- BimCraft
-
Rigid bonds
Moves atoms after a step so each constrained bond has its set length, and corrects the velocities.
g = (d² − r²) ÷ (2 (1÷mᵢ + 1÷mⱼ) r·s); stop when |d² − r²| ≤ 2 × tol × d²
Molecular dynamics molecular/pme.js64-bit- CadCraft
- BimCraft
-
Mean and standard error of a run
The mean of the samples and its standard error by block averaging.
mean = Σx ÷ n; error = √(Σ(blockᵢ − m)² ÷ (nb − 1) ÷ nb), nb = min(5, n) blocks of ⌊n ÷ nb⌋ samples
Molecular dynamics molecular/props.js64-bit- CadCraft
- 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.