Writing
Long-form notes on geotechnical numerical modelling and on building engineering software that can be trusted. The aim is that each article is the best available answer to one narrow question.
Bloom in linear light, and what sRGB averaging costs
Averaging black and white in sRGB gives code 128 where the physically correct answer is code 188, and every blur, downsample and bloom pays that error
A parallel for over one atomic counter
Splitting an uneven render into eight contiguous blocks reached 2.95x on eight threads. Handing rows out from one atomic counter reached 6.16x, on the same work
PolyBLEP: two samples that fix oscillator aliasing
A naive sawtooth at 1199.71 Hz puts alias energy 15.15 dB under its harmonics. A two-sample polynomial correction pushes it to 31.71 dB, for six flops
Sphere tracing: the step that must not overshoot
A distance field that overestimates distance makes sphere tracing unsafe. In this tunnel the gradient bound is 1.1833, so only 0.8451 of each step is safe
The consistent tangent: 7 iterations against 887
Newton converges quadratically only with the exact Jacobian. On one elastoplastic bar the correct tangent needs 7 iterations where the elastic one needs 887.
Hoek-Brown tunnel: the closed-form ground reaction curve
A circular tunnel in Hoek-Brown rock, derived in closed form from radial equilibrium and solved in KATAI 2D: plastic radius, wall closure, every number given.
Reproducing a PLAXIS 2D benchmark to within 0.03%
A rigid strip footing on an elastic layer, solved in KATAI 2D against the published PLAXIS 2D value: every input, formula and convergence band stated.
Geotechnical FEM verification: the KATAI 2D benchmark suite
How an open-source geotechnical finite element engine is verified: closed-form solutions, published benchmarks and the results, with every tolerance stated.
What a Mohr circle actually tells you
The Mohr circle turns a stress state into geometry. The angles on it are doubled, the envelope touches it once, and both facts are derived here from scratch.
Soil classification from a grading curve
Reading D10, D30 and D60 off a grading curve is a logarithmic interpolation, not a linear one. A worked USCS classification with every number recomputed.
Suction caissons: the suction needed, and the limit
A caisson needs 182.7 kPa of suction to reach depth and lifts its soil plug at 371.8 kPa. Installability is the ratio of those two, and it is 2.04 here.
Drucker-Prager: four ways to match Mohr-Coulomb
A cone fitted to a hexagon is right in some directions and wrong in others. Matched at triaxial compression it overstates extension strength by exactly 40%.
Strength reduction: what the factor of safety reduces
A factor of safety of 1.990 means the slope stands on c of 2.5129 kPa and phi of 17.43 degrees — worked on a slope whose closed form checks the method.
Grid Convergence Index: an error bar on a FEM result
Three meshes turn a finite element answer into an answer plus an uncertainty — observed order 1.8171, extrapolated 15.2067, fine-grid band 0.27%.
Sparse direct solvers: ordering, fill-in and the cost
The same matrix, factorised in two different orders, produces 498501 fill entries or none at all. Ordering is not a tuning parameter — it is most of the cost.
Floating point: why two runs of one model disagree
Floating-point addition is not associative. Summing the same thousand contributions in another order moves the answer by 360 units in the last place.
Vertical drains: the smear zone doubles the time
Hansbo's factor goes from 2.196 to 4.393 when the smear zone is included, so 90% consolidation takes 8.0 months instead of 4.0. The same drains, the same clay.
Jet grout columns: overlap, spacing and verticality
A secant wall 1.0583 m thick at the surface is 0.3555 m thick at 18 m and gone at 20 m, from a 1% verticality tolerance alone. The geometry, worked in full.
Catenary mooring: chain length, tension and anchor load
A catenary anchor sees pure horizontal load while chain rests on the seabed — 412.3 m of it here, 1350 kN of tension at the top, 1200 kN at the anchor.
Monopile p-y curves: what PISA was needed to fix
At 35 degrees the API p-y transition sits at 16.96 diameters whatever the diameter. On an 8 m monopile that is 135.67 m, deeper than the pile itself.
Dilatancy angle: what the choice of psi actually costs
Associated flow is convenient and wrong for soil. On one bearing capacity problem it inflates the collapse load from 200.8 to 301.4 kPa — a third more.
Mohr-Coulomb return mapping: the corners and the apex
The single-surface return is three lines of algebra and it produces an inadmissible state. Worked in full, with the principal ordering violated by 37.494 kPa.
The K0 procedure: initial stresses before anything moves
A model starting from the wrong horizontal stress is wrong before the first load. Jaky, elasticity and overconsolidation give 0.429, 0.470 and 0.980 here.
Gauss quadrature in finite elements: how many points
An n-point Gauss rule is exact to degree 2n-1, which decides everything. Under-integrate and the element develops modes that deform at no energy cost at all.
Plane strain vs axisymmetric: the depth the stress reaches
A strip and a circle of the same width put very different loads on the ground below. The 10% contour sits at 1.85B under one and 6.34B under the other.
SPT: N60, (N1)60, and five routes to a friction angle
The same 18 blows become N60 of 11.5 or 20.4 depending on the rig. Five published correlations then spread the friction angle over eight degrees.
CPT interpretation: from qc and fs to Ic and su
A cone reading is not a soil type. Between them sit an area correction, two normalisations and a factor nobody measures — worked through on one sounding depth.
Terzaghi consolidation: the series and its approximations
The two formulas every textbook gives for the degree of consolidation are approximations to one Fourier series. Here is the series, and where each one fails.
Effective stress: a worked profile, uplift and settlement
Total stress is arithmetic; pore pressure is a boundary condition you have to go and find. One profile, three questions, and the same subtraction behind each.
Atterberg limits: the flow curve and the plasticity chart
The liquid limit is a point read off a fitted flow curve, not a single reading. A full classification of a fine-grained soil, with every number recomputed.