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

Sinks cause fatal errors in cloud collisions #584

Open
teogeo1996 opened this issue Aug 12, 2024 · 14 comments
Open

Sinks cause fatal errors in cloud collisions #584

teogeo1996 opened this issue Aug 12, 2024 · 14 comments

Comments

@teogeo1996
Copy link

There is an issue with sink formation and evolution where, there needs to be a very specific combination of sink parameters for it not to throw a fatal error for the decrease of bin size beyond the allowed level. This affects mostly simulations with magnetic fields but it can also be present in simulation without MHD.

@Yrisch
Copy link
Contributor

Yrisch commented Aug 13, 2024

Hello,
Could you please give more details on the setup used, the set of parameters that seems to work and the error logs when it crashes.
Thank you.

@teogeo1996
Copy link
Author

teogeo1996 commented Aug 13, 2024 via email

@Yrisch
Copy link
Contributor

Yrisch commented Aug 13, 2024

I think the issue comes from r_crit. When you're setting it to 0.001, it means that no sinks can form into a sphere of that radius around each already formed sinks. However density in accretion flows near sinks can rise quite a lot which then causes the reduction of the step size and even a crash if the density is higher than the maximum bin. I had same behaviors in my runs. It also explains why the second setup works. With no constraint, sinks can form wherever the conditions are fulfilled and no particles reach super high density that will need very small time steps.

So the real question is why density in accretion flow can rise to so high values (much higher than rho_crit_cgs) near sinks vicinity ?

I fixed an issue in my last pull request where particles could only accrete where the particle with index 1 was awake which is really strange... If accretion is slowed down by that, it can artificially increase the density in region near sink boundaries causing the crash. Have you tried your simulations with the very last version of phantom ?

@teogeo1996
Copy link
Author

teogeo1996 commented Aug 13, 2024 via email

@Yrisch
Copy link
Contributor

Yrisch commented Aug 13, 2024

No, r_crit is used in the force routine when phantom try to find the densest particle to transform in sink (in force.F90). Overriding methods happen after this choice in ptmass_create. So it never tries to create new sink in other sink vicinity even with overriding.

@Yrisch
Copy link
Contributor

Yrisch commented Aug 13, 2024

What are the most common reasons why sinks don't want to form in your simulation ? In my case, I often had 'not all active particle' fail when using IND_TIMESTEPS. Is it also your case ?

@teogeo1996
Copy link
Author

teogeo1996 commented Aug 14, 2024 via email

@Yrisch
Copy link
Contributor

Yrisch commented Aug 14, 2024

I don't think that these tests can hide issues. They have been extensively tested since the beginning of the code. I re-checked everything and it looks OK to me at least...

I advise you to retry your computations with my last patch if it wasn't the case yet. If it still crashes, you may try to recheck your initial conditions. Finally, it also could be a resolution issue. You might need more particles in your simulation even if you are resolving minimum Jeans mass with your accretion radius...

@teogeo1996
Copy link
Author

teogeo1996 commented Aug 14, 2024 via email

@teogeo1996
Copy link
Author

teogeo1996 commented Aug 25, 2024 via email

@teogeo1996
Copy link
Author

teogeo1996 commented Aug 25, 2024 via email

@teogeo1996 teogeo1996 changed the title Sinks cause fatal errors Sinks cause fatal errors in cloud collisions Aug 25, 2024
@Yrisch
Copy link
Contributor

Yrisch commented Aug 26, 2024

Hi,
It looks strange indeed... Yes, the setup and in files could be helpful to reproduce this issue. If the computation is long before crashing could you also send the latest full dump to relaunch the simulation just before the crash please. I'll test that on my side. ..

@teogeo1996
Copy link
Author

teogeo1996 commented Aug 27, 2024 via email

@teogeo1996
Copy link
Author

teogeo1996 commented Aug 27, 2024

Hello again,

I also noticed that there might be an issue when you choose to not save every dtmax but instead every 2 (e.g) dtmax. The code throws an error and doesn’t write a dump file. I can provide you with the files that throw the error, but I can't upload them here since there is a file size limit even if they are zipped. If you provide me with an email I can send you a link to an one drive folder with them.

Cheers
Theo

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