Dust relative velocity from velocity field#819
Conversation
… adapting setup_dustybox.f90 consequently
…contributions from dust streaming at gas shocks and from crossing trajectories of dust particles
…minimum grain size when detected negative. Avoid the use of a limiter
…removeparticledensity, and rotateref
…is called discgrow_analysis
…from utils_disc.f90
There was a problem hiding this comment.
Code Review
This pull request introduces support for growing dust particles, adding new setup configurations (such as dustygrowbox, dustygrowsedov, dustgaussvel, and testgrowthsphere) and tracking dust relative velocity dispersion and local velocity ratios. The code review identifies several critical out-of-bounds array access issues, primarily caused by attempting to access a non-existent 4th component of the VrelVf array (which is allocated with a first dimension of size 3) across multiple files. Additionally, potential out-of-bounds risks are highlighted in setup_testgrowthsphere.f90, analysis_maxquant.f90, analysis_growingdisc.f90, and moddump_centreonsink.f90 due to missing array bounds or empty-state guards. Finally, improvements for numerical stability are recommended to prevent division by zero in growth.f90 and NaN values from acos in utils_disc.f90.
…ialising the pull request
…s, default value is .false.
… add them later on
…tgrowthsphere warnings
|
@AlagueroA please can you have a look at the gemini comments above and click "resolve" if they are resolved or unimportant? |
|
All comments resolved ✔️ |
Description:
Calculation of the relative velocities of dust grains from the disc motion.
Components modified:
Type of change:
Testing:
Unit test with a box with
Did you run the bots? no
Did you update relevant documentation in the docs directory? no
Did you add comments such that the purpose of the code is understandable? yes
Is there a unit test that could be added for this feature/bug? yes
If so, please describe what a unit test might check:
It would be good to turn setup_dustgaussvel into somehting running automatically in the testsuite.
Related issues: #