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-24 | Add support for erasing walls | Adrian Kummerlaender | |

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

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

2019-04-18 | Bind keys for display toggling, palette scaling | Adrian Kummerlaender | |

2019-04-17 | Pause lattice updates independently of UI | Adrian Kummerlaender | |

This way walls may be drawn without disrupting the active fluid flow even more than necessary. | |||

2019-04-17 | Improve color palette of Knudsen criterion mode | Adrian Kummerlaender | |

2019-04-16 | Add flag to toggle fluid quality display | Adrian Kummerlaender | |

e.g. check out `./compustream --size 512 128 --open --lups 300 --quality` | |||

2019-04-16 | Add basic physical scaling and Knudsen quality criterion | Adrian Kummerlaender | |

The paper "Automatic grid refinement criterion for lattice Boltzmann method" [2015] by Lagrava et al. describes a criterion for measuring the local simulation quality using a comparison of the theoretical Knudsen number and the quotient of the cells's non-equilibrium and equilibrium function. While this criterion was developed to enable automatic selection of areas to be refined, it also offers a interesting and unique perspective on the fluid structure. As the criterion requires calculation of the modeled Reynolds-, Mach- and Knudsen-numbers I took the time to set up the basics for scaling the simulation to actually model a physical system. Or rather calculating which physical model is represented by the chosen resolution and relaxation time. [2015]: https://arxiv.org/abs/1507.06767 | |||

2019-02-27 | Test density inflow condition | Adrian Kummerlaender | |

Seems to be more stable when drawing around. Not that all of this doesn't aim to be accurate in any real world sense. | |||

2019-02-27 | Add some rudimentary argument parsing | Adrian Kummerlaender | |

2019-02-25 | Add LUPS reporting and fix glaring oversight | Adrian Kummerlaender | |

The GLFW window rendering loop used to dispatch the compute shaders was restricted to 60 FPS. I did not notice this because I never actually measured the computed lattice updates per seconds in addition to trying to push the GPU to its limits. Turns out the lattice sizes I commonly use can be updated 500 times per second comfortably… Now this looks more like the performance gains promised by GPU computation. | |||

2019-02-25 | Add cylinder and dampened inflow to open geometry | Adrian Kummerlaender | |

2019-02-25 | Merge streaming into collide shaderpattern/ab | Adrian Kummerlaender | |

i.e. implement the A-B pattern. Dispatching only one compute shader per interaction-less simulation step already yields very noticeable performance gains. All cell types are now fully handled by the collide shader which further simplifies the code. | |||

2019-02-24 | Add flag to select initial geometrypattern/trivial | Adrian Kummerlaender | |

2019-02-24 | Play around with open boundaries | Adrian Kummerlaender | |

2019-02-24 | Further abstract mouse handling | Adrian Kummerlaender | |

2019-02-24 | Move geometry initialization into named function | Adrian Kummerlaender | |

2019-02-24 | Extract interaction logic into separate shader | Adrian Kummerlaender | |

The collide shader became to crowded for my taste. As a nice side benefit we can now execute interaction processing only when actual interaction is taking place. | |||

2019-02-24 | Smoothen mouse interaction | Adrian Kummerlaender | |

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 | Tidy up streaming and bounce back boundary handling | Adrian Kummerlaender | |

Introduce a inactive receive-only outer boundary to simplify streaming. Extract and generalize bounce back handling. Further work will require tracking cell _material_ to enable both easier definition and dynamic updating of the geometry. | |||

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

2019-02-18 | Use same population indexing in collide and stream | Adrian Kummerlaender | |

Increases consistency and should help to avoid confusion | |||

2018-12-19 | Extract equilibrium function | Adrian Kummerlaender | |

2018-12-19 | Loopify density function | Adrian Kummerlaender | |

…seems to be correctly unrolled during compilation. Or at least no performance impact is visible. | |||

2018-12-19 | Use GLSL's mix function for color scaling | Adrian Kummerlaender | |

2018-12-19 | Tidy up external influence implementation | Adrian Kummerlaender | |

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

2018-12-18 | Use pressure as velocity norm display amplifier | Adrian Kummerlaender | |

2018-12-18 | Purify collide shader | Adrian Kummerlaender | |

i.e. move fluid vertex placement to appropriate vertex shader. Do not amplify or shift fluid moments in any way prior to passing it to the display pipeline. | |||

2018-12-17 | Clean up stream and collide compute shaders | Adrian Kummerlaender | |

2018-12-17 | Keep track of window size in its wrapper class | Adrian Kummerlaender | |

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

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

2018-12-16 | Filter weird origin vertex | Adrian Kummerlaender | |

The same thing occurs in computicle. I suspect some initialization / compute shader invokation problem. On the other hand: Why would that happen for the origin vertex and not e.g. the first or last vertex in memory? To be investigated further. | |||

2018-12-16 | Generate fluid display using geometry shaders | Adrian Kummerlaender | |

This should provide much more flexibility. For our purpose it would be useful if the vertex shader was executed after the geometry shader (to apply the projection matrix) but alas this is not the case. Thus the MVP matrix is applied during geometry construction and the vertex shader only provides density extraction. | |||

2018-12-16 | Regeneralize ComputeShader wrapper | 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". |