tum-pbs / PhiFlow

A differentiable PDE solving framework for machine learning
MIT License
1.47k stars 192 forks source link

Advecting a solid object #167

Open nikhilhenry opened 3 months ago

nikhilhenry commented 3 months ago

I recently came across PhiFlow and I've been really enjoying the accessible API design and ease of use. Thank you so much!

I've been experimenting with the Karman Vortex Street demo and wanted to simulate the movement of a solid object within the flow. My attempt to do so by advecting a PointCloud in the velocity field was successful, however, when I try to do it with a CenteredGrid instantiated with Sphere for the values, the field slowly detoriates, which is to be expected. I'm definitely missing something here and would greatly appreciate receiving any guidance about how I could possibly advect a solid geometry.

Here are some of my attempts attached below.

sphere point

holl- commented 3 months ago

Hi, I appreciate the kind words! As for your problem, this is indeed an expected numerical artefact that can't be fully eliminated. The amount of numerical diffusion depends on the method you use and of course the grid resolution.