ProjectPhysX / FluidX3D

The fastest and most memory efficient lattice Boltzmann CFD software, running on all GPUs via OpenCL. Free for non-commercial use.
https://youtube.com/@ProjectPhysX
Other
3.48k stars 281 forks source link

Local values #170

Closed DanW97 closed 3 months ago

DanW97 commented 3 months ago

With the in-place scheme you've implemented, are the local DDFs the same as for schemes involving 2 DDF copies, or are there some considerations required with respect to odd and even timesteps for implementing stuff that relies on cell values?

ProjectPhysX commented 3 months ago

Hi @DanW97,

yes the local DDFs in in-place streaming schemes are the same as for schemes with 2 copies of DDFs, but you have to load them in the correct pattern using information if the time step is even or odd. Technically, DDFs are stored in memory locations corresponding to the first half of streaming, and the second half of streaming is only completed during loading. You can always access DDFs with the load_f function which completes this second half of the streaming step.

As an additional benefit, with in-place schemes it's possible to not complete streaming with the remaining forward half time step during loading, but to go back half a time step to get DDFs from the previous time step. This trick is used for the free surface extension with the load_f_outgoing function.

Kind regards, Moritz