Kinetic.jl

Universal modeling and simulation of fluid mechanics upon machine learning. From the Boltzmann equation, heading towards multiscale and multiphysics flows.
Popularity
122 Stars
Updated Last
3 Months Ago
Started In
February 2020

Kinetic

Kinetic Logo

version CI status Downloads

Kinetic is a computational fluid dynamics toolbox written in Julia. It aims to furnish efficient modeling and simulation methodologies for collective transport of particles, augmented by the power of machine learning. Based on differentiable programming, mechanical and neural network models are fused and solved in a unified framework. Simultaneous 1-3 dimensional numerical simulations can be performed on CPUs and GPUs.

The ecosystem follows the modular design philosophy. Depending on the specific use case, the main module is split into portable components to reduce the lantency caused by the LLVM just-in-time compiler:

  • KitBase: physical models and numerical schemes
  • KitML: neural models and machine learning methods
  • KitFort: optional high-performance Fortran backend
  • FluxReconstruction: high-fidelity solution algorithms
  • Langevin: intrusive uncertainty quantification methods
  • KitAMR: large-scale distributed computing facilities
  • kineticpy: Python interface built on top of pyjulia

Installation

Kinetic is a registered package in the official Julia package registry. We recommend installing it with the Julia package manager. From the Julia REPL, you can get in the package manager (by pressing ]) and add the package

julia> ]
(v1.10) pkg> add Kinetic

This will automatically install a currently stable release and all its dependencies.

Physics

Kinetic models and simulates fluid dynamics problems from the perspective of particle transport. Any advection-diffusion-type equation of different particles, including molecules, photons, plasmas, neutrons, etc., can be solved within the framework. Special attentions have been paid on Hilbert's sixth problem, i.e. to build the numerical passage between kinetic theory of gases, e.g. the Boltzmann equation, and continuum mechanics, e.g. the Euler and Navier-Stokes equations. A partial list of current supported models and equations include:

  • Boltzmann equation
  • radiative transfer equation
  • Fokker-Planck-Landau equation
  • direct simulation Monte Carlo
  • advection-diffusion equation
  • Burgers equation
  • Euler equations
  • Navier-Stokes equations
  • Magnetohydrodynamical equations
  • Maxwell's equations

Structure

The structure of Kinetic is shown in the schematic below:

flowchart LR
    subgraph Com[Component]
        KitBase
        KitML
    end
    subgraph Backend
        CPU
        CUDA
    end
    subgraph Mesh
        FiniteMesh
    end
    subgraph SciML[Scientific Machine Learning]
        Solaris(Solaris)
        Flux(Flux)
        TensorFlow[TensorFlow]
    end
    subgraph AD[Automatic Differentiation]
        ForwardDiff
        Zygote
    end
    subgraph Parallel[Parallel Computing]
        Threads
        Distributed
        MPI["MPI (experimental)"]
    end
    subgraph Serial[Serialization]
        CSV
        JLD2
        BSON
    end
    subgraph Opt[Optimization]
        Optimisers
        Optim
        Optimization
    end
    subgraph Ar[Array]
        Array
        StaticArrays
        StructArrays
    end
    Kt(Kinetic)
    Com --> Kt
    Ar --> Kt
    Mesh --> Kt
    Backend --> Kt
    AD --> Kt
    Serial --> Kt
    Kt --> Parallel
    Kt --> SciML
    Kt --> Opt
Loading

Documentation

For the detailed implementation and usage of the package, please check the documentation:

  • STABLE: latest tagged version of the package
  • LATEST: in-development version of the package

Citing

If you benefit from Kinetic in your research, teaching, or otherwise, we would be happy if you could mention or cite it:

@article{xiao2021kinetic,
  doi = {10.21105/joss.03060},
  url = {https://doi.org/10.21105/joss.03060},
  year = {2021},
  publisher = {The Open Journal},
  volume = {6},
  number = {62},
  pages = {3060},
  author = {Tianbai Xiao},
  title = {Kinetic.jl: A portable finite volume toolbox for scientific and neural computing},
  journal = {Journal of Open Source Software}
}

Contributing

Feel free to dive in! If you have any questions or ideas, please open an issue or submit pull requests. If you're new to the open source community and looking for a cool little project to work on that fits your interests, we're happy to help along the way.

License

MIT © Tianbai Xiao

Used By Packages

No packages found.