Trixi.jl turns a conservation law into an adaptive high order simulation
Trixi.jl: Adaptive high-order numerical simulations of conservation laws in Julia
At a glance
- What is it?
- Trixi.jl is a Julia framework for high order discontinuous Galerkin simulations of conservation laws, built around adaptive mesh refinement and a large catalogue of equations and limiters. It suits students and research code that needs a solver now, and it stops short of being a turnkey production package for anyone who wants a fixed answer from a fixed mesh.
- Who is it for?
- Trixi.jl is a good fit for a numerical analyst or a graduate student who needs a validated high order solver for hyperbolic conservation laws and wants to stay inside the Julia ecosystem for time integration, differentiation and plotting. It is the wrong choice for a production pipeline that demands reproducible meshes, a documented grid convergence procedure and a stable API, because the project is still on a 0.17 version line with releases arriving every few days.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 3 days ago.
- What is it written in?
- Mainly Julia, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 20, 2026, and from our analysis. They are not legal advice.
Editorial analysis
A research solver for conservation laws rather than a general PDE package
Trixi.jl sits in the numerical analysis world, not in the general purpose scientific computing world. It is a framework for conservation laws written in Julia, and the README makes the audience explicit: a key objective is to be useful to both scientists and students, so the design has to be extensible and fast while staying approachable for someone who has never run a spectral method. The equation catalogue shows the scope. Compressible Euler, compressible Navier Stokes, magnetohydrodynamics, multi component and multi ion variants, linearized Euler and acoustic perturbation equations, hyperbolic diffusion for elliptic problems, Lattice-Boltzmann in D2Q9 and D3Q27, shallow water through the companion package TrixiShallowWater.jl, and a set of scalar conservation laws including linear advection, Burgers equation and LWR traffic flow. There is also a multi physics entry for self-gravitating gas dynamics, with a separate example directory in the repository for it. The point for a newcomer is that the framework arrives with the physics already coded, so you are choosing a semidiscretization and a limit rather than writing the flux difference and boundary treatment from a paper.
Discontinuous Galerkin, quadtree refinement and the SBP family
The numerical machinery is where the framework earns its keep. The primary spatial method is the discontinuous Galerkin approach, with flux differencing variants that preserve kinetic energy or entropy, plus entropy-stable shock capturing as an option for problems with strong shocks. A second family comes from finite difference summation by parts operators, and the repository carries separate example directories for the structured, unstructured and tree based versions of it, including tree_1d_fdsbp, unstructured_2d_fdsbp and tree_3d_fdsbp. On the mesh side, simulations run in 1D, 2D and 3D on line, quad, hex and simplex meshes, Cartesian or curvilinear, conforming or non-conforming, structured or unstructured, with a hierarchical quadtree or octree grid and adaptive mesh refinement. For large 2D and 3D forest simulations the framework uses p4est through the P4est.jl package, and the examples directory shows dedicated p4est_2d_dgsem, p4est_3d_dgsem and p4est_2d_blockfv cases alongside the t8code equivalents. Limiting is treated as a first class concern: positivity preserving limits, subcell invariant domain preserving limiting and entropy bounded limiting are all offered, and the choice matters more to a shock problem than most other settings you will pick.
Time integration borrowed from the SciML ecosystem
Trixi.jl does not own its time stepper. It is compatible with the SciML ecosystem for ordinary differential equations, and the README names the pieces it uses: explicit low-storage Runge-Kutta integration, strong stability preserving methods for hyperbolic problems, and both CFL based and error based time step control. The package also supports custom explicit time integration schemes, including maximised linear stability through paired explicit Runge-Kutta methods and relaxation Runge-Kutta for entropy-conservative integration. Time integration lives in OrdinaryDiffEq.jl and its sub-packages rather than in Trixi.jl itself, which is the central architectural decision of the project. The practical consequence is that the solver inherits the SciML solver catalogue and its step control heuristics, and that a user who already knows that ecosystem is immediately productive. The trade is that the boundary between the two is a documented interface rather than a single package, and the solver configuration now spans two projects, which is a consideration when you need to reproduce a run months later.
Forward mode differentiation and Jacobian sparsity detection
Native support for differentiable programming is a claim worth checking carefully, because it is what turns a solver into something you can optimise or invert. The README lists forward mode automatic differentiation through ForwardDiff.jl and automatic Jacobian sparsity detection through SparseConnectivityTracer.jl. Arbitrary floating point precision is also listed as a feature, alongside high order accuracy in space and time, which is unusual in a production code base and points at a research pedigree. The scientific audience is the reason the two differentiation hooks exist: gradient based optimisation of a numerical solution, or the Jacobian information needed by an implicit or Newton type scheme, are only useful if the solver exposes them. The README does not document which problem types are supported for differentiation, whether gradients through the AMR tree are handled, or how the adjoint behaves at mesh refinement events, so anyone planning to differentiate a simulation should confirm the scope in the stable documentation before designing around it.
Getting Trixi.jl and its visualisation tools installed
The install path is the Julia package manager. Trixi.jl works with Julia v1.10 and newer, and the README recommends the latest stable release of Julia. The framework, the VTK converter and the two time integration sub-packages are all registered packages, so one REPL call covers the set.
julia> using Pkg
julia> Pkg.add(["Trixi", "Trixi2Vtk", "OrdinaryDiffEqLowStorageRK",
"OrdinaryDiffEqSSPRK", "Plots"])The README notes that you can paste the commands into the REPL including the leading julia> prompts, since they are stripped automatically. A first real use means loading a solution file that ships with the package and stepping it, then postprocessing it. The repository contains an examples directory with one case per semidiscretization, including dgmulti_1d, dgmulti_2d, dgmulti_3d, structured_1d_dgsem, structured_2d_dgsem, structured_3d_dgsem, unstructured_2d_dgsem, tree_1d_dgsem, tree_2d_dgsem, tree_3d_dgsem and the special_elixirs case, and each example directory is a working script you can copy and modify. The same directory also holds the p4est and t8code forest cases, so the cheapest way to learn the API is to open the example closest to your problem and change it rather than starting from an empty file.
Postprocessing paths: Plots, Makie and the VTK export
Three visualisation routes are named, and they cover different phases of a study. In-situ and a posteriori visualisation with Plots.jl means you can look at a solution from the REPL while it runs, which is the fast loop for debugging a scheme. Interactive visualisation with Makie.jl covers the interactive exploration case. Postprocessing with ParaView or VisIt goes through the separate Trixi2Vtk package, which is the route for large three dimensional runs where the data is too big to pull into a Julia session and belongs in a dedicated visualiser. This split has a practical rule attached: the REPL is for the small and the quick, the VTK export is for the large and the eventual figures. The repository also contains a benchmark directory, which tells you that performance measurement is part of the project rather than an afterthought, and there is a separate documentation site published under trixi-framework.org with stable and dev builds, plus a Zenodo DOI for citation and a CHANGELOG driven NEWS.md.
Where the framework stops being the right tool
Trixi.jl is built for hyperbolic conservation laws with shocks, and several of its strengths are liabilities elsewhere. There is no elliptic solver in the catalogue beyond hyperbolic diffusion formulations, so a purely diffusive steady state problem is out of scope. Arbitrary precision and high order accuracy come at a cost that the examples directory hints at: the mesh is adaptive, the limiters are chosen by the user, and the time step control lives in another package, so the number of settings between a run and a reproducible result is large. The README does not document a convergence study helper or a canonical grid refinement procedure, which means validating a result against an exact solution is your job. There is also a packaging reality worth stating plainly: the project is on a 0.17 version line, with v0.17.16 on 2026-10-17, v0.17.15 on 2026-10-14 and v0.17.14 on 2026-10-09, and the last push was on 2026-10-20. Releases arrive every few days, which is normal for a research framework and awkward for a production dependency where an API can move under you between two builds of the same minor version. Anyone shipping code that depends on Trixi.jl should pin exact versions and read the NEWS.md file before each upgrade. The licence is MIT, so there are no copyleft obligations on your own code, though the terms still deserve a normal legal review before you commit a release schedule to it.
How Trixi.jl compares to writing the scheme yourself
The alternative is to implement the scheme directly: write the flux differencing operators, the limiter, the boundary treatment and the time stepper yourself, in Julia or in Fortran or C, and accept that debugging a discontinuous Galerkin code takes weeks. Trixi.jl removes that work and replaces it with a different problem, which is choosing correctly among many provided options and validating the result yourself. A second alternative is to use a general purpose PDE solver that treats the problem as a black box and gives you a mesh and a time step rather than a scheme. That route is easier to start and far less flexible: you choose the discretisation implicitly and lose access to the limiter, the entropy stability properties and the fine control over the AMR tree that a conservation law study usually needs. The distinctive choice in Trixi.jl is that it is not a single solver but a family of them sharing a common interface, so the switching between semidiscretisations that a research paper requires is cheap. The price of that breadth is that the API surface is large and the documentation has to be read before a first useful run, which is the trade the README is explicit about when it puts ease of use for new users next to extensibility for scientists.
Editorial conclusion
Trixi.jl is a good fit for a numerical analyst or a graduate student who needs a validated high order solver for hyperbolic conservation laws and wants to stay inside the Julia ecosystem for time integration, differentiation and plotting. It is the wrong choice for a production pipeline that demands reproducible meshes, a documented grid convergence procedure and a stable API, because the project is still on a 0.17 version line with releases arriving every few days. Before you build on it, read the stable documentation linked from the repository homepage for your specific equation and semidiscretization, and check the examples directory for a setup that already matches your geometry, since the tree shows separate implementations for structured, unstructured, quadtree, octree and p4est forests, and picking the wrong one costs more than any tuning afterwards.
Frequently asked questions
What is Trixi.jl used for?
Trixi.jl is a numerical simulation framework for conservation laws in Julia, aimed at scientists and students. It provides high order discontinuous Galerkin and summation by parts semidiscretizations with adaptive mesh refinement, limiters and a catalogue of equations from compressible Euler to Lattice-Boltzmann.
How do I install Trixi.jl in Julia?
Use the Julia package manager from the REPL with Pkg.add for Trixi, and add Trixi2Vtk, OrdinaryDiffEqLowStorageRK, OrdinaryDiffEqSSPRK and Plots if you want VTK export and the time integrators. Trixi.jl works with Julia v1.10 and newer.
Does Trixi.jl support adaptive mesh refinement and MPI?
Yes. The framework offers a hierarchical quadtree or octree grid with adaptive mesh refinement, including forests of quadtrees and octrees through p4est, and it lists shared-memory parallelization via multithreading and multi-node parallelization via MPI.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/trixi-framework-trixi-jl)Was this useful?