Trixi

Trixi.jl: Adaptive high-order numerical simulations of conservation laws in Julia

https://github.com/trixi-framework/trixi.jl

Science Score: 77.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    7 of 49 committers (14.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.8%) to scientific vocabulary

Keywords

adaptive-mesh-refinement amr conservation-laws discontinuous-galerkin hyperbolic-equations julia numerical-simulation-framework simulation summation-by-parts

Keywords from Contributors

mesh parallel pde mpi parallel-computing finite-elements hack interpretability differential-equations matrix-exponential
Last synced: 6 months ago · JSON representation ·

Repository

Trixi.jl: Adaptive high-order numerical simulations of conservation laws in Julia

Basic Info
Statistics
  • Stars: 617
  • Watchers: 25
  • Forks: 126
  • Open Issues: 366
  • Releases: 277
Topics
adaptive-mesh-refinement amr conservation-laws discontinuous-galerkin hyperbolic-equations julia numerical-simulation-framework simulation summation-by-parts
Created over 5 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Security Authors Zenodo

README.md

Trixi.jl

Docs-stable Docs-dev Slack Youtube Build Status Codecov Coveralls Aqua QA License: MIT DOI OpenSSF Best Practices <!-- Downloads --> <!-- GitHub commits since tagged version --> <!-- PkgEval -->

Trixi.jl is a numerical simulation framework for conservation laws written in Julia. A key objective for the framework is to be useful to both scientists and students. Therefore, next to having an extensible design with a fast implementation, Trixi.jl is focused on being easy to use for new or inexperienced users, including the installation and postprocessing procedures. Its features include:

  • 1D, 2D, and 3D simulations on line/quad/hex/simplex meshes
    • Cartesian and curvilinear meshes
    • Conforming and non-conforming meshes
    • Structured and unstructured meshes
    • Hierarchical quadtree/octree grid with adaptive mesh refinement
    • Forests of quadtrees/octrees with p4est via P4est.jl
  • High-order accuracy in space and time
    • Arbitrary floating-point precision
  • Discontinuous Galerkin methods
  • Advanced limiting strategies
    • Positivity-preserving limiting
    • Subcell invariant domain-preserving (IDP) limiting
    • Entropy-bounded limiting
  • Compatible with the SciML ecosystem for ordinary differential equations
  • Custom explicit time integration schemes
    • Maximized linear stability via paired explicit Runge-Kutta methods
    • Relaxation Runge-Kutta methods for entropy-conservative time integration
  • Native support for differentiable programming
  • Periodic and weakly-enforced boundary conditions
  • Multiple governing equations:
    • Compressible Euler equations
    • Compressible Navier-Stokes equations
    • Magnetohydrodynamics (MHD) equations
    • Multi-component compressible Euler and MHD equations
    • Multi-ion compressible MHD equations
    • Linearized Euler and acoustic perturbation equations
    • Hyperbolic diffusion equations for elliptic problems
    • Lattice-Boltzmann equations (D2Q9 and D3Q27 schemes)
    • Shallow water equations via TrixiShallowWater.jl
    • Several scalar conservation laws (e.g., linear advection, Burgers' equation, LWR traffic flow)
  • Multi-physics simulations
  • Shared-memory parallelization via multithreading
  • Multi-node parallelization via MPI
  • Visualization and postprocessing of the results
    • In-situ and a posteriori visualization with Plots.jl
    • Interactive visualization with Makie.jl
    • Postprocessing with ParaView/VisIt via Trixi2Vtk

Installation

If you have not yet installed Julia, please follow the instructions for your operating system. Trixi.jl works with Julia v1.10 and newer. We recommend using the latest stable release of Julia.

For users

Trixi.jl and its related tools are registered Julia packages. Hence, you can install Trixi.jl, the visualization tools Trixi2Vtk, and Plots.jl as well as the time integration sub-packages of OrdinaryDiffEq.jl, by executing the following commands in the Julia REPL: ```julia julia> using Pkg

julia> Pkg.add(["Trixi", "Trixi2Vtk", "OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqSSPRK", "Plots"]) `` You can copy and paste all commands to the REPL *including* the leading julia>` prompts - they will automatically be stripped away by Julia. The package OrdinaryDiffEq.jl and its sub-packages provide time integration schemes used by Trixi.jl, while Plots.jl can be used to directly visualize Trixi.jl's results from the REPL.

Note on package versions: If some of the examples for how to use Trixi.jl do not work, verify that you are using a recent Trixi.jl release by comparing the installed Trixi.jl version from julia julia> using Pkg; Pkg.update("Trixi"); Pkg.status("Trixi") to the latest release. If the installed version does not match the current release, please check the Troubleshooting section in the documentation.

The commands above can also be used to update Trixi.jl. A brief list of notable changes to Trixi.jl is available in NEWS.md.

For developers

If you plan on editing Trixi.jl itself, you can download Trixi.jl locally and use the code from the cloned directory: bash git clone git@github.com:trixi-framework/Trixi.jl.git cd Trixi.jl mkdir run cd run julia --project=. -e 'using Pkg; Pkg.develop(PackageSpec(path=".."))' # Install local Trixi.jl clone julia --project=. -e 'using Pkg; Pkg.add(["OrdinaryDiffEq", "Trixi2Vtk", "Plots"])' # Install additional packages Note that the postprocessing tools Trixi2Vtk.jl and Plots.jl are optional and can be omitted.

If you installed Trixi.jl this way, you always have to start Julia with the --project flag set to your run directory, e.g., bash julia --project=. if already inside the run directory. Further details can be found in the documentation.

Usage

In the Julia REPL, first load the package Trixi.jl julia julia> using Trixi Then start a simulation by executing julia julia> trixi_include(default_example()) Please be patient since Julia will compile the code just before running it. To visualize the results, load the package Plots julia julia> using Plots and generate a heatmap plot of the results with julia julia> plot(sol) # No trailing semicolon, otherwise no plot is shown This will open a new window with a 2D visualization of the final solution:

The method trixi_include(...) expects a single string argument with the path to a Trixi.jl elixir, i.e., a text file containing Julia code necessary to set up and run a simulation. To quickly see Trixi.jl in action, default_example() returns the path to an example elixir with a short, two-dimensional problem setup. A list of all example elixirs packaged with Trixi.jl can be obtained by running get_examples(). Alternatively, you can also browse the examples/ subdirectory. If you want to modify one of the elixirs to set up your own simulation, download it to your machine, edit the configuration, and pass the file path to trixi_include(...).

Note on performance: Julia uses just-in-time compilation to transform its source code to native, optimized machine code at the time of execution and caches the compiled methods for further use. That means that the first execution of a Julia method is typically slow, with subsequent runs being much faster. For instance, in the example above the first execution of trixi_include takes about 20 seconds, while subsequent runs require less than 60 milliseconds.

Showcase of advanced features

The presentation From Mesh Generation to Adaptive Simulation: A Journey in Julia, originally given as part of JuliaCon 2022, outlines how to use Trixi.jl for an adaptive simulation of the compressible Euler equations in two spatial dimensions on a complex domain. More details as well as code to run the simulation presented can be found at the reproducibility repository for the presentation.

Documentation

Additional documentation is available that contains more information on how to modify/extend Trixi.jl's implementation, how to visualize output files etc. It also includes a section on our preferred development workflow and some tips for using Git. The latest documentation can be accessed either online or under docs/src.

Referencing

If you use Trixi.jl in your own research or write a paper using results obtained with the help of Trixi.jl, please cite the following articles: ```bibtex @article{ranocha2022adaptive, title={Adaptive numerical simulations with {T}rixi.jl: {A} case study of {J}ulia for scientific computing}, author={Ranocha, Hendrik and Schlottke-Lakemper, Michael and Winters, Andrew Ross and Faulhaber, Erik and Chan, Jesse and Gassner, Gregor}, journal={Proceedings of the JuliaCon Conferences}, volume={1}, number={1}, pages={77}, year={2022}, doi={10.21105/jcon.00077}, eprint={2108.06476}, eprinttype={arXiv}, eprintclass={cs.MS} }

@article{schlottkelakemper2021purely, title={A purely hyperbolic discontinuous {G}alerkin approach for self-gravitating gas dynamics}, author={Schlottke-Lakemper, Michael and Winters, Andrew R and Ranocha, Hendrik and Gassner, Gregor J}, journal={Journal of Computational Physics}, pages={110467}, year={2021}, month={06}, volume={442}, publisher={Elsevier}, doi={10.1016/j.jcp.2021.110467}, eprint={2008.10593}, eprinttype={arXiv}, eprintclass={math.NA} } ```

In addition, you can also refer to Trixi.jl directly as bibtex @misc{schlottkelakemper2025trixi, title={{T}rixi.jl: {A}daptive high-order numerical simulations of hyperbolic {PDE}s in {J}ulia}, author={Schlottke-Lakemper, Michael and Gassner, Gregor J and Ranocha, Hendrik and Winters, Andrew R and Chan, Jesse and Rueda-Ramírez, Andrés}, year={2025}, howpublished={\url{https://github.com/trixi-framework/Trixi.jl}}, doi={10.5281/zenodo.3996439} }

Authors

Trixi.jl was initiated by Michael Schlottke-Lakemper (University of Augsburg, Germany) and Gregor Gassner (University of Cologne, Germany). Together with Hendrik Ranocha (Johannes Gutenberg University Mainz, Germany), Andrew Winters (Linköping University, Sweden), Jesse Chan (Rice University, US), and Andrés Rueda-Ramírez (Polytechnic University of Madrid (UPM), Spain), they are the principal developers of Trixi.jl. The full list of contributors can be found in AUTHORS.md.

License and contributing

Trixi.jl is licensed under the MIT license (see LICENSE.md). Since Trixi.jl is an open-source project, we are very happy to accept contributions from the community. Please refer to CONTRIBUTING.md for more details. Note that we strive to be a friendly, inclusive open-source community and ask all members of our community to adhere to our CODE_OF_CONDUCT.md. To get in touch with the developers, join us on Slack or create an issue.

Participating research groups

Participating research groups in alphabetical order:

Applied and Computational Mathematics, RWTH Aachen University :de:

Applied Mathematics, Department of Mathematics, University of Hamburg :de:

Department of Applied Mathematics in Aerospace Engineering, Polytechnic University of Madrid (UPM) :es:

Division of Applied Mathematics, Department of Mathematics, Linköping University :sweden:

Computational and Applied Mathematics, Rice University :us:

High-Performance Computing, Institute of Software Technology, German Aerospace Center (DLR) :de:

High-Performance Scientific Computing, University of Augsburg :de:

Numerical Mathematics, Institute of Mathematics, Johannes Gutenberg University Mainz :de:

Numerical Simulation, Department of Mathematics and Computer Science, University of Cologne :de:

Acknowledgments

This project has benefited from funding by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) through the following grants: * Excellence Strategy EXC 2044-390685587, Mathematics Münster: Dynamics-Geometry-Structure. * Research unit FOR 5409 "Structure-Preserving Numerical Methods for Bulk- and Interface Coupling of Heterogeneous Models (SNuBIC)" (project number 463312734). * Individual grant no. 528753982.

This project has benefited from funding from the European Research Council through the ERC Starting Grant "An Exascale aware and Un-crashable Space-Time-Adaptive Discontinuous Spectral Element Solver for Non-Linear Conservation Laws" (Extreme), ERC grant agreement no. 714487.

This project has benefited from funding from Vetenskapsrådet (VR, Swedish Research Council), Sweden through the VR Starting Grant "Shallow water flows including sediment transport and morphodynamics", VR grant agreement 2020-03642 VR.

This project has benefited from funding from the United States National Science Foundation (NSF) under awards DMS-1719818 and DMS-1943186.

This project has benefited from funding from the German Federal Ministry of Education and Research (BMBF) through the following grants: * Project grant "Adaptive earth system modeling with significantly reduced computation time for exascale supercomputers (ADAPTEX)" (funding id: 16ME0668K) * Project grant "ICON-DG" of the WarmWorld initiative (funding id: 01LK2315B).

This project has benefited from funding by the Daimler und Benz Stiftung (Daimler and Benz Foundation) through grant no. 32-10/22.

This project has benefited from funding by the Klaus Tschira Stiftung (Klaus Tschira Foundation) through the project grant "High-Fidelity Laboratory for the Simulation of Celestial Bodies with their Space Environment (HiFiLab)" (funding id: 00.014.2021).

This project has benefited from funding by the Spanish Ministry of Science, Innovation, and Universities through the "Beatriz Galindo" grant no. BG23-00062.

Trixi.jl is supported by NumFOCUS as an Affiliated Project.

Owner

  • Name: Trixi.jl
  • Login: trixi-framework
  • Kind: organization

Adaptive high-order numerical simulations of hyperbolic PDEs in Julia

Citation (CITATION.bib)

@article{ranocha2022adaptive,
  title={Adaptive numerical simulations with {T}rixi.jl:
         {A} case study of {J}ulia for scientific computing},
  author={Ranocha, Hendrik and Schlottke-Lakemper, Michael and Winters, Andrew Ross
          and Faulhaber, Erik and Chan, Jesse and Gassner, Gregor},
  journal={Proceedings of the JuliaCon Conferences},
  volume={1},
  number={1},
  pages={77},
  year={2022},
  doi={10.21105/jcon.00077},
  eprint={2108.06476},
  eprinttype={arXiv},
  eprintclass={cs.MS}
}

@article{schlottkelakemper2021purely,
  title={A purely hyperbolic discontinuous {G}alerkin approach for
         self-gravitating gas dynamics},
  author={Schlottke-Lakemper, Michael and Winters, Andrew R and
          Ranocha, Hendrik and Gassner, Gregor J},
  journal={Journal of Computational Physics},
  pages={110467},
  year={2021},
  month={06},
  publisher={Elsevier},
  doi={10.1016/j.jcp.2021.110467},
  eprint={2008.10593},
  eprinttype={arXiv},
  eprintclass={math.NA}
}

@misc{schlottkelakemper2025trixi,
  title={{T}rixi.jl: {A}daptive high-order numerical simulations
         of hyperbolic {PDE}s in {J}ulia},
  author={Schlottke-Lakemper, Michael and Gassner, Gregor J and
          Ranocha, Hendrik and Winters, Andrew R and
          Chan, Jesse and Rueda-Ramírez, Andrés},
  year={2025},
  howpublished={\url{https://github.com/trixi-framework/Trixi.jl}},
  doi={10.5281/zenodo.3996439}
}

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 4,157
  • Total Committers: 49
  • Avg Commits per committer: 84.837
  • Development Distribution Score (DDS): 0.612
Past Year
  • Commits: 403
  • Committers: 22
  • Avg Commits per committer: 18.318
  • Development Distribution Score (DDS): 0.633
Top Committers
Name Email Commits
Hendrik Ranocha m****l@r****e 1,611
Michael Schlottke-Lakemper m****l@s****m 1,235
Andrew Winters a****s@l****e 304
Daniel Doehring d****g@r****e 157
Erik Faulhaber e****r@w****e 122
Gregor Gassner g****r@u****e 112
Jesse Chan 1****n 103
github-actions[bot] 4****] 63
Joshua Lampert 5****t 43
Benjamin Bolm 7****m 42
dependabot[bot] 4****] 41
JuliaOd J****l@g****m 40
Christof Czernik c****k@m****e 40
Huiyu Xie h****e@g****m 34
Andrés Rueda-Ramírez a****a@u****e 30
Lars Christmann l****s@l****u 20
erik-f 4****f 14
Patrick Ersing 1****g 12
Warisa Roongaraya 8****r 12
Felipe l****1@D****M 11
FelipeSantillan 7****n 11
Johannes Markert 1****k 11
Simon Candelaresi 1****n 11
Valentin Churavy v****y@g****m 9
Benedict 1****e 9
ArseniyKholod 1****d 9
Benedict 1****e 7
Arpit Babbar a****r@g****m 7
xzczd x****d 5
Marco Artiano 5****o 3
and 19 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 310
  • Total pull requests: 1,339
  • Average time to close issues: 8 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 65
  • Total pull request authors: 47
  • Average comments per issue: 3.96
  • Average comments per pull request: 3.87
  • Merged pull requests: 940
  • Bot issues: 0
  • Bot pull requests: 168
Past Year
  • Issues: 107
  • Pull requests: 626
  • Average time to close issues: 23 days
  • Average time to close pull requests: 10 days
  • Issue authors: 36
  • Pull request authors: 25
  • Average comments per issue: 1.93
  • Average comments per pull request: 3.54
  • Merged pull requests: 422
  • Bot issues: 0
  • Bot pull requests: 92
Top Authors
Issue Authors
  • ranocha (57)
  • DanielDoehring (45)
  • sloede (27)
  • jlchan (23)
  • efaulhaber (17)
  • benegee (10)
  • huiyuxie (9)
  • JoshuaLampert (8)
  • jmark (7)
  • andrewwinters5000 (7)
  • ErikQ97 (6)
  • teddyz1999 (6)
  • erny123 (5)
  • Arpit-Babbar (5)
  • patrickersing (4)
Pull Request Authors
  • DanielDoehring (316)
  • ranocha (158)
  • github-actions[bot] (105)
  • huiyuxie (82)
  • jlchan (79)
  • dependabot[bot] (63)
  • bennibolm (60)
  • JoshuaLampert (58)
  • sloede (51)
  • SimonCan (42)
  • benegee (40)
  • amrueda (37)
  • efaulhaber (34)
  • andrewwinters5000 (31)
  • jmark (25)
Top Labels
Issue Labels
enhancement (50) bug (46) discussion (31) parallelization (27) performance (27) testing (26) good first issue (25) breaking (22) upstream (19) documentation (18) visualization (14) possible student project (11) low-priority (10) consistency (9) refactoring (7) question (6) help wanted (4) postprocessing (3) high-priority (1) hacktoberfest (1) dependencies (1) taal (1) backlog (1) latency (1)
Pull Request Labels
enhancement (171) documentation (129) low-priority (100) refactoring (93) bug (77) testing (72) dependencies (65) breaking (56) performance (52) consistency (50) parallelization (39) visualization (35) upstream (27) discussion (18) github_actions (13) example (13) merge me (9) draft (4) gpu (4) high-priority (3) latency (1)

Packages

  • Total packages: 1
  • Total downloads:
    • julia 97 total
  • Total dependent packages: 2
  • Total dependent repositories: 0
  • Total versions: 276
juliahub.com: Trixi

Trixi.jl: Adaptive high-order numerical simulations of conservation laws in Julia

  • Versions: 276
  • Dependent Packages: 2
  • Dependent Repositories: 0
  • Downloads: 97 Total
Rankings
Forks count: 1.9%
Stargazers count: 2.0%
Average: 9.2%
Dependent repos count: 9.9%
Dependent packages count: 23.0%
Last synced: 6 months ago

Dependencies

.github/workflows/CacheNotebooks.yml actions
  • actions/checkout v2 composite
  • jupyterhub/repo2docker-action master composite
.github/workflows/DocPreviewCleanup.yml actions
  • actions/checkout v2 composite
.github/workflows/Documenter.yml actions
  • actions/checkout v2 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/Invalidations.yml actions
  • actions/checkout v3 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-invalidations v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/benchmark.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • actions/upload-artifact v2 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/upload-artifact v3 composite
  • codecov/codecov-action v1 composite
  • coverallsapp/github-action master composite
  • julia-actions/cache v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CompatHelper.yml actions
.github/workflows/FormatCheck.yml actions
  • actions/checkout v3 composite
  • julia-actions/setup-julia latest composite
.github/workflows/ReviewChecklist.yml actions
  • actions/checkout v3 composite
  • trixi-framework/add-pr-review-checklist v1 composite
.github/workflows/SpellCheck.yml actions
  • actions/checkout v3 composite
  • crate-ci/typos v1.16.9 composite
.github/workflows/downstream.yml actions
  • actions/checkout v4 composite
  • julia-actions/cache v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/setup-julia v1 composite