Skip to content

Conversation

@glesur
Copy link
Contributor

@glesur glesur commented Oct 17, 2025

fix #352
The "size" drag force, used notably for modeling dust grains, was not computed correctly when an adiabatic equation of state was used (the sound speed was not properly computed). This PR fixes this issue.

NB: this does not affect results when using a "userdef" drag force, or when using a "ISOTHERMAL" equation of state.

@glesur glesur added the bug Something isn't working label Oct 17, 2025
@glesur glesur requested a review from Copilot October 18, 2025 07:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the calculation of the sound speed for "size" drag force modeling when using an adiabatic equation of state. The issue was an incorrect placement of a closing parenthesis in the GetGamma function call, which was causing the density argument to be multiplied by the pressure-to-density ratio instead of being passed as a separate parameter.

Key Changes

  • Corrected the parenthesis placement in the GetGamma function call to ensure proper argument passing
  • The sound speed calculation now correctly computes sqrt(gamma * P / rho) instead of the previous incorrect formulation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@glesur glesur requested a review from Copilot October 18, 2025 08:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@glesur glesur merged commit bea1c7b into develop Oct 18, 2025
38 checks passed
This was referenced Oct 18, 2025
glesur added a commit that referenced this pull request Oct 19, 2025
## [2.2.02] 2025-10-18
### Changed

- Added a module to add explicit units (#338)
- fixed a bug that could lead to incorrect profiling information on non-blocking cuda loops (#341)
- fixed a bug that could lead to incorrect energy budget when shearing box and fargo were both enabled (#346)
- fixed a bug that led to incorrect BX2 reconstruction when axis is not used on both sides of the domain (#345)
- fixed a bug that led to incorrect reflective boundary conditions on B when DIMENSIONS < 3 (#345)
- fixed a bug that led to incorrect dust stopping time when the adiabatic equation of state is used with "size" drag law (#353)

### Added

- documentation for the continuous integration (#354)
---------

Co-authored-by: Victor Réville <victorreville@gmail.com>
Co-authored-by: Hal Bal <vreville@irap.omp.eu>
Co-authored-by: Jean Kempf <jean.kempf@irap.omp.eu>
Co-authored-by: Victor Réville <47865059+vreville@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants