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

Vortex ring example simulation #16

Merged
merged 3 commits into from
Nov 11, 2024
Merged

Vortex ring example simulation #16

merged 3 commits into from
Nov 11, 2024

Conversation

EdoAlvarezR
Copy link
Collaborator

@EdoAlvarezR EdoAlvarezR commented Nov 10, 2024

In this PR I have updated test/vortex.jl to work with the latest changes in main, and added a script under /example-vortexring.jl with a vortex ring simulation.

To run the simulation, just run the following in the terminal:

julia path/to/FastMultipole/scripts/example-vortexring.jl

The vortex ring simulation shows that the FMM is introducing some spurious calculations that throw down the structure of the ring:

Peek 2024-11-09 15-46

The spurious calculations become obvious at the boundaries of the clusters, and increasing the expansion order does not seem to have an effect in decreasing the error that is introduced by the FMM:
Peek 2024-11-09 19-57

As a reference, here is the same simulation without the FMM (just the direct! function):
Peek 2024-11-09 19-58

It is unclear if at this point there is something wrong in the implementation of the FMM, or perhaps the FMM is introducing numerical-precision noise that throws off the symmetry of the problem. In the case of the later, there isn't much to do about it, and perhaps Pedrizzeti's relaxation would help smooth away such numerical noise.

@rymanderson
Copy link
Member

rymanderson commented Nov 11, 2024

It looks like the convect! function fails to set lamb_helmholtz=true, which is required for vector potential problems, and likely what is leading the simulation to fail. There might be other issues in the example file vortex.jl, since I created that example very early on in the development of FastMultipole, and have since changed the way FastMultipole returns the velocity gradient (before I returned the entire hessian of the potential functions). I haven't tested the time integration in over a year. I'll take a look and will reopen this pull request after that's fixed.

@rymanderson
Copy link
Member

Incidentally, I have already incorporated FastMultipole into the derivatives branch of FLOWVPM, and the vortex ring tests work there.
https://github.com/byuflowlab/FLOWVPM.jl/blob/master/test/runtests_singlevortexring.jl
https://github.com/byuflowlab/FLOWVPM.jl/blob/master/test/runtests_leapfrog.jl

@rymanderson rymanderson reopened this Nov 11, 2024
@rymanderson
Copy link
Member

rymanderson commented Nov 11, 2024

example

The unsort! operation was broken due to faulty access functions in the vortex.jl example file, so particles were getting scrambled. I fixed that, and it looks like it works. Note that this is with an expansion order of 4.

@rymanderson rymanderson merged commit 3f103db into main Nov 11, 2024
4 of 7 checks passed
@rymanderson rymanderson deleted the test-vortexring branch November 11, 2024 22:05
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

Successfully merging this pull request may close these issues.

2 participants