Age | Commit message (Collapse) | Author | |
---|---|---|---|

2019-04-28 | Experimental visualization of the velocity curl | Adrian Kummerlaender | |

Calculating the curl of our simulated velocity field requires an additional compute shader step. Handling of buffer and shader switching depending on the display mode is implemented rudimentarily for now. Most of this commit is scaffolding, the actual computation is more or less trivial: ``` const float dxvy = (getFluidVelocity(x+1,y).y - getFluidVelocity(x-1,y).y) / (2*convLength); const float dyvx = (getFluidVelocity(x,y+1).x - getFluidVelocity(x,y-1).x) / (2*convLength); setFluidExtra(x, y, dxvy - dyvx); ``` This implements the following discretization of the 2d curl operator: Let $V : \mathbb{N}^2 \to \mathbb{R}^2$ be the simulated velocity field at discrete lattice points spaced by $\Delta x \in \mathbb{R}_{\gt 0}$. We want to approximate the $z$-component of the curl for visualization: $$\omega := \partial_x F_y - \partial_y F_x$$ As we do not possess the actual function $F$ but only its values at a set of discrete points we approximate the two partial derivatives using a second order central difference scheme: $$\overline{\omega}(i,j) := \frac{F_y(i+1,j) - F_y(i-1,j)}{2 \Delta x} - \frac{F_x(i,j+1) - F_x(i,j-1)}{2 \Delta x}$$ Note that the scene shader does some further rescaling of the curl to better fit the color palette. One issue that irks me is the emergence of some artefacts near boundaries as well as isolated "single-cell-vortices". This might be caused by running the simulation too close to divergence but as I am currently mostly interested in building an interactive fluid playground it could be worth it to try running an additional smoothening shader pass to straighten things out. | |||

2019-04-18 | Bind key to reset lattice buffers | Adrian Kummerlaender | |

i.e. restarting the simulation without clearing the geometry | |||

2019-02-23 | Store material in fluid buffer and improve visualization | Adrian Kummerlaender | |

Replaces the density value which is actually not that useful for visualization. Encoding integer values as floats by casting and comparing them using exact floating point comparison is not very safe but works out for now. | |||

2019-02-22 | Tidy up wall drawing and geometry initialization | Adrian Kummerlaender | |

2019-02-22 | Improvise interactive wall drawing | Adrian Kummerlaender | |

Internal wall cells need to be disabled to prevent delayed propagation of the reflected populations. This is just quickly thrown together - both the visual drawing and the backend's material handling remain to be improved. | |||

2019-02-20 | Initialize cells using their equilibrium distribution | Adrian Kummerlaender | |

2018-12-18 | Hacky mouse-based fluid interaction | Adrian Kummerlaender | |

2018-12-17 | Try out velocity norm color mapping | Adrian Kummerlaender | |

2018-12-17 | Fix glDrawArray call | Adrian Kummerlaender | |

2018-12-16 | Parametrize lattice resolution | Adrian Kummerlaender | |

2018-12-15 | Hacky D2Q9 BGK LBM on GPU using GLSL compute shaders | Adrian Kummerlaender | |

Improvised on top of computicles's scaffolding. Works in a world where _works_ is defined as "displays stuff on screen that invokes thoughts of fluid movement". |