yet *another* hydrodynamics/hyperbolic conservation law solver, this one in LuaJIT using OpenCL/OpenGL
Lua C GLSL
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
coord
draw
eqn
guivar
init
int
op
solver
tests
view
LICENSE
README.md
app.lua
common.lua
config.lua
font.png
materials.lua
math.cl
math.h
roundup.lua
run.lua
time.lua
tooltip.lua

README.md

HydroJS was the first then Hydro, a C++/multithread version of HydroJS then HydroGPU, a OpenCL version of Hydro then with Lua script config, then the Lua got out of hand until the C++ was doing nothing but managing strings now this project, lua-hydro-cl, pushes the middleman (C++) out completely

Features:

  • script-generated OpenCL GPGPU code regenerated on the fly as soon as you change GUI options
  • automatic tensor index representation of equations / symbolic differentiation (via symmath project)
  • 1D, 2D, 3D simulations and visualizations
  • solvers are usually a Roe scheme, though some implementations vary
  • various flux limiters
  • PLM for certain solvers
  • various boundary conditions
  • integrators: Forward Euler, several Runge-Kutta and Runge-Kutta TVD, and implicit linearized GMRES on the GPU
  • GUI-driven everything. no more restarting the program to switch solvers or initial conditions.
  • Euler equations from Toro's book (with some modifications for curvilinear coordinate systems)
  • Maxwell equations from Trangenstein's book with poisson solver constraints
  • Maxwell equations with GLM from 2000 Munz
  • ideal MHD from Stone et al 2008
  • two-fluid electron/ion plasma model from 2014 Abgrall, Kumar
  • SRHD from Marti & Muller 2008
  • GRHD from Font 2008
  • numerical relativity via Bona-Masso formalism described in Alcubierre 1997 and Alcubierre's 2008 book
  • numerical relativity via finite difference BSSNOK (Baumgarte & Shapiro 2010)
  • self-gravitation for some schemes (Euler equations)
  • Z4c from Cao, Hilditch 2011
  • nonlinear Schrodinger equation from Colliander, Simpso, Sulem "Numerical Simulations of the Energy-Supercritical nonlinear Schrodinger equation" 2010

Example Videos:

Rotating Black Hole / Ergosphere Formation

3D Rotating Black Hole

3D Alcubierre warp bubble

3D Alcubierre warp bubble

TODO:

  • ADM3D with shift as a hyperbolic conservation law system
  • ADM3D (and BSSNOK, and any other GR solver) for minimal-distortion elliptical shift solved as a Poisson equation -- which doesn't require extra time-iterating variables.
  • GR horizon tracking / moving puncture
  • FOBSSN would be nice. Something with the analytic stability of BSSN and the algorithmic stability of finite-volume.
  • Z4 ... I need to finish typing in the source terms. I also need a shift condition.
  • implement eigen-stuff code in SRHD so that PLM can work
  • PLM for BSSNOK-FD and Euler-Burgers
  • PPM
  • higher-order polynomial stuff - WENO or whatever
  • better divergence removal (multigrid)
  • finish GLM-(ideal)MHD ... especially implement the source term as a second step with an exp(dt) (which I'm not doing at the moment)
  • rename mhd to ideal-mhd
  • how about a GLM method for Maxwell equations, so I can remove the divergence-free constraint
  • calculate and implement source terms for curvilinear coordinate systems (working on a tool to do this)
  • get two-fluid-separate EMHD working, so I can update the glm-maxwell with an implicit and update the ion and electron with an explicit solver
  • currently seeing errors when two solvers run simultaneously ... which makes EM+HD difficult
  • add HLLC/D solvers
  • implement Navier-Stokes, compressible & incompressible
  • BSSN connections based on difference with grid coordinate system
  • test out the GR+HD solvers
  • add source terms to GRHD -- or at least plugins for 'gr-hd-separate' to fill in from the NR solver
  • finish the GR+EM solver
  • add EM+GR+HD by winning
  • Figure out what to do with self-gravitational potential energy in the Euler simulation. offsetting it positive makes gravitational instability stable. offsetting it too positive explodes -- even a forward euler integrator (why). offsetting it negative causes more instability.
  • change vector field from immediate mode to buffered geometry, and gometry shaders if they're available
  • coroutines to iterative solvers? so they don't stall the app execution?
  • RHD W error in >1 dimension
  • GR flat space simulations make an initial wave. but shouldn't flat space be stable?

Sources: