ProjectPhysX / FluidX3D

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

Edge merging issue #237

Closed JunchenLyu closed 1 month ago

JunchenLyu commented 1 month ago

A small issue: I wonder why the edge of the gear wheel tends to merge when the calculation keeps going. 屏幕截图 2024-10-20 104335 屏幕截图 2024-10-20 104327

ProjectPhysX commented 1 month ago

Hi @JunchenLyu,

please check your setup for mistakes. Are the rotation centers of the gears set correctly?

Kind regards, Moritz

JunchenLyu commented 1 month ago

I get the bounding box center as the rotation center. I line up with two image in different time step, the centers didn't move but the edge was shown differently. Besides, I find the shape of the wheels become bigger after several time step, which confuses me more. I attach my code, in hope to get some instruction. Thanks a lot!

65820ce91a8bad79f42b89f7482601d 914d7850fb8cd30b4696a4ce7385a92
JunchenLyu commented 1 month ago

I noticed that I missed the normalization and therefore caused the scaling of the model, but I'm still confused about it.

ProjectPhysX commented 1 month ago

Ah yes that was the issue, now I see it too. The float3x3(float3& vector, float angle) constructor generates a rotation matrix around the provided vector, and that vector has to be normalized, otherwise anything to which this rotation matrix is applied gets scaled up/down by the length of this vector.