# Reading the caprock from orbit — three Tesseracts (Julia + JAX + C++) into one \`jax.grad\`

**URL:** <https://si-tesseract.discourse.group/t/reading-the-caprock-from-orbit-three-tesseracts-julia-jax-c-into-one-jax-grad/155>\
**Category:** Showcase\
**Created:** [August 28, 2026, 6:04am UTC](https://si-tesseract.discourse.group/t/reading-the-caprock-from-orbit-three-tesseracts-julia-jax-c-into-one-jax-grad/155 "2026-08-28T06:04:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saademad](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@saademad](https://si-tesseract.discourse.group/u/saademad)\
**Post date:** [August 28, 2026, 6:04am UTC](https://si-tesseract.discourse.group/t/reading-the-caprock-from-orbit-three-tesseracts-julia-jax-c-into-one-jax-grad/155/1 "2026-08-28T06:04:43Z")

</div>

**Track 02, multi-physics and coupled systems.**

At the In Salah CO2 storage site in Algeria, injection was suspended in June 2011 after about 3.8 Mt, because monitoring suggested pressure had reached the base of the caprock and nobody could prove the seal had held. Reading that surface signal back into what is happening at the seal needs flow and geomechanics together, and those two physics normally live in different codes that do not share a gradient. That gap is what I built across.

**What I composed**

Three Tesseracts into one end-to-end differentiable pipeline, passing vector-Jacobian products across the container boundaries, without rewriting any of them:

- _ **flow** _ — Julia, JutulDarcy multiphase flow, hand-written discrete adjoint
- _ **poroelastic** _ — Python, JAX, automatic differentiation
- _ **insar** _ — C++, line-of-sight projection, central finite differences

_ **jax.grad** _ runs straight through all three, across three languages and three derivative strategies. I used the composed gradient to invert a satellite-realistic surface signal for subsurface permeability and mechanical stiffness.

 ![fig1_same_data_opposite_conclusion](https://canada1.discourse-cdn.com/flex009/uploads/si_tesseract/original/1X/45d534535a58ed51b1932732ac77816a30febc67.png)

**Why Tesseract is load-bearing here**

The third Tesseract changes the headline conclusion, it is not set dressing. A 30% error in the mechanical prior is an 8.6-sigma scream on vertical uplift, but run through the full stack so the observable is line-of-sight displacement after filtering and referencing, and the same error shows up at 2.6 sigma, under a conventional 3-sigma alarm, while the permeability it recovers are 23 times the truth. Remove any stage and the result differs.

**Two more results the gradient made reachable:**

- A mechanical prior wrong by 15% stays under the 3-sigma alarm while the predicted caprock overpressure is already 17% off. The damage saturates before the warning arrives.

- Surface uplift cannot separate Biot’s coefficient, Young’s modulus and Poisson’s ratio.

 ![dash_danger](https://canada1.discourse-cdn.com/flex009/uploads/si_tesseract/original/1X/1b8dad7df8bee0d700c04150b22c8498e1d515b8.jpeg)

**Engineering (the part this community may care about most)**

- Two Tesseract SDK patches, each with a regression test: _ **writable\_paths** _ (state written by the final build-time _ **check** _, which runs as uid 9999, is unwritable at runtime because the SDK serves as the host uid), and `startup_timeout` (the health-check’s hardcoded 30s is unreachable from _**serve()**_/_**from\_image()**_, so a Julia runtime that needs ~15s to init is unservable, with an error that names neither Julia nor permissions).

- A confirmed, previously unreported JutulDarcy bug: _**setup\_reservoir\_model(…, :co2brine; temperature=)**_ cannot be simulated on v0.3.9. Minimal reproducer in the repo.

- _ **FDCheck.jl** _, a step-swept finite-difference verifier that refuses to report a number when no plateau exists, because a single-step check produced three separate confident wrong conclusions in this project.

- A provenance guard that makes “no beautiful lies” a CI test: every number in every figure, film caption and dashboard readout is loaded from a committed _ **results/** _ file, and the build fails if a result-shaped number is hand-typed into a caption.

**Reproducibility and honesty**

Everything is a synthetic twin. No real interferogram enters the pipeline, because open InSAR for a CO2 site with a measurable signal does not exist, and the repo says so up front. _ **make figures** _ and _ **make demo** _ rebuild the figures and the film from committed `results/` with no solver. The claims I had to retract along the way are kept in the repo, not deleted.

**Repo (code, writeup, reproduction):** [Github Repo Link](https://github.com/saademad200/tesseract-caprock)

**Film (about 3:50):** [Demo Video Link](https://drive.google.com/file/d/1_bptWk9-z_3wxDYluLwy0E2kFMndQNIU/view?usp=sharing)

Happy to answer questions about the cross-language gradient plumbing or the two SDK patches.

**Built on Tesseract, from Pasteur Labs and ISI.**

---

<div class="post-metadata">

**Author:** ![samali](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@samali](https://si-tesseract.discourse.group/u/samali)\
**Post date:** [August 28, 2026, 2:53pm UTC](https://si-tesseract.discourse.group/t/reading-the-caprock-from-orbit-three-tesseracts-julia-jax-c-into-one-jax-grad/155/2 "2026-08-28T14:53:28Z")

</div>

Hey @saademad, welcome and thanks a lot for sharing your work with the community! If you built this project for the hackathon, be sure to complete the [official submission form](https://tally.so/r/KYNZMg) before the deadline.

[This post](https://si-tesseract.discourse.group/t/2026-hackathon-helpful-info-for-the-final-week/154#p-251-ready-to-submit-your-work-2) from earlier in the week has some helpful information on the hackathon submission process as well.
