Skip to content

Dust relative velocity from velocity field#819

Merged
danieljprice merged 45 commits into
danieljprice:mainfrom
AlagueroA:dustgrowth
Jun 4, 2026
Merged

Dust relative velocity from velocity field#819
danieljprice merged 45 commits into
danieljprice:mainfrom
AlagueroA:dustgrowth

Conversation

@AlagueroA

Copy link
Copy Markdown
Contributor

Description:

Calculation of the relative velocities of dust grains from the disc motion.

Components modified:

  • Setup (src/setup)
  • [ x] Main code (src/main)
  • Moddump utilities (src/utils/moddump)
  • [ x] Analysis utilities (src/utils/analysis)
  • [ x] Test suite (src/tests)
  • Documentation (docs/)
  • Build/CI (build/ or github actions)

Type of change:

  • [ x] Bug fix
  • [ x] Physics improvements
  • Better initial conditions
  • Performance improvements
  • Documentation update
  • [ x] Better testing
  • Code cleanup / refactor
  • Other (please describe)

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: #

AlagueroA added 26 commits May 27, 2026 15:22
…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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/main/growth.f90 Outdated
Comment thread src/main/growth.f90 Outdated
Comment thread src/utils/utils_disc.f90 Outdated
Comment thread src/utils/analysis_growingdisc.f90 Outdated
Comment thread src/setup/setup_testgrowthsphere.f90 Outdated
Comment thread src/utils/analysis_maxquant.f90
Comment thread src/main/growth.f90 Outdated
Comment thread src/utils/utils_disc.f90
Comment thread src/utils/analysis_growingdisc.f90
Comment thread src/utils/moddump_centreonsink.f90
@AlagueroA AlagueroA changed the title Dustgrowth Dust relative velocity from velocity field May 28, 2026
@danieljprice

Copy link
Copy Markdown
Owner

@AlagueroA please can you have a look at the gemini comments above and click "resolve" if they are resolved or unimportant?

@AlagueroA

Copy link
Copy Markdown
Contributor Author

All comments resolved ✔️

@danieljprice danieljprice merged commit 08d0074 into danieljprice:main Jun 4, 2026
269 checks passed
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