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

FR: Cubed Sphere Lattice #176

Closed Meerkov closed 2 months ago

Meerkov commented 2 months ago

This project looks cool. How might someone stitch together six meshes into a cubed sphere simulation?

It's not really clear how to modify the boundary conditions to accomplish the streaming step correctly.

ProjectPhysX commented 2 months ago

Hi @Meerkov,

you can load multiple .stl meshes for composite geometries. Please follow this section in the documentation.

Kind regards, Moritz

Meerkov commented 2 months ago

That guide doesn't look like it would work. A Cubed Sphere requires special boundary conditions, and gravity to be in the center of the cube.

ProjectPhysX commented 2 months ago

Ah, now I get what you mean, stitching together and warping six 2D grids to simulate fluid flow on the surface of a sphere. This is not really possible with LBM, as cell size has to be uniform Cartesian and cannot accomodate warping.

Meerkov commented 1 month ago

For what it's worth, there actually isn't anything that prevents stitching together warped 2D grids. It's possible, it just introduces error.

To enhance physical accuracy, you can alter the density calculation to take into account the non-uniform grid size, or other enhancements.

From what I understand, the non-uniform grid only leads to perhaps a 3% error on some simulations (e.g. a vortex moving across the corner of the cube).