{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/jax-sph-a-differentiable-smoothed-particle","title":"JAX-SPH: A Differentiable Smoothed Particle Hydrodynamics Framework","arxiv_id":"2403.04750","date":"2024-03-07","proceeding":null,"authors":["Artur P. Toshev","Harish Ramachandran","Jonas A. Erbesdobler","Gianluca Galletti","Johannes Brandstetter","Nikolaus A. Adams"],"abstract":"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.","url_abs":"https://arxiv.org/abs/2403.04750v2","url_pdf":"https://arxiv.org/pdf/2403.04750v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"jax-sph-a-differentiable-smoothed-particle","repo_url":"https://github.com/tumaer/jax-sph","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":null}],"tasks":[{"task_slug":"dataset-generation","task_name":"Dataset Generation"}],"methods":[{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2403.04750","atlas_url":"https://app.syntology.ai/?focus=2403.04750","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.04750"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/tumaer/jax-sph","reach":null}],"summary":{"ran":9,"ran_draft_wrong":13,"ran_fixture":1,"ran_violates":1,"unverified":5},"by_repo_kind":{"official":{"samples":27,"ran":22,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":2,"samples":[{"code_sha256_prefix":"3aecdc94485dd82f","entry":"CubicKernel","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3aecdc94485dd82f"}},{"code_sha256_prefix":"757f694ba9b864a6","entry":"GaussianKernel","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"757f694ba9b864a6"}},{"code_sha256_prefix":"e71299cc5c7c2fb3","entry":"QuinticKernel","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e71299cc5c7c2fb3"}},{"code_sha256_prefix":"67cc9af56d7b9c94","entry":"RIEMANNEoS","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"67cc9af56d7b9c94"}},{"code_sha256_prefix":"59622e5aa0799915","entry":"SuperGaussianKernel","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"59622e5aa0799915"}},{"code_sha256_prefix":"74064dfd85a06d28","entry":"TaitEoS","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"74064dfd85a06d28"}},{"code_sha256_prefix":"e062820f4151fbb6","entry":"WendlandC2Kernel","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e062820f4151fbb6"}},{"code_sha256_prefix":"b70e8d6235713117","entry":"WendlandC4Kernel","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b70e8d6235713117"}},{"code_sha256_prefix":"8a614af301f3e846","entry":"WendlandC6Kernel","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8a614af301f3e846"}},{"code_sha256_prefix":"620e9860205755e7","entry":"acceleration_delta_fn_wrapper","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"620e9860205755e7"}},{"code_sha256_prefix":"65cc2dd70d2ede31","entry":"acceleration_riemann_fn_wrapper","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"65cc2dd70d2ede31"}},{"code_sha256_prefix":"55bcd8c9fb4d8402","entry":"acceleration_standard_fn_wrapper","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"55bcd8c9fb4d8402"}},{"code_sha256_prefix":"cf7b6117b3a800a6","entry":"acceleration_tvf_fn_wrapper","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cf7b6117b3a800a6"}},{"code_sha256_prefix":"e9772fcabc94e37e","entry":"artificial_viscosity_fn_wrapper","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e9772fcabc94e37e"}},{"code_sha256_prefix":"484a4f6373cc90d2","entry":"gwbc_fn_riemann_wrapper","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"484a4f6373cc90d2"}},{"code_sha256_prefix":"540f2c455332e62d","entry":"gwbc_fn_wrapper","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"540f2c455332e62d"}},{"code_sha256_prefix":"3a5977ac868b8646","entry":"limiter_fn_wrapper","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3a5977ac868b8646"}},{"code_sha256_prefix":"b2b87cb713d14139","entry":"rho_evol_fn","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"b2b87cb713d14139"}},{"code_sha256_prefix":"3f463624d5a53697","entry":"rho_evol_fn_delta_wrapper","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"3f463624d5a53697"}},{"code_sha256_prefix":"180f8202e770c1e6","entry":"rho_evol_riemann_fn_wrapper","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"180f8202e770c1e6"}},{"code_sha256_prefix":"036ad2dbcd402efe","entry":"rho_summation_fn","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"036ad2dbcd402efe"}},{"code_sha256_prefix":"e689be2b6dd40cc1","entry":"temperature_derivative_wrapper","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e689be2b6dd40cc1"}},{"code_sha256_prefix":"149e9977a43ee4a3","entry":"tvf_stress_fn","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"149e9977a43ee4a3"}},{"code_sha256_prefix":"fa2c0e8010787179","entry":"wall_phi_vec_wrapper","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fa2c0e8010787179"}},{"code_sha256_prefix":"88214fd6f47afce8","entry":"BaseEoS","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"88214fd6f47afce8"}},{"code_sha256_prefix":"8d8d56b4ecd17d77","entry":"BaseKernel","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8d8d56b4ecd17d77"}},{"code_sha256_prefix":"4c1ced7cf05db770","entry":"Tag","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4c1ced7cf05db770"}},{"code_sha256_prefix":"754be323a56df590","entry":"WCSPH","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"754be323a56df590"}},{"code_sha256_prefix":"0e17333b6adfde84","entry":"rho_renorm_fn","repo":"tumaer/jax-sph","repo_kind":"official","path":"jax_sph/solver.py","file_url":"https://github.com/tumaer/jax-sph/blob/HEAD/jax_sph/solver.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0e17333b6adfde84"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}