Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advecting a solid object #167

Open
nikhilhenry opened this issue Jul 24, 2024 · 1 comment
Open

Advecting a solid object #167

nikhilhenry opened this issue Jul 24, 2024 · 1 comment

Comments

@nikhilhenry
Copy link

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-
Copy link
Collaborator

holl- commented Jul 28, 2024

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.

  • Semi-Lagrangian advection generally incurs the largest diffusion.
  • MacCormack is still relatively fast but leads to less diffusion.
  • Higher-order advection might be more accurate. You can try setting order=4 or order=6, see here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants