Papers › JAX-SPH: A Differentiable Smoothed Particle Hydrodynamics Framework

JAX-SPH: A Differentiable Smoothed Particle Hydrodynamics Framework

7 Mar 2024arXiv:2403.04750archive 2025-07-28

Artur P. Toshev, Harish Ramachandran, Jonas A. Erbesdobler, Gianluca Galletti, Johannes Brandstetter, Nikolaus A. Adams

Particle-based fluid simulations have emerged as a powerful tool for solving the Navier-Stokes equations, especially in cases that include intricate physics and free surfaces. The recent addition of machine learning methods to the toolbox for solving such problems is pushing the boundary of the quality vs. speed tradeoff of such numerical simulations. In this work, we lead the way to Lagrangian fluid simulators compatible with deep learning frameworks, and propose JAX-SPH - a Smoothed Particle Hydrodynamics (SPH) framework implemented in JAX. JAX-SPH builds on the code for dataset generation from the LagrangeBench project (Toshev et al., 2023) and extends this code in multiple ways: (a) integration of further key SPH algorithms, (b) restructuring the code toward a Python package, (c) verification of the gradients through the solver, and (d) demonstration of the utility of the gradients for solving inverse problems as well as a Solver-in-the-Loop application. Our code is available at https://github.com/tumaer/jax-sph.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 29 code samples harvested from 1 repository linked to this paper: 24 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 0 honoured, 1 violated, 9 with no contract checked; 14 where Syntology's instrument failed) · 5 unverified. Where Syntology's instrument failed: 13 where our contract draft was wrong; 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 29 samples from 1 repository, 24 ran (10 with no instrument failure; 14 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

tumaer/jax-sph officialmentioned in papermentioned on GitHubjaxSyntology: 29 samples, 24 ran (14 instrument-failed) · 5 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

29 samples harvested: 24 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 0 honoured, 1 violated, 9 with no contract checked; 14 where Syntology's instrument failed) · 5 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · violated contract
13ran · our draft was wrong
1ran; the contract check could not run
9ran
5unverified

Licence: 2 of the 29 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from tumaer/jax-sph. 2 samples whose link to this paper records no repository are listed under one of this paper's own repositories, because identical code was harvested from it for another paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

tumaer/jax-sph official repository 29 samples, 24 ran (14 instrument-failed) · 5 unverified
CubicKernel jax_sph/solver.py ran · metamorphic tier: invariant MIT (permissive) · 3aecdc94485dd82f · report fixture: signature r:ArrayImpl/1/float · returned ArrayImpl · level recorded 2026-09-22
GaussianKernel in 6 papers jax_sph/solver.py ran · metamorphic tier: invariant fingerprinted MIT (permissive) · 757f694ba9b864a6 · report fixture: signature r:ArrayImpl/1/float · returned ArrayImpl · level recorded 2026-09-22
QuinticKernel jax_sph/solver.py ran · metamorphic tier: invariant MIT (permissive) · e71299cc5c7c2fb3 · report fixture: signature r:ArrayImpl/1/float · returned ArrayImpl · level recorded 2026-09-22
RIEMANNEoS jax_sph/solver.py ran · metamorphic tier: well formed fingerprinted MIT (permissive) · 67cc9af56d7b9c94 · report fixture: signature rho:float/0/float · returned float · level recorded 2026-09-22
SuperGaussianKernel jax_sph/solver.py ran · metamorphic tier: invariant fingerprinted MIT (permissive) · 59622e5aa0799915 · report fixture: signature r:ArrayImpl/1/float · returned ArrayImpl · level recorded 2026-09-22
TaitEoS jax_sph/solver.py ran · metamorphic tier: well formed fingerprinted MIT (permissive) · 74064dfd85a06d28 · report fixture: signature rho:float/0/float · returned float · level recorded 2026-09-22
WendlandC2Kernel jax_sph/solver.py ran · metamorphic tier: invariant MIT (permissive) · e062820f4151fbb6 · report fixture: signature r:ArrayImpl/0/float · returned ArrayImpl · level recorded 2026-09-22
WendlandC4Kernel jax_sph/solver.py ran · metamorphic tier: invariant MIT (permissive) · b70e8d6235713117 · report fixture: signature r:ArrayImpl/0/float · returned ArrayImpl · level recorded 2026-09-22
WendlandC6Kernel jax_sph/solver.py ran · metamorphic tier: invariant MIT (permissive) · 8a614af301f3e846 · report fixture: signature r:ArrayImpl/0/float · returned ArrayImpl · level recorded 2026-09-22
acceleration_delta_fn_wrapper jax_sph/solver.py ran · our draft was wrong MIT (permissive) · 620e9860205755e7 · report fixture: signature kernel_fn:MinimalKernel/0/?, alpha:float/0/float, support:float/0/float, c_ref:float/0/float, rho_ref:float/0/float · returned function · level recorded 2026-09-22
acceleration_riemann_fn_wrapper jax_sph/solver.py ran · our draft was wrong MIT (permissive) · 65cc2dd70d2ede31 · report fixture: signature kernel_fn:MockKernel/0/?, eos:MockEOS/0/?, beta_fn:callable/0/?, eta_limiter:float/0/float · returned function · level recorded 2026-09-22
acceleration_standard_fn_wrapper jax_sph/solver.py ran · our draft was wrong MIT (permissive) · 55bcd8c9fb4d8402 · report fixture: signature kernel_fn:MockKernel/0/? · returned function · level recorded 2026-09-22
acceleration_tvf_fn_wrapper jax_sph/solver.py ran · our draft was wrong MIT (permissive) · cf7b6117b3a800a6 · report fixture: signature kernel_fn:MockKernel/0/? · returned function · level recorded 2026-09-22
artificial_viscosity_fn_wrapper jax_sph/solver.py ran · our draft was wrong MIT (permissive) · e9772fcabc94e37e · report fixture: signature dx:float/0/float, artificial_alpha:float/0/float, u_ref:float/0/float · returned function · level recorded 2026-09-22
gwbc_fn_riemann_wrapper jax_sph/solver.py ran · our draft was wrong fingerprinted MIT (permissive) · 484a4f6373cc90d2 · report fixture: signature is_free_slip:bool/0/bool, is_heat_conduction:bool/0/bool · returned tuple · level recorded 2026-09-22
gwbc_fn_wrapper jax_sph/solver.py ran · our draft was wrong MIT (permissive) · 540f2c455332e62d · report fixture: signature is_free_slip:bool/0/bool, is_heat_conduction:bool/0/bool, eos:MockEOS/0/? · returned function · level recorded 2026-09-22
limiter_fn_wrapper jax_sph/solver.py ran · our draft was wrong MIT (permissive) · 3a5977ac868b8646 · report fixture: signature eta_limiter:float/0/float, c_ref:float/0/float · returned function · level recorded 2026-09-22
rho_evol_fn jax_sph/solver.py identical code Syntology harvested from this repository for another paper; this paper's link records no repository, path or licence of its own ran; the contract check could not run (RAISES) · metamorphic tier: invariant licence of this copy not recorded · b2b87cb713d14139 · report fixture: signature rho:ArrayImpl/1/float, mass:ArrayImpl/1/float, u:ArrayImpl/2/float, grad_w_dist:ArrayImpl/2/float, i_s:ArrayImpl/1/int, j_s:ArrayImpl/1/int, dt:float/0/float, N:int/0/int · returned tuple · level recorded 2026-09-22
rho_evol_fn_delta_wrapper jax_sph/solver.py identical code Syntology harvested from this repository for another paper; this paper's link records no repository, path or licence of its own ran · our draft was wrong licence of this copy not recorded · 3f463624d5a53697 · report fixture: signature delta:float/0/float, support:float/0/float, c_ref:float/0/float, kernel_fn:KernelFn/0/? · returned function · level recorded 2026-09-22
rho_evol_riemann_fn_wrapper jax_sph/solver.py ran · our draft was wrong MIT (permissive) · 180f8202e770c1e6 · report fixture: signature kernel_fn:MockKernelFn/0/?, eos:MockEOS/0/?, c_ref:ArrayImpl/0/float · returned function · level recorded 2026-09-22
rho_summation_fn jax_sph/solver.py ran · our draft was wrong MIT (permissive) · 036ad2dbcd402efe · report fixture: signature mass:ArrayImpl/1/float, i_s:ArrayImpl/1/int, w_dist:ArrayImpl/1/float, N:int/0/int · returned ArrayImpl · level recorded 2026-09-22
temperature_derivative_wrapper jax_sph/solver.py ran · our draft was wrong MIT (permissive) · e689be2b6dd40cc1 · report fixture: signature kernel_fn:MockKernel/0/? · returned function · level recorded 2026-09-22
tvf_stress_fn jax_sph/solver.py ran · violated contract fingerprinted MIT (permissive) · 149e9977a43ee4a3 · report fixture: signature rho:float/0/float, u:ArrayImpl/1/float, v:ArrayImpl/1/float · returned ArrayImpl · level recorded 2026-09-22
wall_phi_vec_wrapper jax_sph/solver.py ran · our draft was wrong MIT (permissive) · fa2c0e8010787179 · report fixture: signature kernel_fn:MockKernelFn/0/? · returned function · level recorded 2026-09-22
BaseEoS jax_sph/solver.py unverified MIT (permissive) · 88214fd6f47afce8 · report
BaseKernel jax_sph/solver.py unverified MIT (permissive) · 8d8d56b4ecd17d77 · report
Tag jax_sph/solver.py unverified MIT (permissive) · 4c1ced7cf05db770 · report
WCSPH jax_sph/solver.py unverified MIT (permissive) · 754be323a56df590 · report
rho_renorm_fn jax_sph/solver.py unverified MIT (permissive) · 0e17333b6adfde84 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for JAX-SPH (graph method: JAX-SPH). 29 bricks; individually on a fixture: 24 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 0 honoured, 1 violated, 9 with no contract checked; 14 where Syntology's instrument failed) · 5 unverified. The assembly has not been run end-to-end.

  1. WCSPH entry · level 0 · unverified · 754be323a56df590
  2. CubicKernel helper · level 1 · ran · 3aecdc94485dd82f
  3. GaussianKernel helper · level 1 · ran · 757f694ba9b864a6
  4. QuinticKernel helper · level 1 · ran · e71299cc5c7c2fb3
  5. RIEMANNEoS helper · level 1 · ran · 67cc9af56d7b9c94
  6. SuperGaussianKernel helper · level 1 · ran · 59622e5aa0799915
  7. Tag helper · level 0 · unverified · 4c1ced7cf05db770
  8. TaitEoS helper · level 1 · ran · 74064dfd85a06d28
  9. WendlandC2Kernel helper · level 1 · ran · e062820f4151fbb6
  10. WendlandC4Kernel helper · level 1 · ran · b70e8d6235713117
  11. WendlandC6Kernel helper · level 1 · ran · 8a614af301f3e846
  12. acceleration_delta_fn_wrapper model · level 1 · ran · our draft was wrong · 620e9860205755e7
  13. acceleration_riemann_fn_wrapper model · level 1 · ran · our draft was wrong · 65cc2dd70d2ede31
  14. acceleration_standard_fn_wrapper model · level 1 · ran · our draft was wrong · 55bcd8c9fb4d8402
  15. acceleration_tvf_fn_wrapper model · level 1 · ran · our draft was wrong · cf7b6117b3a800a6
  16. artificial_viscosity_fn_wrapper model · level 1 · ran · our draft was wrong · e9772fcabc94e37e
  17. gwbc_fn_riemann_wrapper model · level 1 · ran · our draft was wrong · 484a4f6373cc90d2
  18. gwbc_fn_wrapper model · level 1 · ran · our draft was wrong · 540f2c455332e62d
  19. limiter_fn_wrapper model · level 1 · ran · our draft was wrong · 3a5977ac868b8646
  20. rho_evol_fn model · level 1 · ran; the contract check could not run (RAISES) · b2b87cb713d14139
  21. rho_evol_fn_delta_wrapper model · level 1 · ran · our draft was wrong · 3f463624d5a53697
  22. rho_evol_riemann_fn_wrapper model · level 1 · ran · our draft was wrong · 180f8202e770c1e6
  23. rho_renorm_fn model · level 0 · unverified · 0e17333b6adfde84
  24. rho_summation_fn model · level 1 · ran · our draft was wrong · 036ad2dbcd402efe
  25. temperature_derivative_wrapper model · level 1 · ran · our draft was wrong · e689be2b6dd40cc1
  26. wall_phi_vec_wrapper model · level 1 · ran · our draft was wrong · fa2c0e8010787179
  27. BaseKernel helper · level 0 · unverified · 8d8d56b4ecd17d77
  28. BaseEoS helper · level 0 · unverified · 88214fd6f47afce8
  29. tvf_stress_fn model · level 1 · ran · violated contract · 149e9977a43ee4a3

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2403.04750") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Dataset Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

SPEED

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections