Work in progress — v0.5.0-alpha. Stages A, B and D are done; C, E and F are mostly done (failure, validation, ceramics, NERA, tank armour); Stage G (explosives) is next. Expect changes and fixes. Windows builds: Releases.
A learning project: a small hydrocode (the kind of program used to simulate armor penetration, explosions and hypervelocity impacts) written from scratch in C++20. It uses SPH (Smoothed Particle Hydrodynamics): every material is a cloud of particles that carry density, velocity, stress and energy. The app uses raylib for drawing and Dear ImGui for the user interface. The solver itself has no dependencies.
| Stage | Content | Status |
|---|---|---|
| A | SPH core, elastic solids, plane strain + axisymmetric, adaptive time step, threads, record & replay UI | ✅ |
| B | Mie-Grüneisen shock EOS, Johnson-Cook plasticity, Taylor bar validation, energy-compatible forces | ✅ |
| C | Temperature, melting, damage, spall, fragmentation | ✅ mostly (rate-dependent spall open) |
| D | Scenario builder: projectile/armor library (JSON, real data), probes, graphs, CSV | ✅ |
| E | Validation: Lanz-Odermatt long-rod penetration, V50 ballistic-limit tool | ✅ mostly (long rods within 0–5% in wide targets, Børvik plate within ~1%; ricochet check open) |
| F | Ceramics (JH-2), layered/spaced armor, NERA, tank armour, obliquity & ricochet | ✅ mostly (ceramics, NERA rubber, 10 tank cross-sections, mounts, debris; ERA explosive needs G) |
| G | Explosives (JWL + programmed burn): ERA, HEAT jets, HESH | ⏳ next |
| H | Optional: performance, 3D | ⏳ |
Metals yield, flow and heat up (Johnson-Cook), shocks follow measured Hugoniots, and they fail: Johnson-Cook ductile fracture, spall under sustained tension, melting. Ceramics crack and turn to rubble (JH-2), rubber makes NERA plates bulge and break rods, and every material's data comes with its source.
Highlights
- Modern tank rounds (DM53, M829A3, 3BM60, 3BM59) and ten tank armour cross-sections (turret cheeks and hull fronts of the T-90A, T-80U, M1A2 Abrams, Leopard 2A6 and Challenger 2) with real slopes, Kontakt-5, NERA, ceramics and spacing, from public estimates.
- Tank check: an instant round-vs-tank verdict from Odermatt's perforation equation.
- Setup view: drag and rotate the projectile and armour with the mouse before a run.
- Validated: long-rod penetration (DM53 502 mm vs Lanz-Odermatt 502 mm), the Børvik plate ballistic limit, the Taylor bar, Hugoniots, spall, and NERA against Fras 2021.
Requires CMake ≥ 3.25 and a C++20 compiler. raylib, Dear ImGui, rlImGui and doctest are downloaded automatically on the first configure.
cmake --preset msvc # Windows / Visual Studio 2022
cmake --build --preset msvc-release # use Release: physics in Debug is ~10x slower
ctest --preset msvc-release # run the tests (~10 s)
build\msvc\bin\Release\miataphysim.exe
A build to give to others (no machine paths inside, no Visual C++ runtime needed):
cmake -S . -B build/dist -G "Visual Studio 17 2022" -A x64 -DMIATAPHYSIM_SOURCE_PATHS=OFF -DARMOR_BUILD_TESTS=OFF -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
cmake --build build/dist --config Release --target miataphysim
Ship miataphysim.exe with the scenarios/ and library/ folders next to it.
Ready-made Windows builds are on the Releases page.
MinGW: mingw-release presets. Linux: linux-release presets (install the X11/GL
dev packages first, see raylib's docs). -DARMOR_BUILD_APP=OFF builds only the
solver and tests.
Command line (optional): miataphysim --scenario 4 --run --field 2 starts scenario 4,
runs it immediately and shows field 2 (von Mises stress).
miataphysim --headless --scenario 5 runs scenario 5 without a window and prints a
summary (energy balance, peak plastic strain / temperature / pressure, pieces and
debris, body sizes). miataphysim --headless --file scenarios/spall_copper.json --csv out.csv
runs a scenario file and writes its probe time histories to CSV.
Any setup can be described in a JSON file (mm, µs, m/s, materials by key) without
touching the code. See scenarios/README.md for the format.
Files in scenarios/ appear in the app's dropdown as [file] .... A file can
define probes: gauges that follow a material point and record pressure,
velocity, porosity and more over time. In the app they are plotted live in the
Probes window (bottom right), with Save CSV. The example
spall_copper.json shows a VISAR-like back-face velocity trace with the spall
pullback.
A loading screen, then two tabs on the left.
Simulate (the beginner path, top to bottom):
- What to simulate. Choose Ready-made (classic experiments and scenario files)
or Build your own.
- Builder: pick a projectile (including the tank rounds) and armour (including the tank fronts and cross-sections) from the library. Set the material of each piece and stack up to 6 armour layers with gaps (spaced armour). Set the speed and the angle, and save the setup as a scenario file.
- Held by the tank (per layer): the armour's edges far from the shot are held, as if the vehicle continued there.
- Set up. Before a run the view shows the setup:
- Drag the projectile or any armour with the mouse; Q / E rotates the selected one.
- A dashed orange line shows where the projectile will fly, and a faint outline shows where it started.
- Held bands are hatched. Warnings appear if the projectile overlaps something or a target is too narrow.
- Ready-made round scenarios can slide along their axis. The panel's Position section does the same with numbers.
- Run. Press Simulate. The run happens in the background, frames appear live, and the bar shows the time left. Back to setup returns to the setup to adjust.
- Watch. Play, pause, and drag the timeline (
Space,←/→). Add gauge, then click any particle: a graph of what the colours show (pressure, damage, temperature...) at that spot over the whole run appears in the Gauges window, read from the recorded frames, so no new simulation is needed. The gauge follows the material and is marked in the view.Esccancels. - Colours show. Pressure, stress, plastic strain, temperature, damage, speed and
more. Hover any particle to read all its values. Mouse wheel zooms, right-drag pans,
Ffits the view.
Gauges (probes) are plotted live in the Probes window, bottom right, with Save CSV.
Details (sorted, folded away):
- Results: energy (including energy absorbed by mounts), pieces and debris, sizes.
- Tank check: the builder's round against every tank front, instantly, with a range slider.
- Theory & checks: formula predictions and warnings.
- Resolution & duration: automatic in the builder.
- Display, Solver settings (advanced): including flying debris and failure.
- Materials: with sources.
- Controls, About.
Start-up options: --builder opens the builder, --details opens the Details tab.
In axisymmetric scenes the lower half is a mirror image. The simulation only computes the upper half (radius ≥ 0); the mirror shows the full cross-section.
core/ Vec2, Mat2, SymTensor header-only maths (double precision)
sim/ the solver library "armor_sim" no rendering, no UI
Kernel.h cubic spline kernel W and its gradient
Material.h/cpp material data: elastic constants, Mie-Grüneisen EOS and
Johnson-Cook constants, all with sources
Particles.h particle data, one vector per field
Scenario.h/cpp scene description + particle generation
NeighborGrid spatial hash -> neighbour lists (deterministic)
ThreadPool.h parallel loops; each particle written by one thread only
Solver.h/cpp the SPH equations and time stepping
Recorder.h frames for replay (lock-free hand-off to the UI thread)
io/ scenario files (JSON, nlohmann/json), probes (CSV), the projectile/armour
library + builder, V50 tool, validation formulas - "armor_io"
app/ raylib + Dear ImGui user interface, setup view, presets, colour maps, graphs
scenarios/ example scenario files (JSON)
library/ projectiles, armour, tank rounds and tank cross-sections (JSON)
tools/ gen_tank_sections.py (builds the tank cross-sections), los.py (armour
amount along the shot line)
tests/ doctest unit + validation tests
Units inside the solver are SI (m, kg, s, Pa, J). The UI shows mm, µs and MPa/GPa. Results are deterministic: identical inputs give bit-identical results on any number of threads (tested).
A solid obeys three conservation laws, written per particle moving with the material:
mass dρ/dt = −ρ ∇·v
momentum dv/dt = (1/ρ) ∇·σ
energy de/dt = (1/ρ) σ : ε̇
The stress σ splits into pressure (volume change) and deviatoric stress
(shape change): σ = −p I + S.
- Pressure from the equation of state. Stage A uses a linear one:
p = K (ρ/ρ0 − 1). - Deviatoric stress from Hooke's law in rate form:
dS/dt = 2G (ε̇ − ⅓ tr ε̇ I), plus rotation terms (Jaumann rate), so that a spinning body doesn't build up fake stress. ε̇ = ½(∇v + ∇vᵀ)is the strain rate.
Every field is a kernel-weighted average over neighbouring particles, and every gradient uses the kernel's gradient:
∇v_i ≈ Σ_j (m_j/ρ_j) (v_j − v_i) ⊗ ∇W_ij
dv_i/dt = Σ_j m_j (σ_i/ρ_i² + σ_j/ρ_j² − Π_ij I + R_ij f_ij) · ∇W_ij
The symmetric form makes the forces between two particles equal and opposite, so momentum is conserved. On top of that come three extra pieces:
- Artificial viscosity Π. Shocks are thinner than a particle, and without extra dissipation the solution rings. The kinetic energy Π removes becomes heat.
- Artificial stress R. Plain SPH is unstable in tension: particles clump. R pushes them apart in proportion to the tensile stress.
- Kernel gradient correction. Near free surfaces, particles have neighbours on one
side only. The strain-rate gradient is corrected with
M⁻¹, whereM = Σ V_j (x_j − x_i) ⊗ ∇W_ij.
- Plane strain. A slice through infinitely long objects. It supports any impact angle, but a rod is really an infinitely wide plate.
- Axisymmetric. x is the axis and y is the radius. Every particle is a ring
with mass
ρ dx² 2πr, so a rectangle on the axis is a real cylinder and a half-disc is a sphere. This is exact for straight-on impacts. The equations gain hoop terms:∇·v += v_r/r,ε̇_θθ = v_r/r,ρ a_r += (σ_rr − σ_θθ)/r,ρ a_z += σ_rz/r. Near the axis, mirror "ghost" particles complete each particle's neighbourhood.
Particles of different bodies push (pressure only, p > 0), slide without friction, and can't pull.
Two details turned out to matter:
- Another body's particles count toward a particle's compression only while they approach, or while that particle is still compressed.
- Once the contact has unloaded, bodies moving apart must not count as "stretching"; otherwise fake tension builds up at the interface.
-
CFL condition:
dt = 0.25 · h / (c + |v|), where c is the longitudinal wave speed. A signal must not cross more than a fraction of a particle per step. Steel at 0.5 mm spacing gives a step of about 28 ns. -
Semi-implicit (symplectic) Euler:
- update velocities from the current stress
- compute strain rates from the new velocities
- update stress, density and energy, then move the particles
Updating stress with the old velocities (forward Euler) pumped about 0.3% energy per µs into every vibration. That was the root cause of an explosion found during development.
A linear spring law is fine for small strains, but metals get much stiffer under
strong compression. Shock experiments measure a simple relation between the shock
speed Us and the particle velocity up behind the shock: Us = c0 + s·up. That
Hugoniot fixes the pressure on the shocked state; Mie-Grüneisen adds how
pressure changes with heat at a given density (Grüneisen parameter Γ0):
η = 1 − ρ0/ρ
p_H = ρ0 c0² η / (1 − s η)² (pressure on the Hugoniot)
p = p_H + Γ0 ρ0 (e − e_H) e_H = p_H η / (2ρ0)
Constants (c0, s, Γ0) for all five materials are from Steinberg (1996).
Above the yield stress a metal stops springing back and flows. Johnson & Cook fitted how the yield stress grows with plastic strain εp (work hardening), strain rate (rate hardening) and falls with temperature (thermal softening):
σ_y = (A + B εp^n) · (1 + C ln ε̇p*) · (1 − T*^m) T* = (T − T_room)/(T_melt − T_room)
The rate in the formula is the plastic strain rate from the previous step, which is what the constants were fitted with. The total strain rate in SPH is noisy (particle jitter) and gave spurious rate hardening.
Each step first assumes the deformation was elastic (trial stress). If the trial
von Mises stress exceeds σ_y, the deviatoric stress is scaled straight back onto
the yield surface (Wilkins 1964). The excess becomes plastic strain
Δεp = (σ_vm − σ_y)/(3G). 90% of the plastic work becomes heat (Taylor-Quinney):
ΔT = 0.9 σ_y Δεp / (ρ c_v).
- Energy-compatible forces. The internal-energy rate is the primary equation,
and every force is derived from it as minus the coefficient of that particle's
velocity in the total internal power. Energy is then conserved by construction:
where a_j is the planar mass. In plane strain (r = 1) this is the standard symmetric form. In axisymmetric mode r_j/r_i is the ring-mass ratio, which also produces the σxy/r and σyy/r hoop forces, and axial momentum is conserved exactly. The earlier form only matched approximately: an axisymmetric steel ball resting on an aluminium plate gained 23% energy, and a tungsten rod into steel gained 9% plus a 156 GPa pressure spike.
dv_i/dt = Σ_j a_j/(ρ_i ρ_j) [σ_i + (r_j/r_i) σ_j] ∇W_ij − σθθ_i ŷ/(ρ_i r_i) - Balsara switch (Balsara 1995). The artificial viscosity is scaled by
|∇·v| / (|∇·v| + |∇×v|): full in shocks (compression), reduced in shear. Plastic flow is mostly shear, and without the switch the viscosity made copper behave too stiff (Taylor bar 9% too long). A floor of 0.4 keeps some damping of particle noise. - Artificial stress work enters the energy equation like any pair force (it created 4% energy in a plane-strain impact before).
- Shepard density filter every 20 steps, only for particles with εp > 0.1. It removes the density drift that long, violent plastic flow accumulates (5% too light in copper means ~7 GPa of fake tension).
- Artificial stress is off in axisymmetric mode: near the axis it pushes rings apart, which raises the hoop tension further, a runaway.
- Ductile fracture (Johnson & Cook 1985). Damage grows with plastic strain,
D += Δεp / εf, withεf = [D1 + D2 exp(D3 σ*)][1 + D4 ln ε̇*][1 + D5 T*]and triaxialityσ* = −p/σ_vm. Pulled apart (σ* > 0), metals fail after little strain; squeezed, they flow almost forever. At D = 1 the particle fails fully: no shear strength, and every pair with it acts like contact (push only). Cracks open and fragments separate on their own. Melting fails a particle the same way. - Spall. Tension beyond the spall strength, sustained for at least the time
a sound wave takes to cross one smoothing length (the shortest pulse the particles
resolve), nucleates voids. A spalled particle stays bonded and keeps its shear
strength; its porosity φ is a state variable (P-α family, Herrmann 1969). The
metal between the voids obeys the EOS (
p = p_EOS(ρ/(1−φ), e)·(1−φ)), and a return mapping lets voids grow only while tension exceeds the Carroll-Holt thresholdmin(spall strength, (2/3) σ_y ln(1/φ)), close under compression, and coalesce into a full crack at φ = 0.25 (Tvergaard-Needleman). Two simpler versions failed: strengthless spalled copper made the Taylor core squirt out (foot 16.8 mm), and "no tension at all" let porosity ratchet up from SPH noise. - Fully failed material carries no tension anywhere, including in the axisymmetric hoop force −σθθ/(ρr), which is not a pair term. Missing that flung freshly failed particles off the axis at up to 1000 m/s.
- Both plug into the energy-compatible scheme exactly: a fully failed pair is simply on the "other body" side of every sum.
In the Taylor bar, release waves from the side surface converge on the axis and pull the core to about −4.4 GPa for ~0.7 µs (the same at two resolutions). The model opens spall voids there, centred 3.4 mm behind the impact face, and the rod stays one piece. Sectioned OFHC copper rods show "ductile void damage within the central region … approximately 3 mm from the impact interface" at 175 m/s (Gray, Maudlin & Chen, Los Alamos LA-UR-01-5614).
| Test | Theory | Result |
|---|---|---|
| Plate impact (uniaxial strain), plane strain: wave speed | cL = √((K+4G/3)/ρ) = 5878 m/s | within 0.5% |
| Plate impact, axisymmetric: wave speed | 5878 m/s | within 0.5% |
| Plate impact: stress | σ = ρ·cL·v = 231 MPa | within 0.5% |
| Rod impact (axisymmetric): stress | σ = ρ·√(E/ρ)·v = 202 MPa | within 1% |
| Rod/strip wave speed | √(E/ρ) and √(E/(ρ(1−ν²))) | −5% (*) |
| Bar collision incl. separation, 60 µs: total energy | conserved | 97–99% (viscosity heating) |
| Disc collision: total energy, momentum | conserved | 99%, exact |
| Body at rest | stays at rest | ✓ |
| Determinism | bit-identical runs | ✓ |
| Stage B | ||
| Mie-Grüneisen pressure on the measured Hugoniot | ρ0·Us·up | exact |
| Radial return caps von Mises at yield, plastic heating | σ_vm ≤ σ_y | ✓ |
| Copper plate impact at 500 m/s: shock pressure | Hugoniot 20.99 GPa | 20.79 GPa (−0.9%) |
| Taylor bar (OFHC copper, 190 m/s, dx 0.127 mm): final length | experiment 16.2 mm | 16.75 mm (+3.4%) |
| Taylor bar: foot diameter | experiment ~13.5 mm | 15.0 mm (*) |
| Ball on plate in contact (axisymmetric 10 & 500 m/s, plane strain 500 m/s): total energy | never grows | max +0.04%, final −0.2…−0.6% |
| Stage C | ||
| Spall: 2 mm Cu flyer on 6 mm Cu target, ±20 m/s | no spall (0.7 GPa < 1.3 GPa) | none ✓ |
| Spall: same at ±100 m/s, spall plane | 4.0 mm (one flyer thickness from the back face) | 3.85 mm |
| Taylor bar: internal spall voids | ~3 mm behind the impact face, central (sectioned rod, Gray et al.) | mean 3.4 mm, r 0.95 mm, rod in one piece |
| Spall signal: back-face velocity peak, ±100 / ±200 m/s | 2v = 200 / 400 m/s | 198 / 401 m/s |
| Spall strength from pullback, σ ≈ ½ρ0c0Δu | input 1.3 GPa | 1.6 / 1.7 GPa |
(*) Rod/strip wave speed: this is real physics, not error. A wave in a bar of finite width disperses (Pochhammer–Chree): its front spreads as it travels, so the half-amplitude point arrives late while the leading edge arrives early. The same −5% appears at half the particle spacing; the non-dispersive plate impact is exact.
(*) Taylor foot: the simulated wall is frictionless (a mirror-image rod). A real anvil grips the rod face and holds the foot back.
Armour ceramics use the Johnson-Holmquist JH-2 model (Johnson & Holmquist 1994). Strength is normalised by the stress at the Hugoniot elastic limit:
intact σ_i* = A (P* + T*)^N (1 + C ln ε̇*)
rubble σ_f* = B (P*)^M (1 + C ln ε̇*) ≤ σ_f,max
current σ* = σ_i* − D (σ_i* − σ_f*) D += Δεp / (D1 (P* + T*)^D2)
pressure P = K1 μ + K2 μ² + K3 μ³ + ΔP (tension: K1 μ, limited to −T (1 − D))
A ceramic is very strong when squeezed and weak when pulled. As it cracks it
becomes rubble that still resists in proportion to pressure, and it bulks: the
elastic energy released as strength drops raises the pressure,
ΔP_new = −K1 μ + sqrt((K1 μ + ΔP_old)² + 2 β K1 ΔU). Ceramic particles never
"fully fail" like metals do; the rubble keeps its strength. Pressure and work use
the same stored value, so energy stays exact.
Materials:
- Alumina AD-995 (Zhang et al. 2019, Composite Structures, Table 6): density 3890 kg/m³, G 152 GPa, K1/K2/K3 231/−160/2774 GPa, HEL 6.57 GPa, A 0.88, N 0.64, B 0.28, M 0.6, T 0.312 GPa, D1 0.01, D2 0.7. C = 0.007 (the paper prints 0.07; 0.007 is the usual value and the cautious choice). No rubble cap is given, so none is used. (An earlier set with HEL 2.79 GPa and G 90 GPa turned out to describe a much weaker, lower-purity alumina; see below.)
- Boron carbide (Johnson & Holmquist 1999): A 0.927, B 0.7, C 0.005, M 0.85, N 0.67, T 0.26 GPa, HEL 19 GPa, K1/K2/K3 233/−593/2800 GPa, G 197 GPa.
- Cross-check: the pressure at the HEL is not a free number. It follows from K1–K3, G and the HEL (uniaxial strain), and the code reproduces the published PHEL to 1% for all three (alumina 3.51, boron carbide 8.71, SiC 5.58 GPa); this is a test.
- Silicon carbide (SiC-B): two sources agree on K1/K2/K3 = 220/361/0 GPa, G 193 GPa, HEL 11.7 GPa and the strength curve; PHEL (5.58 GPa) is derived from them. Its tensile strength (0.37 GPa), damage constants (0.48/0.48) and rubble cap (0.8) are approximate.
Tile test: a 10 mm steel ball at 500 m/s into a 10 mm alumina tile gives a structured, physical damage pattern rather than noise: a fully crushed cone under the ball, cracking spreading outward through the middle and back of the tile, and an intact front surface away from the contact. Bulking reaches 2.7 GPa, and total energy never grows (final 0.998).
Investigation (tables below use the OLD, too-weak alumina constants; the fix is at the end): A tungsten rod (30 × 6 mm, 15 g, 900 m/s) against three targets of equal weight (64 kg/m²):
| Target | Rod leaves at |
|---|---|
| 10 mm alumina + 10 mm aluminium | 686 m/s |
| 23.7 mm aluminium | 682 m/s |
| 8.2 mm steel armour | 641 m/s |
Real ceramic composites beat equal-weight metal clearly. Follow-up checks (rod mass that got through and its speed, at 250 µs, with leftover energy relative to target A):
| Variant of target A | Rod mass through | Speed | Relative energy |
|---|---|---|---|
| as built | 85% | 769 m/s | 1.00 |
| no cap on alumina rubble strength | 84% | 760 m/s | 0.96 |
| alumina that never cracks (reference) | 51% | 460 m/s | 0.22 |
Plain aluminium came out at 0.96 and steel at 0.78. So the rubble strength is not
the problem: the tile cracks too early, before it can erode the rod. The likely
cause is that tile and backing were separate bodies that can only push on each other.
That joint reflects the impact wave as tension, and alumina withstands only 0.2 GPa,
so the tile cracked from the back within microseconds. Real composite armour is
glued, so the builder now glues ceramic layers to the layer behind them by default
(one bonded body, contact_group in files), with a checkbox to turn it off.
Measured afterwards (short run, 0.25 mm, 150 µs; same rod, 10 mm alumina + 10 mm aluminium): loose tile 12.7 g at 767 m/s, glued tile 12.5 g at 760 m/s. So gluing is more realistic but does not close the gap. A second idea was also tried and discarded: limiting how fast a ceramic particle can crack to a physical crack speed (0.4 × shear wave speed) gave 761 m/s, no change. The cause is still unknown; the next suspects were tension and SPH noise.
Found: the alumina constants were for the wrong ceramic. Two diagnostic shots switched off cracking from tension in one and from compression in the other. No cracking from tension changed nothing (760 m/s). No cracking from compression stopped the rod down to 5.7 g at 359 m/s. So the tile was simply crushing too easily. The constants used had HEL 2.79 GPa and G 90 GPa, a weaker lower-purity alumina, while real AD-995 has HEL ~6.6 GPa and G 152 GPa. With a sourced AD-995 set (above), the same shot gives 11.3 g at 706 m/s (was 12.5 g at 760 m/s). The leftover rod energy drops by 22%, roughly the steel result and clearly better than aluminium of the same weight. Real ceramic faces should still do somewhat better than steel, so ceramic results remain approximate, but no longer far off.
The standard benchmark for kinetic-energy penetrators: how deep a tungsten long rod gets into thick armour steel, as a function of speed. Lanz & Odermatt fitted
P/L = a · 1/tanh(b0 + b1·L/D) · sqrt(ρp/ρt) · exp(−s²/v²), s² = (c0 + c1·BHN)·BHN/ρp
a = 0.921, b0 = 0.283, b1 = 0.0656, c0 = 138, c1 = −0.10 (tungsten into RHA)
to 148 tests (standard deviation 3.9%). Coefficients are as used in Willi
Odermatt's calculator. Units: kg/m³ and km/s; BHN = 286 for the simulator's
4340-class steel. Simulated with scenarios/validation_long_rod_ld10.json (rod
100 × 10 mm, 200 mm steel block, 0.5 mm spacing, 300 µs), depth = deepest rod
material:
| Speed | Simulated P/L | Lanz-Odermatt | Difference |
|---|---|---|---|
| 1000 m/s | 0.335 | 0.317 | +5.8% |
| 1250 m/s | 0.606 | 0.602 | +0.7% |
| 1500 m/s | 0.872 | 0.852 | +2.4% |
| 1750 m/s | 1.106 | 1.050 | +5.3% |
| 2000 m/s | 1.242 | 1.203 | +3.3% |
All within 6%, on average 3.5% deep, against a fit scatter of ±3.9%. Total
energy stayed within 0.2% in every run. Not yet checked: convergence at finer
spacing (the rod is only 10 particles across). Rerun any speed with
miataphysim --headless --file scenarios/validation_long_rod_ld10.json --speed 1750,
or the slow test armor_tests -tc="VALIDATION*" --no-skip. The builder shows the
Lanz-Odermatt prediction (Details → Theory) whenever you fire a tungsten rod at
steel.
The library has four modern APFSDS rounds and seven tank-front stand-ins. All figures are public estimates, not official data:
| Round | Rod (modelled) | Speed | Plate perforated, muzzle / 2 km | Published claims |
|---|---|---|---|---|
| DM53 (Germany, 120 mm) | tungsten, 685 × 23 mm, 60 mm nose | 1720 m/s (L/55) | 612 / 568 mm | 630–660 (Polish industry), 652 (War Thunder), up to 760–810 (forums) |
| M829A3 (USA, 120 mm) | DU, 670 × 25 mm main rod | 1555 m/s | 594 / 555 mm | 633–680 (game, calculator), 800–960 (forums) |
| 3BM60 Svinets-2 (Russia, 125 mm) | tungsten, 735 × 21 mm, 60 mm nose | 1660 m/s | 627 / 577 mm | ~650–700 (hobby estimates) |
| 3BM59 Svinets-1 (Russia, 125 mm) | DU, 735 × 21 mm, 60 mm nose | 1650 m/s | 632 / 597 mm | – |
"Plate perforated" uses Odermatt's perforation equation (longrods.ch, 2022). It is fitted to 99 tungsten and 42 depleted-uranium firings against steel plates, with a standard deviation of 3.3–3.5%. Plates are taken as 260 BHN, typical of thick armour plate, and range assumes a 60 m/s per km loss. This is the measure that published penetration figures and RHA-equivalent armour estimates refer to.
The first version of the tank check used the Lanz-Odermatt depth into a thick block fit instead. That gave 440–510 mm, about 20% low against plates; fixed.
Depleted uranium: the tank check uses DU density (18.6 g/cm³) and Odermatt's DU constants. A simulation still runs DU rods as tungsten alloy, because no sourced Johnson-Cook set for DU was found. Fins, sabots and M829A3's 100 mm steel tip (in front of the DU rod) are not modelled. Sources disagree on DM53's diameter (23 or 26 mm); 23 mm matches the stated 5 kg rod. M829A3's length is uncertain too: 670 mm main rod used; estimates of ~800 mm give the ~680 mm calculator figures.
Tank fronts are blocks of armour steel as thick as the estimated protection against long rods (RHA equivalent): M1A2 Abrams turret 700–900 mm (770 used), hull 470–600 (550); T-90A turret 700–850 (790); T-80U turret 630–860 (750), hull 630–800 (715); Challenger 2 hull 400–660 (530); Leopard 2A6 turret 800–850 (825). Real armour is secret composite, so treat these as a rough guide.
Details › Tank check compares the builder's round with every tank front instantly, using Odermatt's perforation equation. A range slider takes off an assumed 60 m/s per km of flight. The verdict is "gets through", "stopped" or "too close to call" against each estimate range.
Full simulation check: solved. Early full-size runs went too deep: DM53 reached 660 mm against the fit's 502 mm (+31%), and a full-size L/D-10 rod +13%. The cause was not the physics, resolution or rod length: the test blocks were too narrow. A block of radius 4.3 rod diameters has its free outer surface close enough that the steel around the crater is not held in, so the crater widens and the rod goes deeper.
- Wider blocks: at radius ~11 diameters, the L/D-10 rod went 240 mm against a fit of 236 mm (+1.8%), and DM53 went 502 mm against 502 mm (0%).
- Spacing doesn't matter here: 1.15 mm and 1.5 mm gave the same depths.
- Ruled out on the way (each a 30 s DM53 check):
- friction strength for fractured steel: no effect;
- steel 1.5× stronger: −8.5%;
- no heat-softening: +1.7%;
- 30% weaker rod: −0.7%;
- melting: never reached.
The app warns about narrow targets (radius under ~10 rod diameters), and the tank-front stand-in blocks are now 500 mm wide.
Setup view. In Build your own, the view shows the setup before you press Simulate.
- Drag the projectile or any armour layer to move it.
- Q / E (or Ctrl + wheel) rotates the selected item; the projectile flies the way it points. R resets the item.
- The panel has the same controls as numbers (Position: Move, Rotate, Reset).
- Anything moved or rotated makes the run a 2D slice (plane strain).
- "Back to setup" returns from a result to the setup.
Cross-sections. Five turret fronts are library armour items made of several
pieces, each its own polygon and material ("type": "assembly"):
| Item | Layout (approximate, public reconstructions) |
|---|---|
| T-90A turret cheek | Kontakt-5 (two 15 mm plates at 60°, explosive gap), 65 mm outer wall, ~500 mm of "reflecting sheet" packets tilted 55°, 150 mm inner wall |
| T-80U turret cheek | Kontakt-5, cast walls, two 80 mm cellular inserts with 40 mm hollows (polymer cells as aluminium) |
| M1A2 Abrams turret cheek | 60 mm front plate, ~640 mm NERA array tilted 60°, 120 mm back plate (DU layers not modelled) |
| Leopard 2A6 turret cheek | Spaced wedge (two 45 mm hard-steel plates at 60°), 50 mm front plate, NERA array tilted 45°, 100 mm back plate |
| Challenger 2 turret front | Speculative Chobham-type array: steel plates, gaps, alumina tiles, 80 / 120 mm front / back plates |
Sources are forum posts, modders' and game reconstructions, which is the best public
information available. They are generated by tools/gen_tank_sections.py.
Ten cross-sections (tools/gen_tank_sections.py). Turret cheeks are horizontal
cuts, so the cheek's slant shows. Hull fronts are vertical cuts, so the plate slopes show.
Each gets its armour amount from public estimates: steel-equivalent mass along the
shot line = protection estimate ÷ mass efficiency (NERA ~1.3–1.5, Soviet arrays ~1.17;
Tankograd). tools/los.py measures it.
| Section | Angle | Make-up (public reconstructions) | Steel-eq. mass | Estimate vs long rods |
|---|---|---|---|---|
| T-90A turret | 59° | Kontakt-5, 100 mm wall, ~250 mm cavity of reflecting NERA modules (21 mm steel + 6 mm rubber + 3 mm steel, 22 mm gaps), 95 + 45 mm walls | 738 mm | 700–850 mm |
| T-80U turret | 47° | Kontakt-5, 98 mm cast wall, 260 mm insert of alumina cylinders in polyurethane, 190 mm cast wall | 592 mm | 630–860 mm |
| M1A2 SEP turret | 30° | 50 mm front plate, ~500 mm NERA cavity (packets at a further 30°), two DU layers (tungsten stand-in), 120 mm back plate | 624 mm | 770–960 mm |
| Leopard 2A6 turret | 60° wedge, 10° front | spaced wedge (2 × 45 mm hard steel + rubber), 50 mm front plate, ~600 mm NERA cavity at 45°, 60 mm back plate | 586 mm | 800–850 mm |
| Challenger 2 turret | 36° | 60 mm front plate, five steel / rubber / ceramic groups, 120 mm back plate (speculative) | 502 mm | 600–750 mm |
| T-90A hull | 68° | Kontakt-5, steel 60-10-10-20-20-50 with gaps | 502 mm | 550–750 mm |
| T-80U hull | 68° | Kontakt-5, 50 steel / 35 glass textolite / 50 / 35 / 50 | 495 mm | 530–700 mm |
| M1A2 hull (nose) | 50° | 50 mm steel, four NERA sandwiches, 90 mm inner steel | 435 mm | 560–650 mm |
| Leopard 2A6 hull (nose) | 50° | 40 mm hard steel, six NERA packets, 110 mm inner plate | 419 mm | 500–620 mm |
| Challenger 2 hull | 60° | 50 mm plate, three steel / rubber / ceramic groups, 60 mm plate (speculative) | 405 mm | 400–660 mm |
New material: glass textolite (glass_textolite), from Marsh's fibre-glass polyester
(Doron). Its 14 shots fit c0 2.574 km/s, s 1.375, all within 7%.
Rubber (rubber_neoprene). Rubber's shock data (Marsh, LASL 1980, neoprene) only
covers high pressures, and a straight line through it made rubber about 5× too stiff at
low pressure. The bulk modulus came out at 11 GPa against ~2 GPa for real rubber, in
exactly the range that drives NERA bulging. Fixed: the shock line now starts at rubber's
real low-pressure stiffness (c0 1.18 km/s), and its slope (2.4) keeps the measured shots
within ~10%. Tensile strength 25 MPa and 700% elongation come from Fras 2021.
Polyurethane (polyurethane). Marsh's solid polyurethane, with measured sound speeds
of 2.39 / 1.03 km/s.
Brittle tungsten (tungsten_y925). The grade Fras fired: 8% elongation, so its
fracture strains are scaled by 0.4.
NERA against an experiment. Fras (Materials 2021, 14, 3334) fired tungsten rods, 80 × 4 mm at >1500 m/s, at two 4 mm steel plates at 60° with rubber or air between them. Same setup in a 2D slice, 0.25 mm spacing, plates held at the edges, 1–2 min per run, brittle Y925 rod:
| Middle layer | Simulated rod after the sandwich | Measured (Fras) |
|---|---|---|
| 15 mm air | intact: 4.0 kg main piece + a 93 g chip, tilt −1.4° | no bending, no break-up |
| 15 mm rubber | broken: 2.8 kg + 0.8 kg + 0.14 kg, tilt −9.1° | bent and broken |
| 2 × 10 mm rubber | broken: 3.3 kg + 0.57 kg + small pieces, tilt −7.1° | broken into 4 pieces |
| energy lost to the plates | ~11–12%, same with or without rubber | ~5%, same with or without rubber |
A tougher standard-tungsten rod in the 2 × 10 mm case bends (−5.2°) but does not break.
What made the difference: the flying-debris rule (2D slices) used to turn the rod's broken surface into debris. Where the bulging plates gripped the rod, that surface flew off, so the plates could no longer push and bend it (tilt −1.3°, no break-up). Now only the armour erodes into debris. The projectile's broken material stays and transmits the push, except lone crumbs.
At full tank scale (3BM59 at 1650 m/s against the Leopard 2A6 cheek, slices 300 and 500 mm wide, ~3 min each), the rod still perforates, with ~19% of it exiting at about 1050 m/s. Against 586 mm of plain steel (the same mass) 14% exits at 1155 m/s. So in 2D at this scale the NERA array is about as good as plain steel of its mass (~0.95×), while real Burlington-type NERA is credited with ~1.4×. The reason: in a slice the 21 mm rod is an infinitely wide slab, which bends in the picture's plane but cannot yaw out of it or shatter like a round rod. The long-rod "overshoot" was a separate problem, now solved (narrow test blocks; see "Tank rounds against tank fronts").
Use the Tank check for verdicts. The explosive inside ERA is still an empty gap until Stage G.
A piece of armour cut out of a tank has free edges where the real vehicle continues. Left free, it drifts and tumbles after the hit, and its cut edges reflect the impact wave back as tension. That tension cracks material that would not crack on a real tank.
Each armour layer has a Held by the tank box. It is on by default for tank fronts and cross-sections. When on:
- Where it holds. The layer's edges farthest from the shot line get an absorbing layer. Particles there are damped, with a strength that grows smoothly toward the edge (rate up to 4 c / band). Outgoing waves are soaked up instead of reflected; a rigid clamp would reflect them too.
- It follows the shot. The zone is placed from the projectile's position and direction. There is always a free zone of at least 3 projectile diameters + 10 mm around the shot path. Aim too close to an edge and that layer is left free, with a warning. The held bands are hatched in the setup view.
- It lets go of breaking material. A held particle that gets damaged or strongly deformed is released for good.
- The energy is counted. Energy taken out by the mounts appears as "Absorbed by mounts", and the energy balance includes it.
Check: a 5 mm steel ball at 600 m/s into an 80 mm-wide aluminium plate, 2D, 30 µs. The plate's outer parts move at 24 m/s when free and 6 m/s when held. The energy ratio including the absorbed energy is 0.996.
In a 2D slice, broken material in front of the projectile cannot escape sideways as real debris does in 3D. It piled up, got squeezed and burst outward, and spaced armour looked like it was being snowploughed. So in slice runs, fully broken material becomes flying debris:
- It no longer pushes or is pushed. It flies on with its mass, speed and heat, drawn as small faded dots.
- When it runs into solid material, it sticks in a perfectly inelastic collision shared by the solid within 1.5 particle spacings. Its momentum still pushes what it hits; the lost motion becomes heat.
- A solid particle left almost alone among debris (fewer than 2 solid neighbours) is a crumb and becomes debris too.
Check: a tungsten rod (60 × 6 mm slab, 1500 m/s) through three 8 mm steel plates spaced 20 mm apart, 2D slice, 90 µs, 16 s:
| Debris off | Debris on | |
|---|---|---|
| Fastest particle | 3171 m/s | 1690 m/s |
| Highest pressure at the end | 8.4 GPa | 2.0 GPa |
| Rod after the plates | 16 pieces, 1318 m/s | main piece, 1332 m/s |
| Energy ratio | 0.996 | 1.000 |
Not used in round (straight-on) runs. There broken material can flow out radially, and erosion made the validated L/D-10 rod go 8% deeper (P/L 0.94 vs 0.87; experiments 0.85), with energy +0.5%. Details › Solver settings can switch it off for slices too.
The V50 tool finds the speed at which a projectile just perforates a plate, as
experiments do. It fires shots at two speeds that bracket the limit, then halves
the gap. A shot counts as perforated when the projectile has passed the
plate's current back surface (measured just outside the projectile's path, so a
punched-out plug doesn't count) and moves faster than the plate. It also fits the
Recht-Ipson curve v_r = a·sqrt(v² − v_bl²) to the residual velocities.
miataphysim --headless --file scenarios/validation_borvik_blunt.json --v50 170 215 --iterations 3
Benchmark: a flat-nosed hardened steel projectile (20 × 80 mm, 197 g) against a 12 mm Weldox 460 E plate. Measured ballistic limit 184.5 m/s, with failure by shear plugging. Material data: Børvik et al. 2001 (Johnson-Cook strength and fracture for Weldox 460 E); projectile yield 1.9 GPa.
| Spacing (particles across the plate) | V50 (bisection) | Recht-Ipson fit | Experiment |
|---|---|---|---|
| 0.4 mm (30) | 207.8 m/s (+12.6%) | 203.1 m/s (+10.1%) | 184.5 m/s |
| 0.25 mm (48) | 184.1 m/s (−0.2%) | 182.6 m/s (−1.0%) | 184.5 m/s |
At 0.25 mm the shots bracket the limit between 181.2 m/s (stopped) and 186.9 m/s (perforated). The coarse run's 13% error was resolution: the plug is cut out along a narrow shear band, and with too few particles across the plate the band is too wide and the plate too hard to get through. Two resolutions show the trend but don't yet prove convergence; a 0.2 mm check would. The builder warns when a plate has fewer than about 40 particles across it.
-
Depth numbers need a WIDE target: radius at least ~10 projectile diameters. Narrow blocks let rods go 13-30% too deep; the app warns.
-
Tank-scale NERA in a 2D slice is only about as effective as plain steel of the same mass (3BM59 into the Leopard 2A6 cheek vs 586 mm of plain steel: 52 vs 39 kg/m of rod exits, at 1054 vs 1155 m/s). Real Burlington-type NERA is credited with ~1.4× steel. At small scale NERA works (Fras 2021 check), but a slab rod cannot yaw or shatter as a round rod does. Use the Tank check for verdicts.
-
Ceramics are checked for consistency, plus an equal-weight comparison: an alumina face beats aluminium and roughly matches steel. They are not yet checked against a ceramic penetration experiment, so ceramic results are approximate.
-
The explosive inside ERA (Kontakt-5) is not modelled yet; it is an empty gap until Stage G. Tank armour make-up is secret, and all tank cross-sections are public reconstructions and estimates.
-
Spall strengths are checked against published plate-impact ranges (Al 0.8–2.3, Ti-6Al-4V 3.3–4.9, tungsten alloy 1.7–2.6 GPa, copper ~1.3 GPa, steels ~1.6–3.5 GPa), but spall is a fixed threshold plus a minimum duration, not rate-dependent; real spall strength rises with loading rate.
-
A spall scab can stay attached at a plate's rim, where edge release keeps the tension low and ductile copper stretches instead of tearing.
-
Plastic impacts need fine spacing for converged numbers: the Taylor bar is ~17.2 mm at 0.254 mm spacing and 16.75 mm at 0.127 mm.
-
Total energy drops by 1–5% over violent runs. The time integrator always dissipates a little, and contact can only push. It never grows.
-
Frictionless contact.
-
Constant smoothing length (fine for metals; very large expansions need variable h).
-
Replay frames are kept in memory as float32. Big runs record fewer frames to stay within ~1.5 GB (never fewer than 30); the physics is unaffected.
-
2D only. Plane-strain penetration numbers are qualitative. Axisymmetric is exact, but only for 0° impacts.
- J. J. Monaghan, Smoothed particle hydrodynamics, Rep. Prog. Phys. 68 (2005)
- L. D. Libersky, A. G. Petschek et al., High strain Lagrangian hydrodynamics, J. Comput. Phys. 109 (1993)
- P. W. Randles, L. D. Libersky, Smoothed particle hydrodynamics: some recent improvements, CMAME 139 (1996)
- J. P. Gray, J. J. Monaghan, R. P. Swift, SPH elastic dynamics, CMAME 190 (2001)
- G. R. Johnson et al., SPH for high velocity impact computations, CMAME 139 (1996)
- K. L. Johnson, Contact Mechanics, Cambridge (1985) — Hertz impact theory
- J. A. Zukas (ed.), High Velocity Impact Dynamics, Wiley (1990)
- G. R. Johnson, W. H. Cook, A constitutive model and data for metals subjected to large strains, high strain rates and high temperatures, 7th Int. Symp. Ballistics (1983)
- D. J. Steinberg, Equation of state and strength properties of selected materials, LLNL UCRL-MA-106439 (1996)
- G. I. Taylor, The use of flat-ended projectiles for determining dynamic yield stress, Proc. R. Soc. A 194 (1948)
- M. L. Wilkins, Calculation of elastic-plastic flow, Methods Comput. Phys. 3 (1964)
- D. S. Balsara, von Neumann stability analysis of SPH, J. Comput. Phys. 121 (1995)
- A. Colagrossi, M. Landrini, Numerical simulation of interfacial flows by SPH, J. Comput. Phys. 191 (2003)
- G. R. Johnson, W. H. Cook, Fracture characteristics of three metals subjected to various strains, strain rates, temperatures and pressures, Eng. Fract. Mech. 21 (1985)
- G. T. Gray III, P. J. Maudlin, S. R. Chen, The assessment of damage evolution in metals as a function of microstructure using Taylor impact testing, LANL LA-UR-01-5614 (2001)
- T. Børvik, O. S. Hopperstad, T. Berstad, M. Langseth, A computational model of viscoplasticity and ductile damage for impact and penetration, Eur. J. Mech. A/Solids 20 (2001)
- T. Børvik, M. Langseth, O. S. Hopperstad, K. A. Malo, Perforation of 12 mm thick steel plates by 20 mm diameter projectiles with flat, hemispherical and conical noses, Int. J. Impact Eng. 27 (2002)
- A. J. Recht, T. W. Ipson, Ballistic perforation dynamics, J. Appl. Mech. 30 (1963)
- M. M. Carroll, A. C. Holt, Static and dynamic pore-collapse relations for ductile porous materials, J. Appl. Phys. 43 (1972)
- W. Herrmann, Constitutive equation for the dynamic compaction of ductile porous materials, J. Appl. Phys. 40 (1969)
- V. Tvergaard, A. Needleman, Analysis of the cup-cone fracture in a round tensile bar, Acta Metall. 32 (1984)
- F. L. Addessio, J. N. Johnson, P. J. Maudlin, The effect of void growth on Taylor cylinder impact experiments, J. Appl. Phys. 73 (1993)
- G. R. Johnson, T. J. Holmquist, An improved computational constitutive model for brittle materials, High-Pressure Science and Technology, AIP (1994)
- G. R. Johnson, T. J. Holmquist, Response of boron carbide subjected to large strains, high strain rates, and high pressures, J. Appl. Phys. 85 (1999)
- D. S. Cronin, K. Bui, C. Kaufmann et al., Implementation and validation of the Johnson-Holmquist ceramic material model in LS-DYNA, 4th European LS-DYNA Users Conference (2003)
- W. Odermatt, long-rod penetration calculator, longrods.ch (source of the Lanz-Odermatt coefficients used here)
- W. Lanz, W. Odermatt, Penetration limits of conventional large caliber anti tank guns/kinetic energy projectiles, 13th Int. Symp. Ballistics (1992)
MIT, see LICENSE. The bundled third-party libraries (raylib, Dear ImGui, rlImGui, nlohmann/json, doctest) are downloaded at build time under their own licenses.