This is the 2D counterpart of the strain-gauge rosette simulator. The 3D scene lets you dial in a uniform strain field directly. This version instead derives the strain from a real contact-mechanics problem: a line load P pressed into the edge of a semi-infinite elastic half-plane, using the classic closed-form Flamant solution for the resulting 2D stress field —
σxx = −(2P/π)·x²y/(x²+y²)²
σyy = −(2P/π)·y³/(x²+y²)²
σxy = −(2P/π)·xy²/(x²+y²)²
Moving the probe point (x, y) samples a genuinely non-uniform field — the strain the rosette reads depends on where it sits relative to the load, exactly as it would on a real loaded part. Stress is converted to plane-strain strain with the material's E and ν, then read through the same 45° rosette (0°/45°/90°) and inverted the same way as the 3D model:
εx = (1−ν²)/E·σxx − ν(1+ν)/E·σyy
εy = (1−ν²)/E·σyy − ν(1+ν)/E·σxx
γxy = σxy/G, G = E/[2(1+ν)]
ε(θ) = εx·cos²θ + εy·sin²θ + γxy·sinθ·cosθ
ε1,2 = (εx+εy)/2 ± √[((εx−εy)/2)² + (γxy/2)²]
The lower panel draws the live Mohr's circle for the strain state at the probe — the three gauge readings are plotted as points on the circle, and its horizontal-axis intercepts are the principal strains ε₁, ε₂ read directly off the construction, not just printed as numbers.
- Line load P — force per unit length pressed into the surface; scales every stress component linearly.
- Probe offset / depth — where the rosette sits relative to the load. Directly under the load (x=0) the shear vanishes and the gauges see a pure normal strain; off to the side, shear dominates and the principal axes rotate.
- Material preset — steel, aluminum and a soft polymer share the same stress field (elastic constants don't affect stress in this plane-strain problem) but convert it to very different strain magnitudes.
- Gauge factor GF — metal-foil (≈2) vs. doped-silicon piezoresistive (≈150) gauges convert the same local strain into a much larger ΔR/R.
Real-world relevance: the Flamant solution is the textbook model for a roller, knife-edge or rail contact pressed into a surface — used to size strain-gauge instrumentation placed near bearings, rail contact patches and punch/die tooling.