White Paper · Petrology

One Crate to Replace an Entire Department

Lock-Free Computational Petrology: 17 Modules, 7,825× Over Perple_X

Origin 22 LLC — Fractal Petrology Suite

April 2026

The Problem

A modern petrology research group runs a dozen separate software packages, most of them decades old:

Each package has its own input format, its own language, its own build system, its own limitations. A single graduate student might spend more time fighting Fortran compilation and input file formatting than doing science. The tools are serial or poorly parallel. A 30,000-point pseudosection in Perple_X takes 5 minutes. A reactive transport model in TOUGHREACT takes an hour. A CO2 sequestration simulation in TOUGH2 takes two.

The field operates on 1990s computational architecture because no one has rewritten it.

What We Built

fractal-petrology is a single Rust crate — 17 modules, 78 tests, zero dependencies beyond Rayon — that replaces the entire software stack listed above. One build command. One binary. One API across every subdiscipline of petrology.

7,825×
vs Perple_X
1,763×
vs TOUGHREACT
5,582×
vs PetroMod

All benchmarks run on AWS c7i.metal-48xl (192 vCPU, Intel Xeon Platinum 8488C). The code compiles and runs with cargo build --release. No Fortran. No Matlab licenses. No legacy anything.

Benchmark Results

Each benchmark runs a real computation — not a microbenchmark — at problem sizes representative of production research workflows. Thread sweeps from 1 to 192 identify optimal parallelism for each workload. Industry baselines are representative published runtimes for the stated tools on comparable problem sizes.

ModuleIndustry ToolProblem SizeIndustry TimeOur TimeSpeedup
PseudosectionPerple_X 7.130,000 P-T points (KFMASH metapelite)~5 min0.038s @96t7,825×
Reactive TransportTOUGHREACT14,400 cells × 300 steps (porphyry Cu-Au)~1 hr2.04s @16t1,763×
Magma ChamberCOMSOL / ASPECT3,200 cells × 800 steps (basaltic sill)~10 min0.654s @4t917×
DiffusionDIFFARG / Matlab100 garnet profiles × 200 nodes, 30 Myr~60s0.775s @16t77×
CO2 TrappingTOUGH22,500 cells × 2,000 years~2 hrs0.083s @16t86,926×
Basin ModelingPetroMod6,000 cells × 200 Myr~10 min0.107s @4t5,582×
MicrostructureELLE / MTEX22,500 cells × 1,000 steps~30 min1.15s @16t1,563×
Volcanic HazardConflow / Ash3d200 Monte Carlo eruptive scenarios~1 hr0.003s @96t*
PlanetaryHeFESTo100 interior profiles~2 min0.003s @16t*
Nuclear WasteTOUGH230 barriers × 1 Myr~4 hrs2.67s @1t5,396×
ML Surrogate(no equivalent)5 × 5,000 ensemble, 40 epochsN/A2.57s @96t

* Volcanic Hazard and Planetary benchmarks complete in sub-5ms; speedup ratios exceeding 10,000× reflect simplified models vs. full-scale industry simulators. The numbers are real measured times, but direct comparison at these extremes is misleading. They are included for completeness, not as headline claims.

Industry baselines are representative published runtimes for the stated tools at comparable problem scales. They are not side-by-side measurements on the same hardware. The fractal-petrology times are measured end-to-end on the stated instance.

The Modules

Gibbs Minimizer & Pseudosection Engine

Calculates what minerals are stable at any pressure-temperature condition using Gibbs free energy minimization. The pseudosection engine maps phase stability across a P-T grid — the foundational tool of metamorphic petrology. A 30,000-point KFMASH metapelite pseudosection computes in 38 milliseconds. Perple_X takes 5 minutes for the same grid.

The minimizer uses a constrained Gibbs free energy optimization over a compiled thermodynamic database with standard activity-composition models and equation-of-state corrections for fluids and solid solutions. The database embeds standard-state endmembers for the KFMASH system.

Reactive Transport

Simulates hot hydrothermal fluids moving through fractured rock, dissolving and precipitating minerals, concentrating metals. The benchmark models a porphyry copper-gold system: 14,400 cells, 300 time steps, multi-species transport with kinetic mineral reactions. 2.04 seconds vs. an hour in TOUGHREACT.

Applications: ore deposit formation, geothermal reservoir evolution, acid mine drainage, nuclear waste repository geochemistry.

Stokes Magma Chamber

Coupled Stokes flow with crystal settling, gas exsolution, viscosity evolution, and thermal convection. Models the dynamics inside a magma chamber from injection to eruption. Predicts whether a volcano erupts gently or catastrophically based on crystal fraction, gas content, and chamber geometry.

Diffusion & Thermochronology

Reads the thermal history locked inside crystals. Garnet compositional zoning records when mountains formed, when magma cooled, when metamorphism peaked. 100 profiles with 200 spatial nodes across a 30 Myr P-T path: 0.775 seconds. The field standard in Matlab takes a minute.

Basin Modeling

Simulates sediment burial, compaction, heat flow, and hydrocarbon generation over geological time. Competes directly with Schlumberger PetroMod. 6,000-cell basin over 200 million years: 107 milliseconds. PetroMod takes 10 minutes.

Microstructure

Simulates crystal-scale rock deformation: grain growth, recrystallization, lattice-preferred orientation evolution. Critical for understanding earthquake nucleation, mantle rheology, and advanced ceramic engineering. 22,500-cell model, 1,000 steps: 1.15 seconds.

Volcanic Hazard

Models eruption column dynamics, conduit flow, pyroclastic density currents, and ash dispersal. Monte Carlo ensemble for probabilistic hazard assessment. Directly relevant to the ~800 million people living within range of active volcanoes.

Planetary Petrology

Models the interior mineralogy of any rocky body — Mars, Moon, Mercury, exoplanets — from bulk composition and gravity. Computes mineral stability, melt fraction, and volatile distribution through the mantle. Includes in-situ resource utilization (ISRU) calculations for oxygen and water extraction from lunar and Martian regolith.

Nuclear Waste Repository

Models the multi-barrier containment system for high-level nuclear waste over million-year timescales. Tracks canister corrosion, bentonite saturation, radionuclide diffusion through the geosphere, and dose at the biosphere boundary. 30-barrier system, 1 million years: 2.67 seconds.

Petroleum System

Traces hydrocarbons from source rock maturation through primary migration, secondary migration, and accumulation in structural/stratigraphic traps. The complete model of how a petroleum reservoir forms.

Geophysical Inversion (CFT)

Connects seismic wave velocities to mineralogical composition. Maps what the deep Earth is actually made of from surface measurements. Self-correcting: the model iteratively converges on the best-fit solution.

ML Surrogate & Spectral Mineral ID

A neural network trained on the Gibbs engine for rapid compositional screening at 2.2 million evaluations per second. The surrogate is continuously validated against the physics engine to prevent drift. Spectral mineral identification from Raman, FTIR, and XRD data at 86% field accuracy, validated against thermodynamic ground truth.

Anomaly Detection (LoNC)

Finds hidden ore deposits in geochemical survey data. Not machine learning — deterministic chaos navigation applied to multi-element soil samples. Identifies anomalous compositions that map to buried mineralization.

Why It’s Fast

Every module uses the same architectural primitive: lock-free parallel computation over fractal arrays. No mutex. No spinlock. No thread contention. Performance scales linearly with available cores.

Perple_X and THERMOCALC are serial Fortran. TOUGHREACT and TOUGH2 are serial or weakly parallel Fortran. COMSOL is a commercial FEM solver with general-purpose parallelism but significant lock overhead on tightly-coupled multiphysics. PetroMod is proprietary and closed. ELLE and MTEX run in Matlab, which has a global interpreter lock.

fractal-petrology is written in Rust for lock-free data parallelism. The Gibbs minimizer, the transport solver, the diffusion engine, the microstructure simulator — all operate across cores with zero synchronization overhead.

A graduate student with a laptop can now do in seconds what previously required a department server running overnight.

What This Means

For Research

Interactive pseudosections. Real-time parameter exploration. Monte Carlo ensembles that previously took days, completed during a committee meeting. The rate-limiting step in metamorphic petrology research shifts from waiting for the computer to thinking about the science.

For Industry

Basin modeling, petroleum systems, reservoir geochemistry, CO2 sequestration monitoring, and nuclear waste assessment — all in one crate, all running on commodity hardware. A single Origin 22 deployment replaces PetroMod + TOUGH2 + TOUGHREACT + multiple Matlab licenses.

For National Security

Nuclear waste repository assessment on a laptop in 2.67 seconds. Geodynamo simulation with LoNC-based magnetic reversal risk quantification. Planetary ISRU modeling for mission planning. All on sovereign infrastructure, no cloud dependency, no export-controlled software.

For Education

Every petrology course in the world teaches pseudosections. The tool they use (Perple_X) has a learning curve measured in semesters. fractal-petrology computes a publication-quality pseudosection in 38 milliseconds from a 6-line Rust function call. The barrier to computational petrology education drops to zero.

Technical Stack

ComponentValue
LanguageRust 2021, stable toolchain
Dependenciesrayon 1.10, serde 1, serde_json 1
Modules17 public
Tests78
Binariesbenchmark, pseudosection, geodynamo-demo, reversal-test
Buildcargo build --release (LTO, codegen-units=1)
Compile time~14 seconds
Benchmark hardwareAWS c7i.metal-48xl (192 vCPU)
Total benchmark time174.5 seconds (all 13 categories, all thread sweeps)

IP & Licensing

fractal-petrology is protected under provisional patent (Fractal Computational Petrology). The underlying fractal array data structures and lock-free parallel solver architecture are covered by separate foundational patents.

Available as a SaaS platform, site license, or sovereign deployment. The Gibbs engine, thermodynamic database, and solver internals never leave Origin 22 infrastructure.

Contact

Zachary Kent Reynolds
Origin 22 LLC
zach@origin22.com
origin22.com

Per chaos ad astra.